[ipxe-devel] gcc defaults to pie ?

Michael Brown mcb30 at ipxe.org
Wed Jan 31 16:42:11 UTC 2018

On 31/01/18 16:35, Joakim Tjernlund wrote:
> On Gentoo gcc 6 defaults to PIE and that generates and ton of
>   error: code model kernel does not support PIC mode
> Throwing in a general -fno-pie does not seem to be the right fix either.
> Maybe iPXE should start specifying -fno-pie where needed?

There's logic within arch/i386/Makefile which is supposed to autodetect 
compilers that do this and specify the appropriate combination of "do 
not use PIE" options.  We may need to expand this to handle whatever 
Gentoo has done.

> What about other gcc options like __FORTIFY__ ?

There's similar logic in Makefile.housekeeping to disable 
-fstack-protector if needed.


More information about the ipxe-devel mailing list