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]

How to build glibc for ppc variant w/o floating point?



I'm trying to put together glibc-2.2.2 for a ppc variant w/o floating
point, and I'm not getting very far...

I've used the build-crossgcc.sh script to build the univers and that
succeeds fine.  I've used the resultant powerpc-linux-* tools to build
Linux kernels and they boot up fine, at least until they launch
/bin/init.  From kgdb sessions and trolling through
current->thread.regs, I find that the init thread still collects time,
but doesn't get past an nip of 0x10029138.  From addr2line I find:

$ powerpc-linux-addr2line -e user/init/init 0x10029138
/tmp/gnu-cross/glibc-2.2.2/math/../sysdeps/generic/setfpucw.c:29

When I look in there, I notice the at line 29 that it is trying ot
getch the current FPU control word using '_FPI_GETCW(cw)'
Unfortunately I don't have an FPU on my powerpc variant, and I don't
want to emulate an FPU in the kernel.  So I thought that if I build
glibc with out floating poing, I could get past the call the
__setfpucw() and see where it dies next.

I've tried to configure glibc-2.2.2 by:

$ ../glibc-2.2.2/configure  --host=powerpc-linux --prefix=/usr/local/wave/cross-linux-tools/powerpc-linux --enable-add-ons=linuxthreads --with-headers=/usr/local/wave/cross-linux-tools/powerpc-linux/include --nfp

which includes '--nfp' to not include floating point, and that blows
up trying to build glibc-2.2.2/sysdeps/powerpc/fclrexcpt.c because it
can't find 'fenv_libc.h' which is in sysdeps/powerpc/fpu/fenv_libc.h.

Here's the command line that failed:

make[2]: Entering directory `/tmp/gnu-cross/glibc-2.2.2/math' powerpc-linux-gcc ../sysdeps/powerpc/fclrexcpt.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mnew-mnemonics -Wa,-mppc -mpowerpc     -Wno-uninitialized  -I../include -I. -I/tmp/gnu-cross/build-glibc/math -I.. -I../libio  -I/tmp/gnu-cross/build-glibc -I../sysdeps/powerpc/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/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 /u!
!
!
sr/local/wave/cross-linux-tools/lib/gcc-lib/powerpc-linux/2.95.3/include -isystem /usr/local/wave/cross-linux-tools/powerpc-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -I../soft-fp/ -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -DNO_LONG_DOUBLE -D_Mlong_double_=double -o /tmp/gnu-cross/build-glibc/math/fclrexcpt.o
../sysdeps/powerpc/fclrexcpt.c:20: fenv_libc.h: No such file or directory
make[2]: *** [/tmp/gnu-cross/build-glibc/math/fclrexcpt.o] Error 1
make[2]: Leaving directory `/tmp/gnu-cross/glibc-2.2.2/math'
make[1]: *** [math/others] Error 2
make[1]: Leaving directory `/tmp/gnu-cross/glibc-2.2.2'
make: *** [all] Error 2

I notice that there's no '-msoft-float' argument to
powercp-linux-gcc, so I don't think that --nfp(or --without-fp) works
very well.

Does anybody have an idea if/how to buld glibc(and applications)
without using FPU instructions?

Thanks in advance,

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

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


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