R-beta: R-0.61.3 and __setfpucw.

Goran Brostrom gb at stat.umu.se
Tue May 12 12:34:19 CEST 1998


On 12 May 1998, Peter Dalgaard BSA wrote:

> Goran Brostrom <gb at stat.umu.se> writes:
> 
> > 
> > 
> > I have Linux, Redhat 4.2, on two machines, an i586 and a Sparc.
> > When I compile R-0.61.3 on them, everything is fine on i586,
> > but on the Sparc I get, in the last linking stage: 
> > 
> > ../lib/libunix.a(system.o): In function `main':
> > /usr/local/R-0.61.3/src/unix/system.c:353: undefined reference to
> > `__setfpucw'
> > ../lib/libunix.a(system.o): In function `R_CleanUp':
> > /usr/local/R-0.61.3/src/unix/system.c:430: undefined reference to
> > `__setfpucw'
> 
> Using __setfpucw is a horrible hack in the first place... 
> 
> You could try simply commenting it out. Or study <fpu_control.h> and
> guess what the mechanism is supposed to be on Sparc Linux.

I commented out two (identical) lines in src/unix/system.c:

/*	__setfpucw(_FPU_DEFAULT); */

and the compilation worked alright. The file /usr/include/fpu_control.h:

#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H

#if defined(__i386__)
# include <i386/fpu_control.h>
#elif defined(__mc68000__)
# include <m68k/fpu_control.h>
#elif defined(__sparc__)
# include <sparc/fpu_control.h>
#else
# error architecture not supported by Linux C library
#endif 

#endif /* _FPU_CONTROL_H */

Is __sparc__ automatically defined? In sparc/fpu_control.h there
is a line

extern void __setfpucw __P ((unsigned short));

but __setfpucw doesn't seem to be defined somewhere. I don't 
understand the significance of all this, but maybe it doesn't
matter?

Goran
---------------------------------------------------------
Goran Brostrom
Department of Statistics              tel: +46 90 786-5223
Umea University                       fax: +46 90 786-6614
S-90187 Umea, Sweden               e-mail: gb at stat.umu.se
----------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list