Hi Aurelien!

I have been struggling the past days to get gcc-5 build on powerpcspe.

The build failed because gcc-5 relies on FPU emulation functions to be
present in the glibc where they are currently missing, unfortunately,
despite the fact that upstream glibc ships FPU emulation in the
"soft-fp" directory, for that matter.

Now, trying to build the glibc package (version 2.21) "as is" also
currently fails because the package is being built with the assumption
that the host machine support hardware FPU instructions which, of
course, fails.

Looking through the sources, I found:

        glibc-2.19/sysdeps/powerpc/preconfigure

which triggers e500 support depending on whether gcc ships its own
FPU emulation or not.

Now, since gcc-5 relies on the FPU emulation code to be present in
glibc, I tried to force-enable e500 support in glibc:

case "$machine" in
powerpc)
#  $CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null > conftest.i
#  if grep -q __NO_FPRS__ conftest.i && ! grep -q _SOFT_FLOAT
conftest.i; then
    base_machine=powerpc machine=powerpc/powerpc32/e500
#  fi
  rm -f conftest.i
  ;;
esac

However, the build still fails with the same problem that glibc tries
to use hardware FPU instructions:

../sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Assembler messages:
../sysdeps/powerpc/powerpc32/fpu/s_copysign.S:31: Error: unrecognized
opcode: `stfd'
../sysdeps/powerpc/powerpc32/fpu/s_copysign.S:37: Error: unrecognized
opcode: `fabs'
../sysdeps/powerpc/powerpc32/fpu/s_copysign.S:39: Error: unrecognized
opcode: `fnabs'

which surprises me given that selecting e500 should actually disable
these altogether and use the soft-fp code but apparently that doesn't
work.

Any idea how I can build glibc with soft-fp enabled so I can finally
build gcc-5?

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to