Building PPC cross compiling environment...

kd at kd at
Tue Nov 30 04:37:35 EST 1999


Number one be shure you have the upto date utils. For example if you want
to compile the Glibc2.1 you need binutils newer than 2.9.4.something. This
applies also to the native tools.
To build the gcc2.95.2 you need a "new" egcs, gcc.2.7.x or egc 1.0.1 will
not do. Be careful to apply the cache patch to the glibc source if you are
building for embedded targets such as mpc823 or mpc860 (posted to the
linuxppc-embedded mailing list). If you have two compilers like in debian
slink (gcc 2.87.x and egcs), export the CC variable to use the egcc
compile, e.g.
export CC=egcc.
I believe tthat the gcc2.7.x is the default compiler in many systems
because egcs had problems compiling the kernel for some systems.

It is also a good idea to build the utils,compilers and libs in another
directory. I.e. at the same directorylevel as (e.g.) binutils-2.9.4 do
mkdir binbuild
cd binbuild
../binutils-2.9.4/configure --target=powerpc-linux --host=i586-linux
make install

Hope that this is of some help


                    "Steven J. Hill"                                                                                                           
                    <sjhill at>             To:     linuxppc-dev at                                                 
                    Sent by:                           cc:                                                                                     
                    owner-linuxppc-dev at        Subject:     Building PPC cross compiling environment...                                
                    11/29/99 04:13 PM                                                                                                          


I am attempting to build a cross compiling environment for PPC under
my RH 6.1 Linux system. I am new at this, however, I looked through
the mailing list archives, DejaNews, and a few other FAQs and was
unable to find anything on this. This my first attempt at this, I
beg for your patience. Please reply to me personally as I am not
subscribed to the list currently. Thanks.



configure --prefix=/usr --host=i386-linux-gnu --target=powerpc-linux
Created "Makefile" in /tmp/binutils- using "mt-frag"
collect2: ld returned 33 exit status
*** The command '/usr/bin/gcc -o conftest -g -O2   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


** Sent via the linuxppc-dev mail list. See

More information about the Linuxppc-dev mailing list