Another ? about building 64-bit compiler

vince vince at
Sat Jun 7 09:29:55 EST 2003

I thought I had a plan to get this 64-bit ppc compiler built
w/o messing with glibc but it didn't work. Here's what I did:

#Build binutils

export PREFIX=/project/tools/ppc_linux_2/suse/8.1/compilers/gnu/gcc/3.2_ppc64

mkdir binutils_build even to source(this is your obj tree) and cd into it

../binutils- --prefix=$PREFIX/binutils --enable-shared --t

Run "make 2>&1 | tee build.out"
Run "make install 2>&1 | tee install.out"

This built and installed.

#Build gcc

mkdir -p powerpc64-unknown-linux-gnu/lib
Populate with /opt/cross/powerpc64-linux/lib
# I had to do this as configure didn't like --with-libs as this wasn't
# a cross-compiler I was building.

Back in my build dir:
export PATH=$PREFIX/binutils/powerpc64-unknown-linux-gnu/bin:$PATH

../gcc-3.2/configure --prefix=$PREFIX --with-local-prefix=$PREFIX/default \
--with-as=$PREFIX/binutils/powerpc-unknown-linux-gnu/bin/as \
--with-ld=$PREFIX/binutils/powerpc-unknown-linux-gnu/bin/ld \
--enable-languages=c,c++ --enable-threads=posix --enable-shared \

I started the make, which failed complaining about /usr/lib/
being an incompatible library while linking something.

I figured I messed up by not editing the top-level makefile and
setting CC="/opt/cross/bin/powerpc64-linux-gcc"(it was set to "gcc")
so I tried that and, while I got past the failing linker command, I failed

/gcc/gcc_build_ppc64/gcc/xgcc -B/gcc/gcc_build_ppc64/gcc/ -B/project/tools/ppc_linux_2/suse/8.1/compilers/gnu/gcc/3.2_ppc64/powerpc64-unknown-linux-gnu/bin/ -B/project/tools/ppc_linux_2/suse/8.1/compilers/gnu/gcc/3.2_ppc64/powerpc64-unknown-linux-gnu/lib/ -isystem /project/tools/ppc_linux_2/suse/8.1/compilers/gnu/gcc/3.2_ppc64/powerpc64-unknown-linux-gnu/include -O2  -DIN_GCC  -mminimal-toc  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-3.2/gcc -I../../gcc-3.2/gcc/. -I../../gcc-3.2/gcc/config -I../../gcc-3.2/gcc/../include -fexceptions -c ../../gcc-3.2/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
xgcc: Internal error: Killed (program cc1)

So, I guess my question is...Am I on the right track? If I am, I need to
rebuild binutils with the cross-compiler rather than /usr/bin/gcc.

If you read all this, thanks! I'm a total newbie so if someone can
suggest a good book/URL that might help me, that would also be great.

/* Visit the home of the Rancid Tofu Experience */
/*   */

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

More information about the Linuxppc64-dev mailing list