public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: John Carter <john.carter@tait.co.nz>
To: "Wenton L. Davis" <wenton@ieee.org>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Building a cross-compiler
Date: Tue, 29 Jan 2008 04:32:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0801291129460.8271@parore.tait.co.nz> (raw)
In-Reply-To: <479E4EEA.9050101@ieee.org>

On Mon, 28 Jan 2008, Wenton L. Davis wrote:

> I am finally going to admit defeat and come ask for help on this.  I am 
> trying to build a cross-compiler to run on an x86 machine for several 
> targets: ARM, MIPS, AVR, and m681x.  I would like a single compiler to handle 
> those 4 architectures in addition to the x86, eventually.  However, for now, 
> I am just trying to get the individual targets able to compile.

It's a _very_ dark art....

Some hints:...

There is a nasty tangly dependency between binutils, libc and the
compiler.

Last time I did it, I found I had to have the binutils --prefix directory
the same --prefix as the compiler.

You then need to have the target libc in the appropriate level of the
gcc src tree. Your error messages suggest to me you either don't have
a libc build, or have it at the wrong level.


I found I couldn't build it "out the box" for the variants I was
building for, I had to find and apply some patches. (Not too
surprising, given the combinatorial explosion of host os X host CPU X
target os X target CPU X libc implementation X libc version X binutils
version, they simply can't test everything.)

Good Luck! I can email you my scripts for building things, can't
guarantee they'll work for you though! Being in Ruby, I find them easy to
read / maintain than the cross gcc shell script project.


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
New Zealand

  reply	other threads:[~2008-01-28 22:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29  4:17 Wenton L. Davis
2008-01-29  4:32 ` John Carter [this message]
2008-01-29  4:47   ` Wenton L. Davis
2008-01-29  5:05     ` Michael Witten
2008-01-29  6:54       ` James Tebneff
2008-01-29 20:24       ` Kai Ruottu
2008-01-29  6:11     ` Rupert Wood
2008-01-29  9:58     ` John Carter
2008-01-29 19:04 ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2008-01-31 15:33 Wenton L. Davis
2003-03-03 14:33 James Don
2003-03-03 14:28 Jeff Elkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0801291129460.8271@parore.tait.co.nz \
    --to=john.carter@tait.co.nz \
    --cc=gcc-help@gcc.gnu.org \
    --cc=wenton@ieee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).