Re: glibc issues on powerpcspe

2016-03-11 Thread John Paul Adrian Glaubitz
On 03/11/2016 01:10 PM, John Paul Adrian Glaubitz wrote:
> There must be something I am overlooking which will enable soft-fp
> support in glibc.

Alright, we just need to pass "--without-fp" when building on
powerpcspe, see [1]. I'm surprised this happen by default
on powerpcspe.

Adrian

> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817926

-- 
 .''`.  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



Re: glibc issues on powerpcspe

2016-03-11 Thread John Paul Adrian Glaubitz
On 03/11/2016 08:42 AM, John Paul Adrian Glaubitz wrote:
> 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

And surprisingly, that doesn't help to enforce soft-fp emulation
to be enabled in glibc. During build, I can change into the build
directory and running objdump -t on the libc.so file will actually
list on of the required symbols (__unorddf2).

However, in the final glibc package, the symbol is missing again.

There must be something I am overlooking which will enable soft-fp
support in glibc.

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



glibc issues on powerpcspe

2016-03-10 Thread John Paul Adrian Glaubitz
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