Improve compiler detection and configuration in xcompile.
Move -fno-stack-protector support from Makefile to xcompile. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5113 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
14
Makefile
14
Makefile
@@ -221,19 +221,7 @@ INCLUDES += -I$(shell $(CC) -print-search-dirs | head -n 1 | cut -d' ' -f2)inclu
|
||||
INCLUDES += -I$(top)/util/x86emu/include
|
||||
INCLUDES += -include $(obj)/build.h
|
||||
|
||||
try-run= $(shell set -e; \
|
||||
TMP=".$$$$.tmp"; \
|
||||
if ($(1)) > /dev/null 2>&1; \
|
||||
then echo "$(2)"; \
|
||||
else echo "$(3)"; \
|
||||
fi; rm -rf "$$TMP")
|
||||
|
||||
cc-option= $(call try-run,\
|
||||
$(CC) $(1) -S -xc /dev/null -o "$$TMP", $(1), $(2))
|
||||
|
||||
STACKPROTECT += $(call cc-option, -fno-stack-protector,)
|
||||
|
||||
CFLAGS = $(STACKPROTECT) $(INCLUDES) -Os -nostdinc
|
||||
CFLAGS = $(INCLUDES) -Os -nostdinc
|
||||
CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
|
||||
CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs
|
||||
CFLAGS += -Wstrict-aliasing -Wshadow
|
||||
|
Reference in New Issue
Block a user