[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] status of glibc for e500/mpc8540 ?



Hi all,

Sorry this is not a patch, but a quick search with google for my current
problem showed me that the interesting people read this :)

I am trying to build from scratch a linux for a MPC8540-based board,
following the current instructions on trac.cross-lfs.org.

I use linux-2.6.23.1, binutils-2.18, gcc-4.2.2, and glibc-2.7.

The compilation of glibc-2.17 by my powerpc-linuxspe targetted gcc fails
with :

In file included from ../sysdeps/powerpc/powerpc32/fpu/s_isnan.c:1:
../sysdeps/powerpc/fpu/s_isnan.c:59: warning: conflicting types for built-in fun
ction 'isnanf'
../sysdeps/powerpc/fpu/s_isnan.c: In function '__isnan':
../sysdeps/powerpc/fpu/s_isnan.c:45: error: impossible constraint in 'asm'
../sysdeps/powerpc/fpu/s_isnan.c:48: error: impossible constraint in 'asm'

A quick search reveals that the culprit asm sequences are :
  ({ fenv_t env; asm volatile ("mffs %0" : "=f" (env)); env; })
and
  ({ double d = (env); asm volatile ("mtfsf 0xff,%0" : : "f" (d)); })

I did not check precisely, but I surmise that "f" is a constraint that
exists in an original powerpc, but not in the e500, and that the problem is
not only those asm sequences, but that glibc does not incorporate a port
for the e500.

So my question is : what is the currently recommended approach to get
a SPE compatible C-library on my MPC8540 board ?

Thanks for reading this far.

Philippe De Muyter