* Trouble building a cross compiler
@ 2002-04-15 1:00 Timothy Robb
2002-04-15 2:20 ` Sangmoon Kim
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Robb @ 2002-04-15 1:00 UTC (permalink / raw)
To: linuxppc-embedded
I'm having trouble building a cross compiler for a IBM PowerPC
403GB. I have a old ncd xterm and want it to boot linux as part
of a experiment I have planned.
So I downloaed
binutils 2.12.2
gcc 2.95.3
glib 2.2.5
linux 2.4.17
I have set the environment variables. TARGET=powerpc-linux
PREFIX=/usr/local/powerpc and PATH=$PATH:$PREFIX/bin
I built binutils with
configure --target=$TARGET --prefix=$PREFIX
make
make install
Now this works and the binutils get installed in $PREFIX
GCC
configure --target=$TARGET --prefix=$PREFIX --without-headers\
--with-newlib --disable-shared --enable-languages=c
make all-gcc
make install-gcc
Linux, here I just do a make menuconfig to get headers
make ARCH=powerpc CROSS_COMPILE=sh4-linux- menuconfig
(save the kernel settings. then copy headers)
cp -r linux/include/linux $PREFIX/$TARGET/include
cp -r linux/include/asm-ppc $PREFIX/$TARGET/include/asm
And this works...
Now the problem lies with my glibc. I do the following, which I got
from the instructions for building a sh4-linux target but with some
input for the embedded power pc stuff and it doesn't work.
CC=powerpc-linux-gcc AR=powerpc-linux-ar RANLIB=powerpc-linux-ranlib
configure --host=$TARGET --prefix=$PREFIX
--with-headers=$PREFIX/TARGET/include --disable-debug
--disable-profile --disable-sanity-checks
make
But this fails when I go to make it (where as when I do it for the sh4 it
works :( )
Please keep in mind I don't know what the following means so I am posting
only the last bit of the output which should be relavent.
make[2]: Entering directory `/root/cross/glibc-2.2.5/misc'
powerpc-linux-gcc
syslog.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mnew-
mnemonics -Wa,-mppc -mpowerpc -I../include -I. -I/root/cross/build-glib
c/misc -I.. -I../libio -I/root/cross/build-glibc -I../sysdeps/powerpc/elf -
I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux -I../sysdep
s/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../sysdeps/unix -I../sys
deps/posix -I../sysdeps/powerpc/fpu -I../sysdeps/powerpc -I../sysdeps/wordsi
ze-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/p
owerpc/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/ge
neric -nostdinc -isystem
/usr/local/powerpc/lib/gcc-lib/powerpc-linux/2.95.3/include -isystem
/usr/local/powerpc/powerpc-linux/include -include
nclude/libc-symbols.h -o /root/cross/build-glibc/misc/syslog.o
syslog.c: In function `vsyslog':
syslog.c:219: `cancel_handler' undeclared (first use in this function)
syslog.c:219: (Each undeclared identifier is reported only once
syslog.c:219: for each function it appears in.)
syslog.c:219: warning: type defaults to `int' in declaration of `__save_FCT'
syslog.c:272: called object is not a function
syslog.c: In function `openlog':
syslog.c:331: parse error before `)'
syslog.c:331: `__save_FCT' undeclared (first use in this function)
syslog.c:331: parse error before `)'
syslog.c:338: `__save_ARG' undeclared (first use in this function)
syslog.c: In function `closelog':
syslog.c:363: parse error before `)'
syslog.c:363: `__save_FCT' undeclared (first use in this function)
syslog.c:363: parse error before `)'
syslog.c:372: `__save_ARG' undeclared (first use in this function)
make[2]: *** [/root/cross/build-glibc/misc/syslog.o] Error 1
make[2]: Leaving directory `/root/cross/glibc-2.2.5/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/root/cross/glibc-2.2.5'
make: *** [all] Error 2
Any and all help would be appreciated.
Thank you,
Timothy Robb
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Trouble building a cross compiler
2002-04-15 1:00 Trouble building a cross compiler Timothy Robb
@ 2002-04-15 2:20 ` Sangmoon Kim
0 siblings, 0 replies; 2+ messages in thread
From: Sangmoon Kim @ 2002-04-15 2:20 UTC (permalink / raw)
To: Timothy Robb, linuxppc-embedded
> Now the problem lies with my glibc. I do the following, which I got
> from the instructions for building a sh4-linux target but with some
> input for the embedded power pc stuff and it doesn't work.
>
> CC=powerpc-linux-gcc AR=powerpc-linux-ar RANLIB=powerpc-linux-ranlib
> configure --host=$TARGET --prefix=$PREFIX
> --with-headers=$PREFIX/TARGET/include --disable-debug
> --disable-profile --disable-sanity-checks
> make
>
It seams like you forgot the linuxthreads thing.
Try this.
tar -xzf glibc-2.2.5.tar.gz
cd glibc-2.2.5
tar -xzf ../glibc-linuxthreads-2.2.5.tar.gz
cd ..
mkdir build-glibc; cd build-glibc
CC=${TARGET}-gcc AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
../glibc-2.2.5/configure --host=$TARGET --prefix=${PREFIX}/${TARGET} \
--enable-add-ons=linuxthreads --with-headers=${PREFIX}/${TARGET}/include \
2>&1 | tee configure.log
make all install info install-info 2>&1 | tee make.log
cd ..
- Sangmoon Kim -
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-15 2:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-15 1:00 Trouble building a cross compiler Timothy Robb
2002-04-15 2:20 ` Sangmoon Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).