sys-firmware/ipxe: fix building with current stable hardened toolchains #586558
authorMike Frysinger <vapier@gentoo.org>
Thu, 23 Jun 2016 19:20:57 +0000 (15:20 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 23 Jun 2016 19:22:07 +0000 (15:22 -0400)
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.

sys-firmware/ipxe/files/ipxe-1.0.0_p20130925-no-pie.patch
sys-firmware/ipxe/files/ipxe-1.0.0_p20160620-no-pie.patch

index c5a595614f8457ff00e26e4309d78c70b5a5b2e1..3156f3d11700e9e7d2bd9a73237e865a23cc1e77 100644 (file)
@@ -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
  
index 6abc8c6715abf10bcca47f45e0c9778e9f12a601..a0501d18790474d50a2973567bd776868f710767 100644 (file)
@@ -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