Crosscompiling
G öran Boström
goran.bostrom@home.se
Tue Apr 8 20:01:00 GMT 2003
I need to compile a program for a system using kernel 2.0.38. This kernel uses libc.so.5.
Unfortunately I have no development system using this library. The system I use is RH 5.2 using libc.so.6!
I tried to install a libc5 package on my /usr/local/libc5 directory. When I compile this happens:
gcc -o test test.c -I/usr/local/libc5/include \-I /usr/local/libc5/include/pcap \
-L/usr/local/libc5/lib -lpcap
/usr/lib/crt1.o(.text+0xe): undefined reference to `__libc_init_first'
/usr/lib/crt1.o(.text+0x18): undefined reference to `_environ'
Something went wrong!?? I must have missed something since the compiler yells for /usr/lib and not inte /usr/local/libc5/lib ...
I made some test using -nostartfiles and explicitly link the crt1.o file from the libc5 tree, but those executables won't run on my target system!!?
What have I missed?
/Göran
More information about the Gcc-help
mailing list