binutils turns gcc into a cross compiler

Jesse Caldwell Jesse.Caldwell@Colorado.EDU
Tue Feb 27 19:17:00 GMT 2001


Here's what happens:


boatanchor:/scratch/gnu/gawk-3.0.6 > uname -a
SunOS boatanchor 5.8 Generic_108528-06 sun4m sparc SUNW,SPARCstation-10

boatanchor:/scratch/gnu/gawk-3.0.6 > gcc -v
Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)

boatanchor:/scratch/gnu/gawk-3.0.6 > ./configure
loading cache ./config.cache
checking for bison... bison -y
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
^C

boatanchor:/scratch/gnu/binutils-2.10.1 > cd -

boatanchor:/scratch/gnu/binutils-2.10.1 > sudo make install > & /dev/null

boatanchor:/scratch/gnu/binutils-2.10.1 > cd -

boatanchor:/scratch/gnu/gawk-3.0.6 > ./configure
loading cache ./config.cache
checking for bison... bison -y
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... yes
^C


What gives? Installing binutils turns gcc into a cross compiler? I'm
building a gnu distribution into /usr/local/gnu and binutils is the one
I've been putting off for this reason. building binutils with cc
instead of the aforementioned gcc seems to fix the problem, but I'm
quite perplexed as to why a copy of binutils built with the gcc
compiler turns gcc into a cross compiler. all of the documentation
seems to indicate the building a cross compiler is difficult; my
installation seems to do it by default. :P

If more info would help I'd be happy to provide it.

Jesse



More information about the Gcc-bugs mailing list