Readjusted linker issues etc.

Robert Connolly robert at linuxfromscratch.org
Mon Jun 8 16:26:05 PDT 2009


Use the specs from gcc pass 1. You shouldn't need to edit the linker or start 
files assuming your host system is Glibc. Remove the -fPIC, and 
add "-fno-PIE -fno-stack-protector" to cc1: and cc1plus:, unconditionally. 
These two options are hard coded in GCC. All other options are done in the 
specs file, but gcc pass 1's spec file is vanilla except for -fPIC. Copy this 
spec file to /tools/lib/gcc/i686-pc-linux-gnu/4.4.1/specs just for the 
Binutils tests. I did this a while ago and all tests passed.

Hardened Binutils still has vanilla behavior. If the Binutils programs are 
broken by hardening, they would abort() or segfault, not cause bad output. So 
unless the programs are crashing during the tests, the test failures are 
caused by the modified compiler adding unexpected symbols, etc, to the test 
objects. The PT_PAX patch is an exception. Upstream/Pax doesn't maintain the 
test suite, I do, so some test may fail because of the extra program header. 
These are easy to fix. I forget if I checked whether the current Pax patch 
passes test suites, it just needs to be tested on a vanilla system to check.

To test GCC, the specs file will probably need to be copied to obj/gcc/specs 
before running make check. I haven't tried this. If this doesn't work I have 
other ideas.

-nopie only disables ld -pie in gcc specs, not -fPIE. Both Binutils and GCC 
don't respect *CFLAGS and CC during the tests. I tried to report it, but 
upstream doesn't seem to believe me.

robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20090608/48c8c752/attachment.sig>


More information about the hlfs-dev mailing list