What options control linker .o searches?

Paul Smith pausmith@nortelnetworks.com
Tue Nov 18 22:09:00 GMT 2003


Hi all;  I'm building a cross-compiler hosted on i686 Linux,
cross-compiling for PPC Linux.

I'm seeing a problem on my cross-compiler installation where the linker
cannot find the crti.o file: I believe this is produced by glibc.  It's
not part of the compiler, at any rate (not like crt0.o) and it lives in
/usr/lib on my target box.

As reported here before, I cannot have these files copied into the
compiler's directory, they must live in an image of the target's rootfs
(ideal for -sysroot, but no -sysroot available yet).


What flag or environment variable do I need to give to gcc or g++ so
that it will allow the linker to DTRT?

-L (and SEARCH_DIR() in the linker scripts) is for libraries, and this
isn't one.  So, I don't think that will help... and in fact adding -L
options to the link line _doesn't_ help.


I tried using the GCC_EXEC_PREFIX environment variable, but that does
too much; if I use that it can't find other stuff like cc1plus etc.

I can use -B... on the command line, but what is the algorithm used to
search for these things?  Are they looked for on any other paths?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@nortelnetworks.com>   HASMAT: HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for 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