Hello!
I have a working powerpc-linux cross-compiling setup using binutils 2.16.1
and gcc-2.95.3 on i386. Unfortunately I should upgrade it because
a) this gcc version works for building kernel 2.4 but not kernel 2.6
b) this gcc version works on i386 host but x86_64 host is not supported
I have tried to upgrade to gcc versions 3.0, 3.4.3, 3.4.4, 4.0.0 and 4.0.2
but haven't been able to get any of them built but it fails quite early
stage (the first step while still using newlib).
The log files contain the build scripts upto this stage:
1) A working version using gcc-2.95.3:
http://users.tkk.fi/u/kmustone/cross2953.log.txt
2) A non-working version using gcc-4.0.2 complaining about for
instance pthread.h being missing. Configure, however, does not notice this
problem or does not care about it (does not automatically use
--disable-threads):
http://users.tkk.fi/u/kmustone/cross402.log.txt
3) A non-working version using gcc-4.0.2 --disable-threads. Looks quite
promising until crti.o is missing.
http://users.tkk.fi/u/kmustone/cross402disablethreads.log.txt
"...powerpc-linux/bin/ld: crti.o: No such file: ..."
Where should this file come from? If not from gcc itself, the only other
possible source at this point is binutils, but it is the same version that
is working with gcc-2.95.3. If from gcc, why doesn't it get built or why
isn't it found? There are some crti.asm or crti.s files under
gcc-4.0.2/gcc/config/* but didn't see any obvious PowerPC-version
there.
The build script used for gcc-4.0.2:
---8<---8<---
#!/bin/sh
set -e
mkdir -p /tmp/cross
mkdir -p /tmp/cross/src
cd /tmp/cross/src
bzip2 -dc /m/nfs/data/readwrite/sipo-external/binutils-2.16.1.tar.bz2 \
| tar -xf -
cd binutils-2.16.1
./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=
---8<---8<---
Essentially the same steps work for gcc-2.95.3 but not any later version.
The host system is i386 Fedora Core 1 using linux kernel 2.4.31 but I have
also other host environments that don't work any better.
Any suggestions?
Regards,
Kimmo Mustonen