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)
Created attachment 158179 [details] file 1/2 of the crossdev log
Created attachment 158181 [details] file 2/2 of the crossdev log
Created attachment 158183 [details] glibc config.log
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
(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.
(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.
should be fixed with latest binutils-2.18-r3 ebuild
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.
(In reply to comment #8) I could confirm this, same hashtable error trying to build cross-mipsel-unknown-linux-uclibc
*** This bug has been marked as a duplicate of bug 233233 ***