TR: Pb while building gcc-2.95.3 cross compiler for powerpc
J.N. Helal
jean-noel.helal@quadrille.fr
Wed Nov 19 17:12:00 GMT 2003
Hi
I'm trying to build a gcc-2.95.3 cross compiler for powerpc-linux. After
having looking after simular problems reported on the net, i'm looking for a
possible help for finding what is wrong in wat i did.
Regards
J.N. Helal
jean-noel.helal@quadrille.fr
0) I'm using a host i686-mandrake-linux and gcc 2.95.3 is installed as the
native C/C++ compiler
1) I have build and installed binutil 2.14 (providing gnu as, ld and ar)
using --target = powerpc-linux and --prefix=/usr/local: I can invoque gas:
-----------
GNU assembler 2.14 20030612
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `powerpc-linux'.
-bash-2.05b$
-----------
I can invoque ls:
GNU ld version 2.14 20030612
2) Following (Kai Ruottu) suggestion on the net i downloaded
glibc-2.2.1-devel binary PPC distribution from yellowdog web site and
- copied include to /usr/local/powerpc-linux/include
- copied sys-include to /usr/local/powerpc-linux/sys-include
- copied .o .a and .so to /usr/local/powerpc-linux/lib
3) I download the corresponding linux kernel headers
(kernel-headers-2.4.10-12) from yellowdog distribution and installed it into
/usr/local/powerpc-linux/include/linux
4) I use the gcc configure command as follow:
./configure --target=powerpc-linux --prefix=/usr/local --with-gnu-as --with-
gnu-ld
--with-header=/usr/local/powerpc-linux/include --with-header=/usr/local/powe
rpc-linux/sys-include --enable-threads=posix
5) then make all
-> after approximately 15 min here is the problem:
----------------------
make[2]: Entering directory
`/data/users/jeanno/gnu/gcc-2.95.3/powerpc-linux/lib
iberty'
make[2]: *** No targets specified and no makefile found. Stop.
make[2]: Leaving directory
`/data/users/jeanno/gnu/gcc-2.95.3/powerpc-linux/libi
berty'
make[1]: *** [../libiberty/libiberty.a] Error 2
make[1]: Leaving directory
`/data/users/jeanno/gnu/gcc-2.95.3/powerpc-linux/libs
tdc++'
make: *** [all-target-libstdc++] Error 2
------------------------------
seems that make do not find a makefile into powerpc/libiberty
6) so here is the config.log (one thing i remarked is that this file is not
created by ./configure but by the make all command: it does not exist after
./configure why.
------------------------------
.../...
configure:1749: checking whether the C compiler
(/data/users/jeanno/gnu/gcc-2.95.3/gcc/xgcc -B/data/users/jeanno/gnu/gcc-2.9
5.3/gcc/ -B/usr/local/powerpc-linux/bin/ -g -O2 ) works
configure:1765:
/data/users/jeanno/gnu/gcc-2.95.3/gcc/xgcc -B/data/users/jeanno/gnu/gcc-2.95
.3/gcc/ -B/usr/local/powerpc-linux/bin/ -o conftest -g -O2 conftest.c
1>&5
/usr/local/powerpc-linux/bin/ld: skipping incompatible /lib/libc.so.6 when
searching for /lib/libc.so.6
/usr/local/powerpc-linux/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
configure: failed program was:
#line 1760 "configure"
#include "confdefs.h"
main(){return(0);}
------------------------------
seems that the configure fail because /usr/local/powerpc-linux/ld (gld)
search libc into /lib instead of /usr/local/powerpc-linux/lib ...
Is this resulting into not producing the required Makefile ?
7) i reinstalled binutils 2.11 instead of 2.14 and tried ti build gcc cross
compiler. The result is nearly just the same but this time ld message
changed to "unable to load symbols" wich is consistent with the idea ld
search into native lib path ...
Thanks again
More information about the Gcc-bugs
mailing list