[ipxe-devel] [PATCH v2] arch: i386: Check for -no-pie gcc option as well.

Michael Brown mcb30 at ipxe.org
Wed Jun 14 11:54:05 UTC 2017


On 05/06/17 12:59, Markos Chandras wrote:
>   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')
>   WORKAROUND_CFLAGS += $(PIE_FLAGS)
> +# openSUSE Tumbleweed switched on PIE by default since gcc-7.1.1. However -nopie
> +# is not a recognized option so we need to check for -no-pie instead. -no-pie
> +# seems to be the recognized option upstream as well.
> +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')

This patch seems to break the original workaround (for older gcc 
versions), since it completely redefines PIE_TEST and PIE_FLAGS.

I've pushed a modified version:

   http://git.ipxe.org/ipxe.git/commitdiff/7c395b0

Please let me know if this doesn't fix the problem.

Thanks,

Michael



More information about the ipxe-devel mailing list