This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

glibc on sparc32-softfloat sqrt error.


Hello!
I am trying to cross-compile glibc-2.8-20080602  for
sparc-softfloat-linux-gnu arch with gcc-4.1.2 and catch following
error:

../sysdeps/sparc/sparc32/e_sqrt.c:29: warning: function declaration
isn't a prototype
../sysdeps/sparc/sparc32/e_sqrt.c: In function '__ieee754_sqrt':
../sysdeps/sparc/sparc32/e_sqrt.c:32: error: can't find a register in
class 'FP_REGS' while reloading  'asm'

File ../sysdeps/sparc/sparc32/e_sqrt.c contains following code

/* Return the square root of X.  */
double
__ieee754_sqrt (x)
     double x;
{
  register double result;
  asm ("fsqrtd %1, %0" : "=f" (result) : "f" (x));       // <--- Error
here
  return result;
}

I guess, that compiler (gcc+softfloat) refuses to compile fsqrtd instruction.

Have you got any ideas what to do?

Some other data:

i am using gentoo crossdev toolchain.

ABI:   default
CBUILD:   i686-pc-linux-gnu
CHOST:   i686-pc-linux-gnu
CTARGET:   sparc-softfloat-linux-gnu
CBUILD_OPT:
CTARGET_OPT:   sparcv9-unknown-linux-gnu
CC:
CFLAGS:    -pipe -fcall-used-g6 -O2 -fno-strict-aliasing


   Configuring GLIBC for nptl with:
          --disable-nls
          --disable-stackguard-randomization
          --enable-old-ssp-compat
          --without-fp
          --enable-add-ons=nptl,c_stubs,libidn,ports
          --enable-kernel=2.6.9
          --without-selinux
          --without-cvs
          --enable-bind-now
          --build=i686-pc-linux-gnu
          --host=sparcv9-unknown-linux-gnu
          --disable-profile
          --without-gd
          --with-headers=/usr/sparc-softfloat-linux-gnu/usr/include
          --prefix=/usr
          --libdir=/usr/lib
          --mandir=/usr/share/man
          --infodir=/usr/share/info
          --libexecdir=/usr/lib/misc/glibc


-- 
Thanks,
Sergey


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