[Buildroot] Question about buildroot generated toolchain binaries

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sun Feb 27 22:58:40 UTC 2011


Steve, Charles, All,

On Sunday 27 February 2011 23:40:37 Steve Johnson wrote:
> Actually, there are two copies of gcc:
> 
> one in /usr/arm-linux/bin:
> -rwxr-xr-x. 1 na na  252289 Feb 21 20:10 gcc
> 
> and one in /usr/bin:
> -rwxr-xr-x.  2 na na  252289 Feb 21 20:10 arm-unknown-linux-uclibcgnueabi-gcc

Actually, they are the same file. If you lok at the inode number for those
two files, you'll see that the two inodes are the same. So the files are
in fact hard links. As such, they do not use more space (only a directory
entry, which is really not much).

I am not too sure why there is one in /usr/tuple/bin, but as suggested before
by Michael, it has to do with the 'machine' stuff that gcc used to use.

Before gcc-4.6 (yet to be released!), you could use a single gcc frontend to
drive different backends for different machines and/or versions of gcc. You
would do that with the -b and -V options to gcc, and then gcc would call the
/usr/tuple/bin/gcc instead.

This was seldom used, was partly broken, and is now removed from gcc-4.6.
See:
  http://gcc.gnu.org/gcc-4.6/changes.html

Also, as suggested by Michael, it was used on hosts where the standard C
compiler was not gcc. But that is now of historical interest, no? ;-)

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.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list