0.65 HPUX/AIX update

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Wed, 28 Jul 1999 13:42:40 +0200 (CEST)


>>>>> Thomas Vogels writes:

> Kurt,

>   thanks for the changes.  I've downloaded the snapshot on July 22.
> It looks like we are in good shape now for AIX:

> "Kurt" == Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

Kurt> The current situation is as follows.
Kurt> 
Kurt> AIX:
Kurt> 
Kurt> * I still need f77 for linking.  Using ld with the suggested flags gives
Kurt> a binary with `exec format error'.  The problem seems to be with an
Kurt> unreferenced __start.

> I apologize for not seeing this earlier: "__start" is defined in
> /lib/crt0.o.  So all you have to do is add /lib/crt0.o to the objects
> when linking.  (You have to look carefully for that in the output from
> gcc --verbose anything.o to learn what gcc is doing when linking an
> executable.)

Thanks, done now.  `ld' now used for LDCMD and SHLIBLD, always use
/lib/crt0.o when linking the main binary.

Kurt> * The floating point (finite|isnan) stuff is strange, but under control,
Kurt> I think.  Plain cc works, gcc has a problem and seems to need having
Kurt> prototypes turned off for IEEE fp.  (More below.)

> Quick fix and insanity check:  Add the following lines at the end of Arith.h
>   #include <fp.h>
>   static int finite (double x) {
>         return FINITE (x);
>   }
> This will generate lots of warnings.  The resulting executable
> (compiled with gcc) works wrt Inf and NaN!  My current assumption is
> that there is a bug in gcc that generates the wrong inline version of
> finite.  Overwriting it solves the problem.  A better fix would be to
> ensure that finite is never called when configure finds that it is
> buggy.  (I believe that the issue whether finite () exists is a
> separate one.  So there should be two flags, like HAVE_FINITE and
> HAVE_FINITE_THAT_STINKS... )

Kurt> So there is a problem in the finite() test with gcc.  It somehow is
Kurt> related to the use of ANSI C prototypes, and disappears if we define
Kurt> _NO_PROTO.  I am in the process of adding this as a short term fix, but
Kurt> we should think a bit more about that.

Done, too.  I added a configure test for broken finite and in that case
we now do something special for AIX or the same as if finite was not
there otherwise.  (We can circumvent the warnings because what we really
need is R_FINITE(x), and that can be defined as you suggested.)

I consider AIX done now.  Any objections?

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._