How to force ld to find crti.o

Roman Duka rduka@mail.ru
Fri Jan 23 18:12:00 GMT 2004


hi guys, i have a question regarding ld and crti.o
i've built cross binutils, bootstrap gcc, and glibc, but i'm having 
problems building final gcc. the problems are due to my cross glibc 
being installed in prefix/target/lib and prefix/target/usr/lib (when the 
entire glibc in installed in only prefix/target/lib the final gcc builds OK)
i get the following error message when i try to build final gcc

/home/roman/crosstool/sparc-unknown/sparc-unknown-linux-gnu/bin/ld: 
cannot open crti.o: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/home/roman/crosstool/build/gcc-build/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/roman/crosstool/build/gcc-build/gcc'
make: *** [all-gcc] Error 2

so i'm guessing ld cannot locate crti.o, even though crti.o exists under 
prefix/target/usr/lib!! When building binutils i used "make 
LIB_PATH=prefix/target/usr/lib" to tell ld where to look for libraries 
etc. Checking ld for SEARCH_DIR shows that it knows about the relevant paths

athlon1000:/home/roman/crosstool/sparc-unknown/sparc-unknown-linux-gnu/bin 
# ./ld --verbose
GNU ld version 2.14 20030612
   Supported emulations:
    elf32_sparc
    sparclinux
    elf64_sparc
    sun4
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
OUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
               "elf32-sparc")
OUTPUT_ARCH(sparc)
ENTRY(_start)
SEARCH_DIR("/home/roman/crosstool/sparc-unknown/sparc-unknown-linux-gnu/lib"); 
SEARCH_DIR("/home/roman/crosstool/sparc-unknown/sparc-unknown-linux-gnu/usr/lib");
.... etc

Does anybody know how to force ld to see the files under my 
prefix/target/usr/lib? I've specified all the paths etc, but from the 
error messages above it looks like ld doesn't pay much attention to 
them!!!!


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list