I am trying to setup a cross compiler on a linux based cluster. So far I can get it to compile for a different architecture but it won't link the libraries. Here is what I did:
1. downloaded and compiled binutils for my architecture (./configure --target=sparc-linux)
2. downloaded glibc and glibc-devel RPMs for sparc (2.2.3-16) and extracted them into a seperate directory
3. copied the includes, kernel headers and libraries to /usr/local/sparc-linux
4. Relinked the libraries for their new location
5. downloaded and configured gcc-2.95.3 for my target architecture, and did make LANGUAGES="c"
After this it would compile the GNU hello world test C program, but would fail when linking with this message:
sparc-linux-gcc -o hello hello.o version.o getopt.o getopt1.o -L/usr/local/sparc-linux/lib/
/lib/libc.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [hello] Error 1
Thank you in advance.