This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I'm trying to build a cross compiler for a specific debian build we use on our embedded 568 SBC's. This build uses the debain package libc6_2.3.2.ds1-22_i386.deb, which is the stable sarge version for the i386. So, I decompress crosstool-0.42, and make a copy of demo-i386.sh. I change the target to: eval `cat i386.dat gcc-3.4.3-glibc-2.3.2.dat` sh all.sh --notest Start it up and it builds the cross toolchain perfectly, voila. I copy my new toolchain into my SDK and build a test program, no problem. I copy the libc from my target libc-2.3.2.so and attempt to link against it: with gcc-3.4.3-glibc-2.3.2/i386-unknown-linux-gnu/bin/i386-unknown-linux-gnu-gcc *.o -Wl -Llib/dynamic -o hello -lc-2.3.2 no dice: lib/dynamic/libc-2.3.2.so: undefined reference to `_dl_tls_symaddr@GLIBC_PRIVATE' Shouldn't this work? I see a tls in there (hence the title of the email) do I need to build with tls? I've tried it but it seems to be broken: (see error pasting at the end of the email) Now to be fair, I don't know if linking against a remote libc is going to work even with the same version, I just suspect it indicates a problem. More importantly, the cross compiler can't link against the pthreads library of this version libpthread-0.10.so Attempting to do so yields: gcc-3.4.3-glibc-2.3.2/i386-unknown-linux-gnu/bin/i386-unknown-linux-gnu-gcc modreg.o -Wl -Llib/dynamic ../../lib/static/libmodbus.a -o modreg -lpthread-0.10 lib/dynamic/libpthread-0.10.so: undefined reference to `__libc_fork@GLIBC_2.1.2' Which looks like utter madness to me, GLIBC_2.1.2? where did that come from? Neither the host, the target, or the cross compiler uses 2.1.2. I thought, ok, maybe it's a tls thing, so I tried to build a tls cross-compiler: eval `cat i386.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --notest but the build crashes with the errors pasted at the end of this email. I have moved into the head pointing phase of this project, so I would appreciate any pointers. thx, NZG ******************************************************************************** The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair. Douglas Adams, Mostly Harmless ******************************************************************************** eval `cat i386.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --notest build errors: In file included from dynamic-link.h:49, from rtld.c:35: ../sysdeps/i386/dl-machine.h: In function `elf_machine_runtime_setup': ../sysdeps/generic/ldsodefs.h:171: warning: inlining failed in call to `_dl_name_match_p' ../sysdeps/i386/dl-machine.h:132: warning: called from here rtld.c: In function `_dl_start': ../sysdeps/i386/dl-machine.h:100: warning: inlining failed in call to `elf_machine_runtime_setup' rtld.c:439: warning: called from here rtld.c: In function `dl_main': rtld.c:1579: error: variable `ldt_entry' has initializer but incomplete type rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: warning: excess elements in struct initializer rtld.c:1579: warning: (near initialization for `ldt_entry') rtld.c:1579: error: storage size of `ldt_entry' isn't known rtld.c:1579: error: `firstcall' undeclared (first use in this function) rtld.c:1579: error: (Each undeclared identifier is reported only once rtld.c:1579: error: for each function it appears in.) make[2]: *** [/home/nathan/workspace-new/crosstool/crosstool-0.42/build/i386-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.2/build-glibc/elf/rtld.os] Error 1 make[2]: Leaving directory `/home/nathan/workspace-new/crosstool/crosstool-0.42/build/i386-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.2/glibc-2.3.2/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/home/nathan/workspace-new/crosstool/crosstool-0.42/build/i386-unknown-linux-gnu/gcc-4.0.2-glibc-2.3.2/glibc-2.3.2' make: *** [all] Error 2 -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |