Several distributions include versions of gcc that are patched to create position-independent executables by default. These have caused multiple problems over the years: see e.g. commitsfe61f6d("[build] Fix compilation when gcc is patched to default to -fPIE -Wl,-pie"),5de1346("[build] Apply the "-fno-PIE -nopie" workaround only to i386 builds"),7c395b0("[build] Use -no-pie on newer versions of gcc"), anddecee20("[build] Disable position-independent code for ARM64 EFI builds"). The build system currently attempts to work around these mildly broken patched versions of gcc for the i386 and arm64 architectures. This misses the relatively obscure bin-x86_64-pcbios build platform, which turns out to also require the same workaround. Attempt to preempt the next such required workaround by moving the existing i386 version to apply to all platforms and all architectures, unless -fpie has been requested explicitly by another Makefile (as is done by arch/x86_64/Makefile.efi). Signed-off-by: Michael Brown <mcb30@ipxe.org>
15 lines
263 B
Makefile
15 lines
263 B
Makefile
# -*- makefile -*- : Force emacs to use Makefile mode
|
|
|
|
# Specify EFI image builder
|
|
#
|
|
ELF2EFI = $(ELF2EFI64)
|
|
|
|
# Specify EFI boot file
|
|
#
|
|
EFI_BOOT_FILE = bootaa64.efi
|
|
|
|
# Include generic EFI Makefile
|
|
#
|
|
MAKEDEPS += arch/arm/Makefile.efi
|
|
include arch/arm/Makefile.efi
|