-no-pie detection fails for gcc 4 and 5 on Gentoo hardened

Bug #1668986 reported by Mark Wright on 2017-03-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Compiling sbcl 1.3.14 with gcc 4.7.4 on Gentoo hardened fails as gcc versions prior to gcc 6 required linking with -nopie, while as the change 3403dbaffc0a9bab49b78cf0bb5308cce0a0c153 done for https://bugs.launchpad.net/sbcl/+bug/1633559 incorrectly detects that the compiler requires linking with -no-pie, the compile error is:

make: Entering directory '/var/tmp/portage/dev-lisp/sbcl-1.3.13/work/sbcl-1.3.13/tools-for-build'
i686-pc-linux-gnu-gcc -O2 -march=core2 -mmmx -msse -msse2 -mssse3 -pipe -m32 -fno-omit-frame-pointer -fno-pie -fno-pie -I../src/runtime -Wl,-O1 -Wl,--as-needed -nopie -no-pie determine-endianness.c -ldl -o determine-endianness
i686-pc-linux-gnu-gcc: error: unrecognized command line option '-no-pie'
make: *** [<builtin>: determine-endianness] Error 1
make: Leaving directory '/var/tmp/portage/dev-lisp/sbcl-1.3.13/work/sbcl-1.3.13/tools-for-build'

The fix applied to Gentoo in https://bugs.gentoo.org/show_bug.cgi?id=583930 is:


Thomas de Grivel (thodg) wrote :

This worked for me on Gentoo hardened. Thanks !

Stas Boukarev (stassats) wrote :

In d905bdd3b4ce68682ea611390624b78c8d8dbdcf.

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers