mirror of
https://github.com/ipxe/ipxe
synced 2026-02-14 02:31:26 +03:00
Autodetect whether or not we need to be using -fno-stack-protector.
This commit is contained in:
@@ -102,6 +102,14 @@ CFLAGS += $(OLDGAS)
|
|||||||
oldgas :
|
oldgas :
|
||||||
@$(ECHO) $(oldgas)
|
@$(ECHO) $(oldgas)
|
||||||
|
|
||||||
|
# Some widespread patched versions of gcc include -fstack-protector by
|
||||||
|
# default, even when -ffreestanding is specified. We therefore need
|
||||||
|
# to disable -fstack-protector if the compiler supports it.
|
||||||
|
#
|
||||||
|
SP_TEST = $(CC) -fno-stack-protector -x c -E - < /dev/null >/dev/null 2>&1
|
||||||
|
SP_FLAGS := $(shell $(SP_TEST) && $(ECHO) '-fno-stack-protector')
|
||||||
|
CFLAGS += $(SP_FLAGS)
|
||||||
|
|
||||||
# compiler.h is needed for our linking and debugging system
|
# compiler.h is needed for our linking and debugging system
|
||||||
#
|
#
|
||||||
CFLAGS += -include compiler.h
|
CFLAGS += -include compiler.h
|
||||||
|
|||||||
Reference in New Issue
Block a user