This is the mail archive of the crossgcc@sourceware.org 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]

Re: Building a native toolchain for a target


Hello Hichem!
Hello all!

On Wednesday 06 May 2009 17:09:32 Hichem Boussetta wrote:
> I need to compile a native toolchain to run on a target. Is it possible
> to do that using crosstool-ng ?

No, not yet. I do not have an immediate need for this, and no one
stepped in to add such support, so that is not supported.

BTW, in crosstool-NG, I call that a cross-native toolchain, That
is, a toolchain that is cross-compiled, hence "cross", but will
run on the target, hence "native".

If you feel brave, here are a few tips:
- when building a cross-native toolchain, we need a cross-compiler
  that runs on host, and compiles for target
- we do not need either of the core gcc pass 1 or 2, as we already
  have the afore-mentioned cross-compiler that is able to build
  the C library
- the final compiler that we build must *not* be in the PATH, as it
  will not run on host (because it is expected to run on target)

There should be almost everything needed already in place in
crosstool-NG, but that has not been tested at all.

Here are a few places to look at (in svn trunk):
- config/toolchain.in          lines  94..139
- scripts/crosstool-NG.sh.in   lines 301..310
- scripts/build/cc/gcc.sh      lines  47.. 78

There might be some other places, but I leave them for you to find. ;-)

If you (or anyone else) volunteer, do not hesitate to ask, if you
encounter problems...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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