This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compilation problem
- To: bogus_user at hotmail dot com
- Subject: Re: Compilation problem
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sat, 6 Nov 1999 11:05:58 +0100
- CC: gcc at gcc dot gnu dot org
- References: <19991106003955.35491.qmail@hotmail.com>
> Has anybody tried something similar to this and gotten it to work?
This is, essentially, a cross-compilation. Please read about
installing gcc as a cross compiler. You have to configure gcc for a
different architecture (e.g. i586-redhat52-linux), and then provide
tools and libraries for that architecture (including binutils).
One problem is that you still use the startup files from /usr/lib, use
-nostartfiles to avoid this, use -v to see what else gets linked.
Another problem is that ld *knows* to find things in /lib and
/usr/lib, that's why you need the cross-binutils. I believe you could
avoid building cross-binutils by writing a linker spec file; check out
SEARCH_DIR in the /usr/lib/ldscripts files.
DISCLAIMER: I never installed a cross-compiler myself, so this is all
theory.
Hope this helps,
Martin