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: GCC Search Directory Problem -- crosstool-ng-1.4.0


Ben,
All,

On Friday 01 May 2009 19:53:47 Ben Atkinson wrote:
> As a preliminary test, I started with the arm-unknown-linux-gnueabi
> sample .config file and tried it "as-is".
> The build completed successfully, but I get different results depending
> on whether I execute gcc or arm-unknown-linux-gnueabi-gcc.
> $ /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/gcc -o Hello Hello.c

Oh! I never thought any one would be using that! I did not even know gcc
would install a copy of itself in this place...

The 'canonical' way to call the cross gcc is to give the complete name,
in your case you'd use arm-unknown-linux-gnueabi-gcc.

> Shouldn't both instances of gcc work equally well? Am I missing something?

The toolchain is relocatable, and gcc expects its sub-tools (eg. cc1)
to be in a precise place relative to where gcc is. In this case, the
search path is correctly _built_, but the path itself is wrong, because
gcc does not expect to be run from that place.

A relocatable toolchain can be copied to another place, and will still
continue to work: as gcc looks relative to where it is, then it will
be able to find the required tools (cc1...) and files (headers, libs...)

I guess it would be safer that crosstool-NG removes this file, as it can
be mis-leading. Really, the tools are those that are available in:
  /home/batkinson/x-tools/arm-unknown-linux-gnueabi/bin/
and not those in:
  /home/batkinson/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/bin/

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]