This is the mail archive of the crossgcc@sources.redhat.com 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]

How to force ld to find crti.o


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]