Re: Cross compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kai Ruottu wrote:
Yan Seiner wrote:
arm-linux-gcc main_nx.c  -I../Lib -I../../microwin/src/include
-I/home/local/panel/arm//ts7300-deb/usr/include
-L/home/local/panel/arm//ts7300-deb/lib
-L/home/local/panel/arm//ts7300-deb/usr/lib
Lets assume the 'libc.so' script being in the '/home/local/panel/arm//ts7300-deb/usr/lib',
then simply edit it to NOT have those stupidities:
/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/lib/gcc-lib/arm-linux/3.3.4/../../../../arm-linux/bin/ld:
skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/lib/gcc-lib/arm-linux/3.3.4/../../../../arm-linux/bin/ld:
cannot find /lib/libc.so.6
caused by the insanities of crosstool! Cannot guess what kind of mess the result really is :-(
Oops, the editing isn't enough because at least the 'ld-linux.so.2' will be searched via the hard-coded '$prefix/$target/lib', please see this via 'arm-linux-ld -verbose | less' and what the SEARCH_DIR (or something) says about the hard-coded search paths in the '$target-ld' ! Finding 'libc.so' after those '-L' should succeed but all the 'NEEDED' not-referenced 'linked-in' shared libraries like 'ld-linux.so.2' will not be found via the '-L' options. Adding 'ld-linux.so.2' into 'libc.so' has been one workaround: 'GROUP ( libc.so.6 ld-linux.so.2 libc_nonshared.a )' or something there... But maybe the bare names don't work and the absolute paths '/home/local/panel/arm/ts7300-deb/lib' etc. must be put to each name !

A totally normal and totally sane crosstoolchain made from the binutils and GCC sources and the prebuilt Debian/ARM
libraries could really be something very wise!

BTW, the 'usr/lib/libpthread.so' is another 'linker script' with absolute pathnames :-(


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux