This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Need help to install a cross compiler for powerpc


Hi,

I am trying to build a cross compiler for powerpc on
Redhat 6.1.  I tried to follow the FAQ and did
something like this:

1. download 
binutils-2.9.1.tar.gz gcc-core-2.95.2.tar.gz
gcc-g++-2.95.2.tar.gz gdb-4.17.tar.gz
newlib-1.8.2.tar.gz

2.
My current directory is: /dn/cross/
cd /dn/cross
mkdir build-binutils build-gcc build-gdb build-newlib
mkdir install

tar xzvf binutils-2.9.1.tar.gz
tar xzvf gcc-core-2.95.2.tar.gz
tar gcc-g++-2.95.2.tar.gz

3. I try to build a cross-compiler for powerpc.
Following FAQ:

target=powerpc-eabi
prefix=/dn/cross/install

cd build-binutils
../binutils-2.9.1/configure --target=$target
--prefix=$prefix -v
make all install
cd ../build-gcc
../gcc-2.95.2/configure --target=$target
--prefix=$prefix
make all

I got the following error
stdlib.h  No such file or directory.
unistd.h  No such file or directory.

4.  After I read the mailing list.
I copied /usr/include to $prefix/$target/sub-include
I have one question:
Is /usr/include the right source for those header
file?

5. After I rerun the configure and make all, I got the
following error:
checking whether the C compiler
(/dn/cross/build-gcc/gcc/xgcc -B/dn/cross/build-
gcc/gcc/ -B/dn/cross/install/powerpc-eabi/bin/ -g -O2
) works... no
configure: error: installation or configuration
problem: C compiler cannot creat
e executables.
make[1]: Entering directory
`/dn/cross/build-gcc/powerpc-eabi/libio'
test x"no" != xyes ||\
  /dn/cross/build-gcc/gcc/xgcc
-B/dn/cross/build-gcc/gcc/ -B/dn/cross/install/po
werpc-eabi/bin/ -c -g -O2 -I.
-I../../../gcc-2.95.2/libio   ../../../gcc-2.95.2/
libio/filedoalloc.c -o pic/filedoalloc.o
/dn/cross/build-gcc/gcc/xgcc
-B/dn/cross/build-gcc/gcc/ -B/dn/cross/install/powe
rpc-eabi/bin/ -c -g -O2 -I.
-I../../../gcc-2.95.2/libio  ../../../gcc-2.95.2/lib
io/filedoalloc.c
In file included from
../../../gcc-2.95.2/libio/libio.h:30,
                 from
../../../gcc-2.95.2/libio/iolibio.h:1,
                 from
../../../gcc-2.95.2/libio/libioP.h:47,
                 from
../../../gcc-2.95.2/libio/filedoalloc.c:45:
_G_config.h:43: parse error before `_G_sigset_t'
_G_config.h:43: warning: data definition has no type
or storage class
make[1]: *** [filedoalloc.o] Error 1
make[1]: Leaving directory
`/dn/cross/build-gcc/powerpc-eabi/libio'
make: *** [all-target-libio] Error 2
[builder@prtpd320 build-gcc] 

Can anyone help me with those?
Thanks,
Ian Zhang

=====
Ian Zhang
hhzhang@yahoo.com


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]