[ipxe-devel] [syslinux] [PATCH] Fix gpxe compilation when gcc is patched to compile by default with -fPIE -Wl, -pie
Michael Brown
mbrown at fensystems.co.uk
Tue Mar 29 14:40:04 UTC 2011
On Tuesday 29 Mar 2011 13:12:31 Gilles Espinasse wrote:
> +# Some widespread patched versions of gcc include -fPIE -Wl,-pie by
> +# default. gpxe does not support pie code in get_cpuinfo.
> +#
> +ifeq ($(CCTYPE),gcc)
> +PIE_TEST = $(CC) -fno-PIE -nopie -x c -c /dev/null \
> + -o /dev/null >/dev/null 2>&1
> +PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
> +CFLAGS += $(PIE_FLAGS)
> +endif
> +
Applied to upstream iPXE, with modifications to fix building on unaffected
systems:
http://git.ipxe.org/ipxe.git/commitdiff/fe61f6d
Many thanks!
Michael
More information about the ipxe-devel
mailing list