[ipxe-devel] gcc defaults to pie ?
Michael Brown
mcb30 at ipxe.org
Wed Jan 31 19:01:57 UTC 2018
On 31/01/18 18:52, Joakim Tjernlund wrote:
>> I can build bin/8086100e.rom but not bin-x86_64-pcbios/8086100e.rom:
>> cc1: error: code model kernel does not support PIC mode
>> nor
>> bin-x86_64-pcbios/undionly.kpxe
>> bin-x86_64-pcbios/ipxe.lkrn
>> bin-x86_64-pcbios/ipxe.usb
>
> adding this makes it build again:
> echo "CFLAGS += -fno-pie" >> ${S}/arch/x86/Makefile.pcbios || die
> echo "LDFLAGS += -no-pie" >> ${S}/arch/x86/Makefile.pcbios || die
>
> Is that the correct place? There is an arch/x86_64/Makefile.pcbios file too
I'm trying to figure out where the PIE check can go. Moving it to
Makefile.housekeeping (or to arch/x86/Makefile) breaks the
bin-x86_64-efi build due to some unknown relocation types.
You can test any proposed patch: it needs to be able to pass
make everything
which will build a selection of 32-bit and 64-bit x86 targets.
Michael
More information about the ipxe-devel
mailing list