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-compilers _without_ copying all of include & lib


Hi all;

I'm trying to create a GCC 3.3(.x) cross binutils/gcc (build ==
i686-pc-linux-gnu, target == powerpc-unknown-linux-gnu and also
mips-unknown-linux-gnu, tomorrow :)).  I have a complete, already-built
filesystem for the target available to me, on my build system.  I do
_NOT_ want to rebuild glibc, etc. etc. myself.  I want to use the stuff
in that target filesystem.

Creating the cross-compiler itself is pretty straightforward in this
situation; cool!

However, not only will I have this target filesystem available during
the creation of the cross-compiler itself but it is always available to
me when I cross-compile my code, and I want all my cross-compiled code
to use those includes and libraries, not what is in my cross-compiler
install.

Whenever I build the cross-compiler using --with-headers/--with-libs,
as described in the manual etc., it copies the entire contents of the
target filesystem include directory, and at least some of the system
libraries, into the cross-compiler directory.

For example if I'm building with --prefix=/usr/local, then I get a
complete copy of the system headers and libraries in:

    /usr/local/powerpc-unknown-linux-gnu/include
    /usr/local/powerpc-unknown-linux-gnu/lib

I want to avoid this!

>From reading lots of messages it seems like --sysroot, coming in future
versions of GCC, will be exactly what I want, but until then (which
could be a while since swapping compilers takes a little testing) what
can I do?


Can I just delete those directories, and have the compiler DTRT?  Or
does the compiler stuff things in there itself?  Is there some tweak I
can make so it doesn't copy them in the first place (that would be
ideal)?  It looks like this is done in the configure.in script,
actually.  Hm.

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


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