Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229173 - MIPS: binutils-2.18-r2 break cross-libc build.
Summary: MIPS: binutils-2.18-r2 break cross-libc build.
Status: RESOLVED DUPLICATE of bug 233233
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: MIPS Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 05:58 UTC by Manuel Lauss
Modified: 2009-05-10 02:13 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
file 1/2 of the crossdev log (cross-mipsel-softfloat-linux-gnu-glibc.log,13.70 KB, text/plain)
2008-06-24 05:59 UTC, Manuel Lauss
Details
file 2/2 of the crossdev log (cross-mipsel-softfloat-linux-gnu-info.log,10.54 KB, text/plain)
2008-06-24 06:00 UTC, Manuel Lauss
Details
glibc config.log (config.log,39.06 KB, text/plain)
2008-06-24 06:07 UTC, Manuel Lauss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Lauss 2008-06-24 05:58:46 UTC
with binutils-2.18-r2, creating a cross-libc fails with this error:

*** WARNING: You should not compile GNU libc without versioning. Not using
*** versioning will introduce incompatibilities so that old binaries
*** will not run anymore.
*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer).
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... yes
checking for .preinit_array/.init_array/.fini_array support... no
configure: error: Need linker with .init_array/.fini_array support.


Reproducible: Always

Steps to Reproduce:
1.crossdev -t mipsel-softfloat-linux-gnu -v -b --b 2.18-r2 --g 4.2.4 --k 2.6.25-r4 --l 2.7-r2
2.
3.




If I remove patch 77 from binutils patchkit, glibc build succeeds (but binaries
no longer work on a mips system built with binutils <= 2.18-r1, but I can fix
that)
Comment 1 Manuel Lauss 2008-06-24 05:59:42 UTC
Created attachment 158179 [details]
file 1/2 of the crossdev log
Comment 2 Manuel Lauss 2008-06-24 06:00:11 UTC
Created attachment 158181 [details]
file 2/2 of the crossdev log
Comment 3 Manuel Lauss 2008-06-24 06:07:52 UTC
Created attachment 158183 [details]
glibc config.log
Comment 4 Petr Pisar 2008-08-04 11:56:13 UTC
The same problem with binutils-2.18-r3. binutils-2.18-r1 is fine.

The problem is in linker which uses GNU hashtable by default instead of SYSV style as mentioned in man page. This produce error message:

/usr/libexec/gcc/mipsel-softfloat-linux-gnu/ld: .gnu.hash is incompatible with
the MIPS ABI
collect2: ld returned 1 exit status

Also the same bug causes to fail other non fatal tests in glibc configure.

Concrete fatal test failed in glibc is following:

conftest.c:
int _start (void) { return 0; }
int __start (void) { return 0; }
int foo (void) { return 1; }
int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;

$ mipsel-softfloat-linux-gnu-gcc  -pipe -O2 -fno-strict-aliasing  -Wl,-O1 -o conftest conftest.c -static -nostartfiles -nostdlib
Comment 5 Joshua Kinard gentoo-dev 2008-08-04 14:36:58 UTC
(In reply to comment #0)
> If I remove patch 77 from binutils patchkit, glibc build succeeds (but binaries
> no longer work on a mips system built with binutils <= 2.18-r1, but I can fix
> that)

When you say don't work anymore, do you mean you get an error regarding an undefined symbol of __gnu_local_gp?  I've been working separately on getting glibc-2.7 to compile w/ gcc-4.3.1 and binutils-2.18, but after building, this symbol pops up.
Comment 6 Manuel Lauss 2008-08-04 15:10:55 UTC
(In reply to comment #5)
> (In reply to comment #0)
> > If I remove patch 77 from binutils patchkit, glibc build succeeds (but binaries
> > no longer work on a mips system built with binutils <= 2.18-r1, but I can fix
> > that)
> 
> When you say don't work anymore, do you mean you get an error regarding an
> undefined symbol of __gnu_local_gp?  I've been working separately on getting
> glibc-2.7 to compile w/ gcc-4.3.1 and binutils-2.18, but after building, this
> symbol pops up.

Afraid not, it's about missing symbol versioning support.  OpenRC's libeinfo for instance throws "unknown symbol EINFO_1.0" messages, as do alsa-lib and others, as soon as the new ld is merged.
Rebuilding the whole system from ground up fixes that.

The above mentioned toolchain versions actually work (plus the annoyances mentioned in this bugreport) for me in a native and cross compile environment.
Comment 7 SpanKY gentoo-dev 2008-08-20 06:43:48 UTC
should be fixed with latest binutils-2.18-r3 ebuild
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-11-12 20:26:30 UTC
I've just hit this with 2.18-r4. Tried also -r3 which should be fixed per previous comment, but nah. Then I skipped -r2 and tried -r1, which works. So reopening.
Comment 9 Pavel Shirov 2008-11-25 13:01:48 UTC
(In reply to comment #8)

I could confirm this, same hashtable error trying to build cross-mipsel-unknown-linux-uclibc
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2009-05-10 02:13:52 UTC

*** This bug has been marked as a duplicate of bug 233233 ***