Readjusted linker issues etc.

robert baker robertmbaker at
Mon Jun 8 17:53:05 PDT 2009

On Mon, Jun 8, 2009 at 6:26 PM, Robert
Connolly<robert at> wrote:
> 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.

D'oh. I thought I had tried that, but my mistake was that I doubled
back for testsuite checks after installing gcc. Long story short I
amended the specs file, but put it in the wrong location. Thanks for
sending me in the right direction!

 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.

One Pax related failure as mentioned. The test just doesn't expect the
pax header to be in the output.

> 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.

I am about to try this. I will get back to you.

> -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.

I can confirm this for sure. It appears that most of the tests do
honor CFLAGS, but not all of them.

The only other failure that remains after getting an amended specs
file in place is the FAIL: ld-i386/hidden2 mentioned earlier.

This is the pertinant log info.

Executing on host: sh -c
{/sources/onward/binutils-2.19.1/obj/ld/../binutils/objdump  -drw
tmpdir/dump > tmpdir/dump.out 2>ld.tmp}  /dev/null  (timeout = 300)
regexp_diff match failure
regexp "^[      ]*[a-f0-9]+:    e8 cf fe ff ff          call   0
line   " 14c:   e8 af fe ff ff          call   0 <bar-0x14c>"
FAIL: ld-i386/hidden2

This is most assuredly the way to go. The amended vanilla specs file
seems to be absolutely necesary for consistant testsuite results.
Thank you

More information about the hlfs-dev mailing list