public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Failure building GSL-1.9 on FPU-less powerpc
@ 2007-08-23 11:03 Sergei Poselenov
  2007-08-27 21:26 ` Brian Gough
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Poselenov @ 2007-08-23 11:03 UTC (permalink / raw)
  To: gsl-discuss

Hello all,

I'm trying to build the GSL-19 on a PowerPC target which
does not have the hardware FPU. After configuration, 'make'
stops in ieee-utils:

/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I. -I.. -I..    -g -O2 -c -o fp.lo fp.c
  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -g -O2 -c fp.c  -fPIC -DPIC 
-o .libs/fp.o
In file included from fp.c:8:
fp-gnuppc.c: In function 'gsl_ieee_set_mode':
fp-gnuppc.c:53: error: '_FPU_RC_NEAREST' undeclared (first use in 
this function)
fp-gnuppc.c:53: error: (Each undeclared identifier is reported only once
fp-gnuppc.c:53: error: for each function it appears in.)
fp-gnuppc.c:56: error: '_FPU_RC_DOWN' undeclared (first use in this 
function)
fp-gnuppc.c:59: error: '_FPU_RC_UP' undeclared (first use in this 
function)
fp-gnuppc.c:62: error: '_FPU_RC_ZERO' undeclared (first use in this 
function)
fp-gnuppc.c:69: error: '_FPU_MASK_IM' undeclared (first use in this 
function)
fp-gnuppc.c:82: error: '_FPU_MASK_ZM' undeclared (first use in this 
function)
fp-gnuppc.c:85: error: '_FPU_MASK_OM' undeclared (first use in this 
function)
fp-gnuppc.c:88: error: '_FPU_MASK_UM' undeclared (first use in this 
function)
make[2]: *** [fp.lo] Error 1
make[2]: Leaving directory `/usr/src/denx/SPECS/gsl-1.9/ieee-utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/denx/SPECS/gsl-1.9'
make: *** [all] Error 2


Investigation shows that the problem is that the "configure"
script chose the "gnuppc" IEEE arithmetic interface type by default,
which assume the FPU is present on the target and included
fp-gnuppc.c into the build.

Then the compilation failed because fp-gnuppc.c tries to operate
the FPU hardware constants from fpu_control.h for FPU-aware
powerpcs; these constants are absent on my system.

How can I build GSL?

Thanks in advance,
Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Failure building GSL-1.9 on FPU-less powerpc
  2007-08-23 11:03 Failure building GSL-1.9 on FPU-less powerpc Sergei Poselenov
@ 2007-08-27 21:26 ` Brian Gough
  2007-08-28  9:32   ` Sergei Poselenov
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Gough @ 2007-08-27 21:26 UTC (permalink / raw)
  To: Sergei Poselenov; +Cc: gsl-discuss

At Thu, 23 Aug 2007 11:57:37 +0400,
Sergei Poselenov wrote:
> 
> Investigation shows that the problem is that the "configure"
> script chose the "gnuppc" IEEE arithmetic interface type by default,
> which assume the FPU is present on the target and included
> fp-gnuppc.c into the build.
> 
> Then the compilation failed because fp-gnuppc.c tries to operate
> the FPU hardware constants from fpu_control.h for FPU-aware
> powerpcs; these constants are absent on my system.
> 
> How can I build GSL?

You can comment out the HAVE_GNUPPC_IEEE_INTERFACE line in config.h to
disable that part.

-- 
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Failure building GSL-1.9 on FPU-less powerpc
  2007-08-27 21:26 ` Brian Gough
@ 2007-08-28  9:32   ` Sergei Poselenov
  2007-08-30 19:59     ` Brian Gough
  0 siblings, 1 reply; 4+ messages in thread
From: Sergei Poselenov @ 2007-08-28  9:32 UTC (permalink / raw)
  To: gsl-discuss

Hello Brian,


Brian Gough wrote:
> At Thu, 23 Aug 2007 11:57:37 +0400,
> Sergei Poselenov wrote:
>> Investigation shows that the problem is that the "configure"
>> script chose the "gnuppc" IEEE arithmetic interface type by default,
>> which assume the FPU is present on the target and included
>> fp-gnuppc.c into the build.
>>
>> Then the compilation failed because fp-gnuppc.c tries to operate
>> the FPU hardware constants from fpu_control.h for FPU-aware
>> powerpcs; these constants are absent on my system.
>>
>> How can I build GSL?
> 
> You can comment out the HAVE_GNUPPC_IEEE_INTERFACE line in config.h to
> disable that part.
> 

Yes, thank you for the hint, I've finally came to something
similar - set "ac_cv_c_ieee_interface" to "no" prior to running
"configure". This selected "#include fp-gnuc99.c" in fp.c with
HAVE_DECL_FEENABLEEXCEPT defined on my system.

Don't you think the system-wide fpu-control.h for fpu-less
systems should have _FPU_RC_NEAREST and others defined for
compatibility? They already have there:

#define _FPU_GETCW(cw) 0
#define _FPU_SETCW(cw) do { } while (0)


Regards,
Sergei

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Failure building GSL-1.9 on FPU-less powerpc
  2007-08-28  9:32   ` Sergei Poselenov
@ 2007-08-30 19:59     ` Brian Gough
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Gough @ 2007-08-30 19:59 UTC (permalink / raw)
  To: Sergei Poselenov; +Cc: gsl-discuss

At Tue, 28 Aug 2007 12:50:18 +0400,
Sergei Poselenov wrote:
> Don't you think the system-wide fpu-control.h for fpu-less
> systems should have _FPU_RC_NEAREST and others defined for
> compatibility? They already have there:
> 
> #define _FPU_GETCW(cw) 0
> #define _FPU_SETCW(cw) do { } while (0)

You'd have to ask on the GNU C Library mailing list about that I
guess.

If there is a simple patch to GSL that simplifies the compilation
without breaking anything, you could send it here.

-- 
Brian Gough

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-30 19:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23 11:03 Failure building GSL-1.9 on FPU-less powerpc Sergei Poselenov
2007-08-27 21:26 ` Brian Gough
2007-08-28  9:32   ` Sergei Poselenov
2007-08-30 19:59     ` Brian Gough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).