mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
sys-firmware/ipxe: fix building with current stable hardened toolchains #586558
Current Gentoo stable hardened toolchains utilize "-nopie" while upstream has standardized "-no-pie". Hack the pie patch to support both until we can update our gcc patchsets to use the newer name.
This commit is contained in:
@@ -22,8 +22,8 @@ index fe3adc9ce436..59ad25b6e0af 100644
|
||||
ifeq ($(CCTYPE),gcc)
|
||||
-PIE_TEST = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
-PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
|
||||
+PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
+PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -no-pie')
|
||||
+PIE_TEST = for f in -nopie -no-pie; do [ -z "`$(CC) -fno-PIE $$f -x c -c /dev/null -o /dev/null 2>&1`" ] && $(ECHO) -fno-PIE $$f; done
|
||||
+PIE_FLAGS := $(shell $(PIE_TEST))
|
||||
WORKAROUND_CFLAGS += $(PIE_FLAGS)
|
||||
endif
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ index fe3adc9ce436..59ad25b6e0af 100644
|
||||
ifeq ($(CCTYPE),gcc)
|
||||
-PIE_TEST = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
-PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
|
||||
+PIE_TEST = [ -z "`$(CC) -fno-PIE -no-pie -x c -c /dev/null -o /dev/null 2>&1`" ]
|
||||
+PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -no-pie')
|
||||
+PIE_TEST = for f in -nopie -no-pie; do [ -z "`$(CC) -fno-PIE $$f -x c -c /dev/null -o /dev/null 2>&1`" ] && $(ECHO) -fno-PIE $$f; done
|
||||
+PIE_FLAGS := $(shell $(PIE_TEST))
|
||||
WORKAROUND_CFLAGS += $(PIE_FLAGS)
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user