Lets take one step back - take a look at Kimmo Mustonen's original message:
-------
./configure --target=powerpc-linux --prefix=/tmp/cross --nfp
make TARGET_CONFIGDIRS=
make install
PATH=/tmp/cross/bin:$PATH
export PATH
cd /tmp/cross/src
bzip2 -dc /m/nfs/data/readwrite/sipo-external/gcc-4.0.2.tar.bz2 \
| tar -xf -
mkdir -p gcc-4.0.2-obj
cd gcc-4.0.2-obj
../gcc-4.0.2/configure --target=powerpc-linux --with-cpu=603e --nfp \
--prefix=/tmp/cross --enable-shared --enable-languages="c" \
--with-newlib --disable-threads
make TARGET_CONFIGDIRS=
-------
So we both have just built and installed a new binutils (2.16 for Kimmo,
2.15 for me) using a native gcc (2.95 for Kimmo, 3.2.2 for me) and we
are now trying to build the first-stage gcc cross-compiler (4.0.2 for
Kimmo, 4.0.1 for me). My suggestion to Kimmo was to change his gcc
configure to remove enable-shared and replace it with disable-shared.
Because of this change I am able to get further through the first-step
gcc cross-compiler build - though is does not successfully complete.
After I run the gcc configure I run make to build the gcc cross
compiler. This is what is failing with the message that it cannot create
executables - this is from within the make script, and yes I understand
that the "compiler" is not who actually makes the "executable". I have
also tried setting my path to $PREFIX/$TARGET/bin:$PATH to point at the
newly built tools but the configure for gcc fails when I do this. So
still have not figured out the right combination to build the gcc cross
compiler. I cannot successfully run "make install-gcc" because I cannot
build gcc for the powerpc-motorola-linux target.
Thanks
Frank
Kai Ruottu wrote:
Frank Beesley wrote:
"../gcc-4.0.1/configure --prefix=$PREFIX --target=$TARGET
--disable-nls --disable-shared --enable-languages=c --without-headers
--with-newlib"
"make"
I get farther then the message you have but it still fails with:
checking for powerpc-motorola-linux-gcc...
/rpm/ppc/build/gcc/gcc/xgcc -B/rpm/ppc/build/gcc/gcc/
-B/opt/ppc/powerpc-motorola-linux/bin/
-B/opt/ppc/powerpc-motorola-linux/lib/ -isystem
/opt/ppc/powerpc-motorola-linux/include -isystem
/opt/ppc/powerpc-motorola-linux/sys-include
checking for C compiler default output file name... configure: error:
C compiler cannot create executables
What do you think being required for "creating executables" ? If you
know this quite basic thing about "C compilers", then you also know why
it cannot create them !
In the GCC world, "creating executables" is very far from "compiling",
but in the Windoze MSVC, BCC etc. cases "compiling" is considered being
just the same thing as "creating executables" !
So, believe me or not, this error message is really misleading or just
a fact in the GCC world: A "C compiler" never creates executables there,
it doesn't even "create objects", one needs an assembler from the GNU
binutils or some "native 'as'" for this task... What kind of tool
creates executables and what kind of components will be required
additionally with the "compiled & assembled" object created from the
"hello world" C source, will be leaved to you as a homework to find
out...
In your case I would try writing :
make install-gcc
and then try "compiling" a Hello World in order to see what happens:
powerpc-motorola-linux-gcc -v -O2 -o hello-test hello.c
Can it create this 'hello-test' executable at all? What very obvious is
still missing