[Liboil] liboil issue with float point cross compile?
f8cfe at free.fr
Sat Dec 3 10:06:26 PST 2005
On Sat, Dec 03, 2005 at 06:20:46PM +0200, Nathan Fain wrote:
> I've searched around both on the mailing list and and internet and couldn't find clues for the following problem. I am compiling liboil using a powerpc cross compiler and get this error:
> powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -Wall -Wa,-mregnames
> -D_BSD_SOURCE -D_GNU_SOURCE -I../.. -O2 -g -O2 -MT libpowerpc_la-conv.lo
> -MD -MP -MF .deps/libpowerpc_la-conv.Tpo -c conv.c -fPIC -DPIC -o
> conv.c: In function `clipconv_s8_f32_powerpc':
> conv.c:89: error: can't find a register in class `FLOAT_REGS' while
> reloading `asm'
> make: *** [libpowerpc_la-conv.lo] Error 1
> make: Leaving directory `/build/liboil-0.3.6/liboil/powerpc'
> configure line was:
> ./configure --host=powerpc-linux
> specifically this is for a powerpc 405 with light float point capabilities.
> Anyone have ideas? Where can I read more about the meaning of FLOAT_REGS?
405GP PowerPC has no FPU, not even light. Compilers generally use soft emulation.
BTW, the problem will be the same for some PowerPC's from Freescale which don't
have a traditional FPU, e.g. SPE, ..
To fix this problem, a check along what is done in m4/as-intrinsics.m4
should be done on powerpc-* systems to check if "lfd"/etc. assembly
instructions are available. Then with some autoconf magic and a define
like HAVE_PPC_FPU_INSTRUCTIONS, conditionaly compile conv.c.
Another solution is to find an option for soft-float gcc to make it
accept hard FPU instructions. Then, with a new OIL_IMPL_FLAG_PPC_FPU,
enable or disable implementation using powerprc fpu instructions.
Any other ideas?
More information about the Liboil