crosstool: issues compiling glibxc: as and ld missing or too old

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Thu Aug 25 21:12:00 GMT 2011


Julain, All,

On Thursday 25 August 2011 20:42:04 Julian wrote:
> thank you very much! crosstool-ng looks very useful and I tried to build 
> a toolchain for my powerpc. It seems to work so far.
> But I'm not sure about the usage. What does the directories and binaries 
> in x-tool mean?
> 
> x-tool/powerpc-unkown-elf/bin/powerpc-unknown-elf-gcc
> x-tool/powerpc-unkown-elf/bin/powerpc-unknown-elf-gcc-4.4.5
> x-tool/powerpc-unkown-elf/powerpc-unknown-elf/bin/gcc
         ^^^^^^^^^^^^^^^^^^
This means you are targetting bare-metal, that is, a system with no OS.
Is that really what you want? Usually, bare-metal is quite an advanced
topic, and people usually do not use bare-metal toolchains.

Toolchains usually target an OS (eg. Linux, Solaris, Windows...), and
this reflects in the toolchain tuple, eg.:
  i686-pc-linux-gnu
  ^1   ^2 ^3    ^4

 1- the architecture part, possibly with a variation to represent sub-arch
 2- the vendor part (meaningless, free-form except no dash and no space)
 3- kernel part
 4- system part, possibly with a variation to represent ABI

3+4 is also called the OS part. It's also a bit misleading, because OS-less
systems still have an OS part, just it's used differently; bare-metal is
only a three-part tuple, eg.:
  i686-bare-elf

But as you say below, a newbie^Wbeginner is most probably interested in
creating a toolchain targetting an OS (kernel=linux)Linux, for glibc or
uClibc (resp. system=gnu and system=uclibc).

> Which one should I use?

The _real_ compiler is the first one. All you need to call is in the first
bin/ directory you quote; the second bin/ dir (the one that is deeper in
the tree) is for internals only, you should *not* refer to this directory
at all. gcc and other tools will internal refer to that directory, however,
but that's not too be used externally.

> Are some settings missing? because I get an error compiling stuff:
> > gcc: error trying to exec 'cc1': execvp: No such file or directory
> 
> I'm sorry for this stupid newbie questions, this is the first time I'm 
> building my own toolchain...

Then, I'd suggest you start off with one of the bundled powerpc samples.
  ct-ng help
  ct-ng list-samples

should get you on-line with using a sample. Samples are known to (at least!)
build correctly.

Also, worth reading:
  crosstool-ng/docs/0 - Table of content.txt

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  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



More information about the crossgcc mailing list