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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Clean script to build cross gcc3 from scratch


Hi,
I'm trying to write a clean script that build a complete crossgcc
toolchain (binutils, gcc3.0.4, and glibc) from scratch.
Bill's FAQ has been very helpful, but there are a lot of gotchas,
especially for the powerpc.  I've put my build script and documentation
online at
     http://www.dimator.org/~dimator/work/crossgcc/

It seems to work for sh4, but for ppc405 (which lacks an FPU)
I keep running into problems.  My current problem is it can't find
fenv_libc.h when building the final glibc.  Here is the line that fails:

/home2/dimator/opt//ppc405/bin/powerpc-linux-gcc
../sysdeps/powerpc/fclrexcpt.c -c -O2 -Wall -Winline -Wstrict-prototypes
-Wwrite-strings -g -mnew-mnemonics -Wa,-mppc -mpowerpc
-Wno-uninitialized -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES
-DNO_LONG_DOUBLE -D_Mlong_double_=double -I../include -I.
-I/home2/dimator/3rdParty/crosstools/glibc-ppc405/math -I.. -I../libio
-I/home2/dimator/3rdParty/crosstools/glibc-ppc405
-I../sysdeps/powerpc/elf -I../linuxthreads/sysdeps/unix/sysv/linux
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/powerpc -I../sysdeps/unix/sysv/linux/powerpc
-I../sysdeps/unix/sysv/linux -I../sysdeps/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../sysdeps/posix
-I../sysdeps/powerpc -I../sysdeps/wordsize-32
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64
-I../sysdeps/powerpc/soft-fp -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem
/home2/dimator/opt//ppc405/lib/gcc-lib/powerpc-linux/3.0.4/include
-isystem /home2/dimator/opt//ppc405/powerpc-linux/include/
-D_LIBC_REENTRANT -include ../include/libc-symbols.h     -I../soft-fp/
-o /home2/dimator/3rdParty/crosstools/glibc-ppc405/math/fclrexcpt.o
../sysdeps/powerpc/fclrexcpt.c:20:23: fenv_libc.h: No such file or directory
../sysdeps/powerpc/fclrexcpt.c: In function `__feclearexcept':
../sysdeps/powerpc/fclrexcpt.c:26: `fenv_union_t' undeclared (first use
in this function)
../sysdeps/powerpc/fclrexcpt.c:26: (Each undeclared identifier is
reported only once
../sysdeps/powerpc/fclrexcpt.c:26: for each function it appears in.)
../sysdeps/powerpc/fclrexcpt.c:26: parse error before "u"
../sysdeps/powerpc/fclrexcpt.c:29: `u' undeclared (first use in this
function)
../sysdeps/powerpc/fclrexcpt.c:29: warning: implicit declaration of
function `fegetenv_register'
../sysdeps/powerpc/fclrexcpt.c:32: `FPSCR_VX' undeclared (first use in
this function)
../sysdeps/powerpc/fclrexcpt.c:32: `FE_ALL_INVALID' undeclared (first
use in this function)
../sysdeps/powerpc/fclrexcpt.c:33: `FPSCR_STICKY_BITS' undeclared (first
use in this function)
../sysdeps/powerpc/fclrexcpt.c:36: warning: implicit declaration of
function `fesetenv_register'
make[2]: ***
[/home2/dimator/3rdParty/crosstools/glibc-ppc405/math/fclrexcpt.o] Error 1
make[2]: Leaving directory
`/home2/dimator/home/dank/ixia/Software/Source/linux/3rdParty/crosstools/glibc-2.2.5/math'
make[1]: *** [math/others] Error 2
make[1]: Leaving directory
`/home2/dimator/home/dank/ixia/Software/Source/linux/3rdParty/crosstools/glibc-2.2.5'
make: *** [all] Error 2

/home2/dimator/opt//ppc405/bin/powerpc-linux-gcc -v:
Reading specs from
/home2/dimator/opt//ppc405/lib/gcc-lib/powerpc-linux/3.0.4/specs
Configured with: ../gcc-3.0.4/configure --target=powerpc-linux
--build=i686-linux --program-prefix=powerpc-linux-
--prefix=/home2/dimator/opt//ppc405 --without-headers
--enable-languages=c --with-newlib --disable-shared --with-cpu=403
--without-fp
Thread model: single
gcc version 3.0.4

glibc's configure switches:
../glibc-2.2.5/configure  --host=powerpc-linux
--enable-add-ons=linuxthreads
--with-headers=/home2/dimator/opt//ppc405/powerpc-linux/include/
--prefix=/home2/dimator/opt//ppc405 --with-cpu=403 --without-fp

Can anyone see what I'm doing wrong?  Again, my full build script
is up at http://www.dimator.org/~dimator/work/crossgcc/

Thanks!




------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]