Skip to contentSkip to conversation

Some distributions ship compilers that include -fPIE in the default specs (Gentoo Hardened)

PATCH Magnus Granberg 1 participant 1 message Sep 3, 2009

lore
Share & tools
lore
#0 lore raw
Quoted 15 lines · Magnus Granberg
Quoted 5 lines
Quoted 2 lines

Why not just check if the compiler accepts -fno-PIE and use it? No harm done if -fPIE wasn't default, right?

------
Didn't want to add -fno-PIE when it was not needed and to be on the safe side . I can make it to check for -fno-PIE and use that.

First approach was fine IMHO. But please include a ChangeLog entry.

Signature · 5 lines
Robert Millan

 The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
 how) you may access your data; but nobody's threatening your freedom: we
 still allow you to remove your data and not access it at all."

The ChangeLog
-----
2009-09-03 Magnus Granberg <[email protected]>

* aclocal.m4: Add grub_CHECK_PIE. It check if the compiler include -fPIE in the default specs.
* configure.ac: Check if pie_possible is yes and add -fno-PIE to TARGET_CFLAGS.

------
Hardened-Development
/Magnus Granberg (Zorry) <[email protected]>