Hi, Am Samstag, 26. Mai 2007 01:28 schrieb Ken Moffat: > On Sat, May 26, 2007 at 12:48:52AM +0200, Carsten Clever wrote: > > I'm build a CLFS-1.0.0-x86_64-Pure64 system from svn revision 3521 with > > chroot approach. > > During stage 10.7., glibc configure fails with > > checking for .preinit_array/.init_array/.fini_array support... no > > configure: error: Need linker with .init_array/.fini_array support. > > > > I use "-Os -march=athlon64 -fPIC -fstack-protector-all -pipe" as compiler > > options. > > > > Any hints? > > Look in the config.log file (actually, you may have several of them > - you want the one that has the error message). Somewhere, it > should tell you exactly what result it got when it looked for this > support. That may point to the problem.
Good point. There is only one config.log file. The relevant part is ======== configure:5491: checking for .preinit_array/.init_array/.fini_array support configure:5504: gcc -Os -march=athlon64 -fPIC -fstack-protector-all -pipe -Os -march=athlon64 -fPIC -fstack-protector-all -pipe -o conftest conftest.c -static -nostartfiles -nostdlib 1>&5 /tmp/cc60Vj06.o: In function `_start': conftest.c:(.text+0x25): undefined reference to `__stack_chk_fail' /tmp/cc60Vj06.o: In function `__start': conftest.c:(.text+0x53): undefined reference to `__stack_chk_fail' /tmp/cc60Vj06.o: In function `foo': conftest.c:(.text+0x83): undefined reference to `__stack_chk_fail' collect2: ld returned 1 exit status configure:5507: $? = 1 configure:5520: result: no configure:5523: error: Need linker with .init_array/.fini_array support. =========== Which lead me to the idea that the -fstack-protector-all flag is to blame. Actually, if I try the command myself, I can reproduce the error. Either removing -fstack-protector-all or -nostdlib fixes the issue. I'll try if I can continue with removing "-nostdlib" from configure... > What host system ? CLFS-1.0.x-SVN-20061215 using gcc-4.1.2 and glibc-2.5 > > Actually, I strongly suspect your CFLAGS. I don't recall which > version of gcc was in 1.0.0, but with 4.2.0 and possibly other > current versions there is a bug with -fPIC (gcc PR31490). Equally, > -Os has given me problems in the past when used on toolchain packages, > (e.g. on i586 in the gcc-3 days) and -fstack-protector-all is > something most of us probably don't use. Host system is compiled with "-Os -march=athlon64 -fPIC" and works smoothly. Got some test failures, but they have all been documented and are considered harmless. > > If this isn't your first CLFS, feel free to experiment with CFLAGS, > and to document what works (together with the toolchain package > versions), and to pick up the pieces when things break. > > But isn't r3521 the current head (in other words, NOT 1.0.0) ? If > that is true, definitely drop -fPIC and expect some breakage from > gcc-4.2.0. You're right. Should have written CLFS-Development-1.0.x-SVN-r3521 (current head). I'll stay with -fPIC anyway. Many thanks for your help! > ĸen Carsten . _______________________________________________ Clfs-support mailing list [email protected] http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support
