From 662884bd08835875210a2c01674e5594fcae78c7 Mon Sep 17 00:00:00 2001 From: Logan Gunthorpe Date: Fri, 22 Mar 2019 16:41:20 -0600 Subject: Disable compiler protections features The riscv compiler available in Ubuntu enables stack protection and FORTIFY source by default which breaks the build. Adding -fno-stack-protector and -U_FORTIFY_SOURCE to the tool flags fixes this without any side effects. The compiler available in debian do not have these protections enabled and work with or without the extra flag. Fixes: #105 Signed-off-by: Logan Gunthorpe --- Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 376670d..73e92d9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -102,7 +102,7 @@ VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled)) CC := @CC@ READELF := @READELF@ OBJCOPY := @OBJCOPY@ -CFLAGS := @CFLAGS@ $(CFLAGS) $(march) $(mabi) -DBBL_PAYLOAD=\"bbl_payload\" -DBBL_LOGO_FILE=\"bbl_logo_file\" +CFLAGS := @CFLAGS@ $(CFLAGS) $(march) $(mabi) -DBBL_PAYLOAD=\"bbl_payload\" -DBBL_LOGO_FILE=\"bbl_logo_file\" -fno-stack-protector -U_FORTIFY_SOURCE BBL_PAYLOAD := @BBL_PAYLOAD@ COMPILE := $(CC) -MMD -MP $(CFLAGS) \ $(sprojs_include) @@ -111,7 +111,7 @@ COMPILE := $(CC) -MMD -MP $(CFLAGS) \ # - LIBS : Library flags (eg. -l) LD := $(CC) -LDFLAGS := @LDFLAGS@ -nostartfiles -nostdlib -static $(LDFLAGS) $(march) $(mabi) +LDFLAGS := @LDFLAGS@ -nostartfiles -nostdlib -static $(LDFLAGS) $(march) $(mabi) -fno-stack-protector LIBS := @LIBS@ LINK := $(LD) $(LDFLAGS) -- cgit v1.1