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]

cross-compiled native compiler: ld can't find crt1.o


I'm trying to compile LFS starting from Mac OS X for my lfs-from-osx hint.

I used crosstool (http://kegel.com/crosstool) to create a cross-compiler on Mac OS X for powerpc-750-linux-gnu, whose specs file I modify to use /tools/lib/ld.so.1 instead of /lib/ld.so.1.
With this cross-compiler, I compiled glibc-2.3.2 (as patched for crosstool), gcc-3.3.3 and binutils-2.14 (patched and compiled as in the sections "Pass 2" of LFS-5.1.1 plus the host and build configure flags).


After starting Linux with init=/tools/bin/bash, the compiler in /tools/ can compile a hello world program fine, but it can't link it.

The first problem is that in the arguments to ld, gcc passes crt0.o, crt1.o, and crtn.o directly, without any path prefixed, so ld can't find them.

The second problem is that even when I modified the ld argument list to include the complete path to these files, ld complained that it could not find the file for -lgcc. I did not find any file called libgcc.so anywhere, but neither is there any on a normal GNU/Linux installation, only files gcc-lib/*/*/libgcc.a and libgcc_s.so.

Any help?

Thanks,

Martin Schaffner


------ 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]