c compiler configure error in x86-64 crossgcc

Kai Ruottu karuottu@mbnet.fi
Mon Dec 15 11:12:00 GMT 2003


Zhiyong Sun <szhiyong@cs.unm.edu> wrote:

> I am building x86-64 crosscompiler. I met the problem when I build
> final gcc, the error message is:
> *
> checking whether the C compiler ( /root/opteron/gcc-build/gcc/xgcc
> -B/root/opteron/gcc-build/gcc/ -B/opt/x86-64/x86_64-linux/bin/
> -B/opt/x86-64/x86_64-linux/lib/ -isystem /opt/x86-64/x86_64-linux/include
> -O2 -g -O2 ) works... no
> configure: error: installation or configuration problem: C compiler cannot
> create executables.

 Ok, you have a C-only-GCC and a C library. But can your GCC with the
C library create executables?  The libiberty etc. configure checked this
and the error message says it cannot...

 But how did YOU test this thing when getting your GCC and glibc being
built?

 A simple way to test a GCC based compiler, is to write something like:

    gcc -o hello hello.c

and see what happens... The 'hello.c' is the famous "Hello World"
application. Doing tests like this should be quite usual practice
among all people taking compilers into use.

 The point here is that the GCC (in subdir 'gcc') must work and be
capable to create simple C executables before using it to build the
extra libraries, 'libiberty', 'libstdc++' etc.

 You will get an error from some of the "compile" phases and can then
ask about it, when trying to compile the "Hello World"... Or you can
look at the tests the GCC-build did from the appropriate 'config.log'.

 My guess is that you forgot to edit the 'libc.so' script resulting
from the glibc-build, it is for a native-GCC as default and has the
famous '/lib/libc.so.6 /usr/lib/libc_nonshared.a' still there...

Cheers, Kai


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list