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.
powerpc-linux-gnuspe MPC8540/e500 float error
- From: Clemens Koller <clemens dot koller at anagramm dot de>
- To: crossgcc at sources dot redhat dot com
- Date: Mon, 24 Jan 2005 17:00:40 +0100
- Subject: powerpc-linux-gnuspe MPC8540/e500 float error
- Organization: Anagramm GmbH
Hello!
I am new to this list - so this is maybe a newbie question:
I have a PowerMac running Linux 2.6.10 and I want to
cross-compile for a Freescale MPC8540 PPC (Book E, e500, SPE)
machine.
Well, I finally need a compiler suite for this e500 architecture
which generates code for the e500...
Therefore I used Kumar Gala's patches
http://gate.crashing.org/~galak/crosstool-0.28-rc37-e500.patch.bz2
http://gate.crashing.org/~galak/crosstool-0.28-extra-patches.patch.bz2
for the latest crosstool-0.28-rc37
and did a demo-e500-ck.sh:
-----8<---------------------------------------------------------
#!/bin/sh
set -ex
TARBALLS_DIR=$HOME/cross/crossdownloads
RESULT_TOP=$HOME/cross/crosstool
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
EXTRA_PATCHES="spe"
export EXTRA_PATCHES
#BINUTILS_EXTRA_CONFIG="LDFLAGS=-all-static"
#export BINUTILS_EXTRA_CONFIG
#GCC_EXTRA_CONFIG="LDFLAGS=-static"
#export GCC_EXTRA_CONFIG
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
# Build the toolchain.
eval `cat powerpc-e500.dat gcc-3.4.3-e500-glibc-2.3.3-spe.dat` sh
all.sh -nounpack --builduserland --testlinux --notest
echo Done.
-----8<---------------------------------------------------------
But I got the following result (beside an error due to a missing
add-on directory 'spe' I had to create manually):
-----8<---------------------------------------------------------
make[2]: Entering directory
`/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3.3/gli
bc-2.3.3/math'
powerpc-linux-gnuspe-gcc ../sysdeps/powerpc/fpu/s_isnan.c -c -std=gnu99
-O -Wall -Winline -Wstrict-prototypes -Wwrite-st
rings -mnew-mnemonics -Wno-uninitialized -D__NO_MATH_INLINES
-D__LIBC_INTERNAL_MATH_INLINES -DNO_LONG_DOUBLE -D_Mlong
_double_=double -I../include -I.
-I/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc-2.3
.3/build-glibc/math -I.. -I../libio
-I/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/gcc-3.4.3-glibc
-2.3.3/build-glibc -I../sysdeps/powerpc/powerpc32/elf
-I../sysdeps/powerpc/elf -I../linuxthreads/sysdeps/unix/sysv/linux/
powerpc/powerpc32 -I../linuxthreads/sysdeps/unix/sysv/linux/powerpc
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxt
hreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linux
threads/sysdeps/powerpc/powerpc32 -I../linuxthreads/sysdeps/powerpc
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../s
ysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/m
man -I../sysdeps/unix/inet -I../sysdeps/unix/sysv
-I../sysdeps/unix/powerpc -I../sysdeps/unix -I../sysdeps/posix -I../sys
deps/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32
-I../sysdeps/wordsize-32 -I../sysdeps/powerpc/soft-fp -I../sysd
eps/powerpc/fpu -I../sysdeps/powerpc -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sy
sdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem
/home/clemens/cross/crosstool/powerpc-linux-gnuspe/gcc-3.4.3-gl
ibc-2.3.3/lib/gcc/powerpc-linux-gnuspe/3.4.3/include -isystem
/home/clemens/cross/crosstool/powerpc-linux-gnuspe/gcc-3.4.
3-glibc-2.3.3/powerpc-linux-gnuspe/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h -I../soft-fp/ -o /h
ome/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/
gcc-3.4.3-glibc-2.3.3/build-glibc/math/s_isnan.o -MD -MP -MF
/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/
gcc-3.4.3-glibc-2.3.3/build-glibc/math/s_isnan.o.dt
../sysdeps/powerpc/fpu/s_isnan.c: In function `__isnan':
../sysdeps/powerpc/fpu/s_isnan.c:44: error: can't find a register in
class `FLOAT_REGS' while reloading `asm'
../sysdeps/powerpc/fpu/s_isnan.c:47: error: can't find a register in
class `FLOAT_REGS' while reloading `asm'
make[2]: ***
[/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/
gcc-3.4.3-glibc-2.3.3/build-glibc/math/s_isnan.o] Error 1
make[2]: Leaving directory
`/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/
gcc-3.4.3-glibc-2.3.3/glibc-2.3.3/math'
make[1]: *** [math/subdir_lib] Error 2
make[1]: Leaving directory
`/home/clemens/cross/crosstool-0.28-rc37/build/powerpc-linux-gnuspe/
gcc-3.4.3-glibc-2.3.3/glibc-2.3.3'
make: *** [all] Error 2
-----8<---------------------------------------------------------
I was googling for this bug and found some similar thing about
in this list about 2 years ago but there was no solution for that.
Can you please help me to get this thing working?
And the other story:
I've tried to run the crosstools directly on the MPC8540 (e500)
target, but it fails to compile, too - it stops at:
-----8<---------------------------------------------------------
+ make ARCH=ppc oldconfig
HOSTCC scripts/basic/fixdep
fixdep: sizeof(int) != 4 or wrong endianess? 0x434f4e46
make[1]: *** [scripts/basic/fixdep] Error 2
make: *** [scripts_basic] Error 2
-----8<---------------------------------------------------------
I had a look at the code in fixdep.c... but I have no glue
where to continue my search for mistakes.
Thank you in advance,
Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany
http://www.anagramm.de
Phone: +49-89-741518-50
Fax: +49-89-741518-19
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com