[ipxe-devel] gcc defaults to pie ?

Michael Brown mcb30 at ipxe.org
Wed Jan 31 18:09:45 UTC 2018


On 31/01/18 17:31, Joakim Tjernlund wrote:
> Yes, building on x86_64 for x86_64, various targets, for example
> make -j1 Q=''   CC=x86_64-pc-linux-gnu-gcc LD=x86_64-pc-linux-gnu-ld AS=x86_64-pc-linux-gnu-as AR=x86_64-pc-
> linux-gnu-ar NM=x86_64-pc-linux-gnu-nm OBJCOPY=x86_64-pc-linux-gnu-objcopy RANLIB=x86_64-pc-linux-gnu-ranlib
> OBJDUMP=x86_64-pc-linux-gnu-objdump HOST_CC=x86_64-pc-linux-gnu-gcc ARCH=x86_64
> EMBED=/var/lib/layman/transmode/profiles/gentoo64-common/IPXE.script bin/808610de.rom

OK.  Don't do that.  Try just

   make EMBED=....../IPXE.script bin/808610de.rom

and it should automatically use the correct toolchain and build a 32-bit 
binary (which _is_ what you want, since you've asked for 
bin/808610de.rom rather than bin-x86_64-pcbios/808610de.rom).

In the unlikely even that you need to specify a custom toolchain (i.e. 
if your default "gcc" binary is not an x86 compiler), then you can 
specify an explicit toolchain prefix using CROSS:

   make CROSS=x86_64-pc-linux-gnu- \
        EMBED=....../IPXE.script \
        bin/808610de.rom

Michael



More information about the ipxe-devel mailing list