* Re: Macintosh / Intel
@ 2006-03-29 19:28 Erik Schnetter
0 siblings, 0 replies; 5+ messages in thread
From: Erik Schnetter @ 2006-03-29 19:28 UTC (permalink / raw)
To: gsl-discuss; +Cc: Brian Gough, darren
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
My original patch was unfortunately wrong. This one actually works.
Sorry.
-erik
--
Erik Schnetter <schnetter@cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
[-- Attachment #2: gsl.diff --]
[-- Type: application/octet-stream, Size: 8380 bytes --]
diff -ruN old/gsl-1.7/config.h.in new/gsl-1.7/config.h.in
--- old/gsl-1.7/config.h.in 2005-09-13 05:18:05.000000000 -0500
+++ new/gsl-1.7/config.h.in 2006-03-28 16:17:44.000000000 -0600
@@ -188,6 +188,7 @@
#undef HAVE_NETBSD_IEEE_INTERFACE
#undef HAVE_OPENBSD_IEEE_INTERFACE
#undef HAVE_DARWIN_IEEE_INTERFACE
+#undef HAVE_DARWIN86_IEEE_INTERFACE
/* Define this is IEEE comparisons work correctly (e.g. NaN != NaN) */
#undef HAVE_IEEE_COMPARISONS
diff -ruN old/gsl-1.7/configure.ac new/gsl-1.7/configure.ac
--- old/gsl-1.7/configure.ac 2005-09-13 04:45:03.000000000 -0500
+++ new/gsl-1.7/configure.ac 2006-03-28 16:20:49.000000000 -0600
@@ -233,9 +233,12 @@
*-*-irix*)
ac_cv_c_ieee_interface=irix
;;
- *-*-*darwin*)
+ powerpc-*-*darwin*)
ac_cv_c_ieee_interface=darwin
;;
+ *86-*-*darwin*)
+ ac_cv_c_ieee_interface=darwin86
+ ;;
*-*-*netbsd*)
ac_cv_c_ieee_interface=netbsd
;;
@@ -285,6 +288,7 @@
AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE)
AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE)
AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
+AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
diff -ruN old/gsl-1.7/ieee-utils/Makefile.am new/gsl-1.7/ieee-utils/Makefile.am
--- old/gsl-1.7/ieee-utils/Makefile.am 2004-09-11 08:45:47.000000000 -0500
+++ new/gsl-1.7/ieee-utils/Makefile.am 2006-03-28 16:34:31.000000000 -0600
@@ -4,7 +4,7 @@
libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c
-noinst_HEADERS = fp-aix.c fp-darwin.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c
+noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c
INCLUDES= -I$(top_builddir)
diff -ruN old/gsl-1.7/ieee-utils/fp-darwin86.c new/gsl-1.7/ieee-utils/fp-darwin86.c
--- old/gsl-1.7/ieee-utils/fp-darwin86.c 1969-12-31 18:00:00.000000000 -0600
+++ new/gsl-1.7/ieee-utils/fp-darwin86.c 2006-03-28 16:36:29.000000000 -0600
@@ -0,0 +1,204 @@
+/* ieee-utils/fp-darwin86.c
+ *
+ * Copyright (C) 2006 Erik Schnetter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <gsl/gsl_ieee_utils.h>
+#include <gsl/gsl_errno.h>
+
+/* Here is the dirty part. Set up your 387 through the control word
+ * (cw) register.
+ *
+ * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0
+ * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM
+ *
+ * IM: Invalid operation mask
+ * DM: Denormalized operand mask
+ * ZM: Zero-divide mask
+ * OM: Overflow mask
+ * UM: Underflow mask
+ * PM: Precision (inexact result) mask
+ *
+ * Mask bit is 1 means no interrupt.
+ *
+ * PC: Precision control
+ * 11 - round to extended precision
+ * 10 - round to double precision
+ * 00 - round to single precision
+ *
+ * RC: Rounding control
+ * 00 - rounding to nearest
+ * 01 - rounding down (toward - infinity)
+ * 10 - rounding up (toward + infinity)
+ * 11 - rounding toward zero
+ *
+ * IC: Infinity control
+ * That is for 8087 and 80287 only.
+ *
+ * The hardware default is 0x037f which we use.
+ */
+
+/* masking of interrupts */
+#define _FPU_MASK_IM 0x01
+#define _FPU_MASK_DM 0x02
+#define _FPU_MASK_ZM 0x04
+#define _FPU_MASK_OM 0x08
+#define _FPU_MASK_UM 0x10
+#define _FPU_MASK_PM 0x20
+
+/* precision control */
+#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */
+#define _FPU_DOUBLE 0x200
+#define _FPU_SINGLE 0x0
+
+/* rounding control */
+#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */
+#define _FPU_RC_DOWN 0x400
+#define _FPU_RC_UP 0x800
+#define _FPU_RC_ZERO 0xC00
+
+#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */
+
+
+/* The fdlibm code requires strict IEEE double precision arithmetic,
+ and no interrupts for exceptions, rounding to nearest. */
+
+#define _FPU_DEFAULT 0x037f
+
+/* IEEE: same as above. */
+#define _FPU_IEEE 0x037f
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__)));
+
+/* Macros for accessing the hardware control word.
+
+ Note that the use of these macros is no sufficient anymore with
+ recent hardware. Some floating point operations are executed in
+ the SSE/SSE2 engines which have their own control and status register. */
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+
+
+#define _FPU_GETMXCSR(cw_sse) asm volatile ("stmxcsr %0" : "=m" (cw_sse))
+#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (cw_sse))
+
+
+
+int
+gsl_ieee_set_mode (int precision, int rounding, int exception_mask)
+{
+ fpu_control_t mode, mode_sse;
+
+ _FPU_GETCW (mode) ;
+ mode &= _FPU_RESERVED ;
+
+ switch (precision)
+ {
+ case GSL_IEEE_SINGLE_PRECISION:
+ mode |= _FPU_SINGLE ;
+ break ;
+ case GSL_IEEE_DOUBLE_PRECISION:
+ mode |= _FPU_DOUBLE ;
+ break ;
+ case GSL_IEEE_EXTENDED_PRECISION:
+ mode |= _FPU_EXTENDED ;
+ break ;
+ default:
+ mode |= _FPU_EXTENDED ;
+ }
+
+ switch (rounding)
+ {
+ case GSL_IEEE_ROUND_TO_NEAREST:
+ mode |= _FPU_RC_NEAREST ;
+ break ;
+ case GSL_IEEE_ROUND_DOWN:
+ mode |= _FPU_RC_DOWN ;
+ break ;
+ case GSL_IEEE_ROUND_UP:
+ mode |= _FPU_RC_UP ;
+ break ;
+ case GSL_IEEE_ROUND_TO_ZERO:
+ mode |= _FPU_RC_ZERO ;
+ break ;
+ default:
+ mode |= _FPU_RC_NEAREST ;
+ }
+
+ if (exception_mask & GSL_IEEE_MASK_INVALID)
+ mode |= _FPU_MASK_IM ;
+
+ if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
+ mode |= _FPU_MASK_DM ;
+
+ if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
+ mode |= _FPU_MASK_ZM ;
+
+ if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
+ mode |= _FPU_MASK_OM ;
+
+ if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
+ mode |= _FPU_MASK_UM ;
+
+ if (exception_mask & GSL_IEEE_TRAP_INEXACT)
+ {
+ mode &= ~ _FPU_MASK_PM ;
+ }
+ else
+ {
+ mode |= _FPU_MASK_PM ;
+ }
+
+ _FPU_SETCW (mode) ;
+
+ _FPU_GETMXCSR (mode_sse) ;
+ mode_sse &= 0xFFFF0000 ;
+
+ if (exception_mask & GSL_IEEE_MASK_INVALID)
+ mode_sse |= _FPU_MASK_IM << 7 ;
+
+ if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
+ mode_sse |= _FPU_MASK_DM << 7 ;
+
+ if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
+ mode_sse |= _FPU_MASK_ZM << 7 ;
+
+ if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
+ mode_sse |= _FPU_MASK_OM << 7 ;
+
+ if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
+ mode_sse |= _FPU_MASK_UM << 7 ;
+
+ if (exception_mask & GSL_IEEE_TRAP_INEXACT)
+ {
+ mode_sse &= ~ _FPU_MASK_PM << 7 ;
+ }
+ else
+ {
+ mode_sse |= _FPU_MASK_PM << 7 ;
+ }
+
+ _FPU_SETMXCSR (mode_sse) ;
+
+ return GSL_SUCCESS ;
+}
diff -ruN old/gsl-1.7/ieee-utils/fp.c new/gsl-1.7/ieee-utils/fp.c
--- old/gsl-1.7/ieee-utils/fp.c 2003-07-25 10:18:11.000000000 -0500
+++ new/gsl-1.7/ieee-utils/fp.c 2006-03-28 16:17:28.000000000 -0600
@@ -32,11 +32,10 @@
#include "fp-openbsd.c"
#elif HAVE_DARWIN_IEEE_INTERFACE
#include "fp-darwin.c"
+#elif HAVE_DARWIN86_IEEE_INTERFACE
+#include "fp-darwin86.c"
#elif HAVE_DECL_FEENABLEEXCEPT || HAVE_DECL_FESETTRAPENABLE
#include "fp-gnuc99.c"
#else
#include "fp-unknown.c"
#endif
-
-
-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Macintosh / Intel
@ 2006-03-29 16:52 Erik Schnetter
0 siblings, 0 replies; 5+ messages in thread
From: Erik Schnetter @ 2006-03-29 16:52 UTC (permalink / raw)
To: gsl-discuss; +Cc: Brian Gough, darren
[-- Attachment #1.1: Type: text/plain, Size: 564 bytes --]
Darren,
thanks for your initial attempt at making gsl work on Intel Macs. I
think I have improved on your patch. I include my version below. It
is a diff starting from gsl 1.7. I have taken code from libgfortran,
which is part of gcc and is distributed under the LGPL.
Brian,
the file i386/fp_regs.h to which you refer does not exist (on Darwin
8.5.2).
-erik
--
Erik Schnetter <schnetter@cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
[-- Attachment #1.2: gsl.diff --]
[-- Type: application/octet-stream, Size: 5794 bytes --]
diff -ruN old/gsl-1.7/config.h.in new/gsl-1.7/config.h.in
--- old/gsl-1.7/config.h.in 2005-09-13 05:18:05.000000000 -0500
+++ new/gsl-1.7/config.h.in 2006-03-28 16:17:44.000000000 -0600
@@ -188,6 +188,7 @@
#undef HAVE_NETBSD_IEEE_INTERFACE
#undef HAVE_OPENBSD_IEEE_INTERFACE
#undef HAVE_DARWIN_IEEE_INTERFACE
+#undef HAVE_DARWIN86_IEEE_INTERFACE
/* Define this is IEEE comparisons work correctly (e.g. NaN != NaN) */
#undef HAVE_IEEE_COMPARISONS
diff -ruN old/gsl-1.7/configure.ac new/gsl-1.7/configure.ac
--- old/gsl-1.7/configure.ac 2005-09-13 04:45:03.000000000 -0500
+++ new/gsl-1.7/configure.ac 2006-03-28 16:20:49.000000000 -0600
@@ -233,9 +233,12 @@
*-*-irix*)
ac_cv_c_ieee_interface=irix
;;
- *-*-*darwin*)
+ powerpc-*-*darwin*)
ac_cv_c_ieee_interface=darwin
;;
+ *86-*-*darwin*)
+ ac_cv_c_ieee_interface=darwin86
+ ;;
*-*-*netbsd*)
ac_cv_c_ieee_interface=netbsd
;;
@@ -285,6 +288,7 @@
AC_SUBST(HAVE_NETBSD_IEEE_INTERFACE)
AC_SUBST(HAVE_OPENBSD_IEEE_INTERFACE)
AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
+AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
diff -ruN old/gsl-1.7/ieee-utils/Makefile.am new/gsl-1.7/ieee-utils/Makefile.am
--- old/gsl-1.7/ieee-utils/Makefile.am 2004-09-11 08:45:47.000000000 -0500
+++ new/gsl-1.7/ieee-utils/Makefile.am 2006-03-28 16:34:31.000000000 -0600
@@ -4,7 +4,7 @@
libgslieeeutils_la_SOURCES = print.c make_rep.c gsl_ieee_utils.h env.c fp.c read.c
-noinst_HEADERS = fp-aix.c fp-darwin.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c
+noinst_HEADERS = fp-aix.c fp-darwin.c fp-darwin86.c fp-hpux.c fp-hpux11.c fp-irix.c fp-gnum68k.c fp-gnuppc.c fp-solaris.c fp-gnusparc.c fp-sunos4.c fp-tru64.c fp-unknown.c fp-gnux86.c fp-freebsd.c fp-os2emx.c fp-netbsd.c fp-openbsd.c fp-gnuc99.c endian.c standardize.c
INCLUDES= -I$(top_builddir)
diff -ruN old/gsl-1.7/ieee-utils/fp-darwin86.c new/gsl-1.7/ieee-utils/fp-darwin86.c
--- old/gsl-1.7/ieee-utils/fp-darwin86.c 1969-12-31 18:00:00.000000000 -0600
+++ new/gsl-1.7/ieee-utils/fp-darwin86.c 2006-03-28 16:36:29.000000000 -0600
@@ -0,0 +1,113 @@
+/* ieee-utils/fp-darwin86.c
+ *
+ * Copyright (C) 2006 Erik Schnetter
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <gsl/gsl_ieee_utils.h>
+#include <gsl/gsl_errno.h>
+
+#define _FPU_MASK_IM 0x01
+#define _FPU_MASK_DM 0x02
+#define _FPU_MASK_ZM 0x04
+#define _FPU_MASK_OM 0x08
+#define _FPU_MASK_UM 0x10
+#define _FPU_MASK_PM 0x20
+
+#define _FPU_GETCW(cw) asm volatile ("fnstcw %0" : "=m" (cw))
+#define _FPU_SETCW(cw) asm volatile ("fldcw %0" : : "m" (cw))
+#define _FPU_GETMXCSR(cw_sse) asm volatile ("stmxcsr %0" : "=m" (cw_sse))
+#define _FPU_SETMXCSR(cw_sse) asm volatile ("ldmxcsr %0" : : "m" (cw_sse))
+
+
+
+int
+gsl_ieee_set_mode (int precision, int rounding, int exception_mask)
+{
+ unsigned short mode ;
+ unsigned short cw;
+ unsigned int cw_sse;
+
+ switch (precision)
+ {
+ case GSL_IEEE_SINGLE_PRECISION:
+ mode |= _FPU_SINGLE ;
+ break ;
+ case GSL_IEEE_DOUBLE_PRECISION:
+ mode |= _FPU_DOUBLE ;
+ break ;
+ case GSL_IEEE_EXTENDED_PRECISION:
+ mode |= _FPU_EXTENDED ;
+ break ;
+ default:
+ mode |= _FPU_EXTENDED ;
+ }
+
+ switch (rounding)
+ {
+ case GSL_IEEE_ROUND_TO_NEAREST:
+ mode |= _FPU_RC_NEAREST ;
+ break ;
+ case GSL_IEEE_ROUND_DOWN:
+ mode |= _FPU_RC_DOWN ;
+ break ;
+ case GSL_IEEE_ROUND_UP:
+ mode |= _FPU_RC_UP ;
+ break ;
+ case GSL_IEEE_ROUND_TO_ZERO:
+ mode |= _FPU_RC_ZERO ;
+ break ;
+ default:
+ mode |= _FPU_RC_NEAREST ;
+ }
+
+ if (exception_mask & GSL_IEEE_MASK_INVALID)
+ mode |= _FPU_MASK_IM ;
+
+ if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
+ mode |= _FPU_MASK_DM ;
+
+ if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
+ mode |= _FPU_MASK_ZM ;
+
+ if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
+ mode |= _FPU_MASK_OM ;
+
+ if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
+ mode |= _FPU_MASK_UM ;
+
+ if (exception_mask & GSL_IEEE_TRAP_INEXACT)
+ {
+ mode &= ~ _FPU_MASK_PM ;
+ }
+ else
+ {
+ mode |= _FPU_MASK_PM ;
+ }
+
+ _FPU_GETCW (cw) ;
+ cw &= 0x0000 ;
+ cw |= mode ;
+ _FPU_SETCW (cw) ;
+
+ _FPU_GETMXCSR (cw_sse) ;
+ cw_sse &= 0xFFFF0000;
+ cw_sse |= mode << 7;
+ _FPU_SETMXCSR (cw_sse) ;
+
+ return GSL_SUCCESS ;
+}
diff -ruN old/gsl-1.7/ieee-utils/fp.c new/gsl-1.7/ieee-utils/fp.c
--- old/gsl-1.7/ieee-utils/fp.c 2003-07-25 10:18:11.000000000 -0500
+++ new/gsl-1.7/ieee-utils/fp.c 2006-03-28 16:17:28.000000000 -0600
@@ -32,11 +32,10 @@
#include "fp-openbsd.c"
#elif HAVE_DARWIN_IEEE_INTERFACE
#include "fp-darwin.c"
+#elif HAVE_DARWIN86_IEEE_INTERFACE
+#include "fp-darwin86.c"
#elif HAVE_DECL_FEENABLEEXCEPT || HAVE_DECL_FESETTRAPENABLE
#include "fp-gnuc99.c"
#else
#include "fp-unknown.c"
#endif
-
-
-
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Macintosh / Intel
@ 2006-03-02 19:40 Darren Foltinek
0 siblings, 0 replies; 5+ messages in thread
From: Darren Foltinek @ 2006-03-02 19:40 UTC (permalink / raw)
To: Brian Gough; +Cc: gsl-discuss
I got GSL to compile by hacking the ieee-utils functionality.
1) Added ieee-utils/fp-darwin-x86.c with no support for runtime
defining of FP precision, rounding or exceptions (just an empty
gsl_ieee_set_mode function returning GSL_SUCCESS), suggested by
Richard Mather.
2) Modified ieee-utils/fp.c to include fp-darwin-x86.c, switched
by...
3) the HAVE_DARWNX86_IEEE_INTERFACE that I added to config.h
It was beyond my hacking skills to get configure to generate the
config.h file with the new DARWINX86 flag.
Certainly not a proper solution, but it works for now... :-)
Tried yesterday to build a universal library - no success. Very
complex. :-(
- Darren
From: Brian Gough <bjg@network-theory.co.uk>
Date: Thursday, March 2, 2006 12:23 pm
Subject: Re: Macintosh / Intel
> Darren Foltinek writes:
> > We are using the GSL library on Mac/PPC machines, and
recently
> > got one of the new Intel-based Macs.
> >
> > Trying to compile GSL on the Intel Mac, it does not use the
> correct
> > ieee-utils/fp-* code and so the compile fails.
> >
> > This machine has, in it's /usr/include/architecture directory
> BOTH
> > a "ppc" subdirectory and an "i386" subdirectory.
> >
> > The config.guess script correctly identifies the machine as
> "i386-
> > apple-darwin8.4.1".
>
> Hello,
>
> If you change the line
>
> #include <architecture/ppc/fp_regs.h>
>
> in ieee-utils/fp-darwin.c to
>
> #include <architecture/i386/fp_regs.h>
>
> does it work?
>
> --
> Brian Gough
>
> Network Theory Ltd,
> Publishing the GSL Manual --- http://www.network-
> theory.co.uk/gsl/manual/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Macintosh / Intel
2006-02-28 17:36 Darren Foltinek
@ 2006-03-02 19:23 ` Brian Gough
0 siblings, 0 replies; 5+ messages in thread
From: Brian Gough @ 2006-03-02 19:23 UTC (permalink / raw)
To: darren; +Cc: gsl-discuss
Darren Foltinek writes:
> We are using the GSL library on Mac/PPC machines, and recently
> got one of the new Intel-based Macs.
>
> Trying to compile GSL on the Intel Mac, it does not use the correct
> ieee-utils/fp-* code and so the compile fails.
>
> This machine has, in it's /usr/include/architecture directory BOTH
> a "ppc" subdirectory and an "i386" subdirectory.
>
> The config.guess script correctly identifies the machine as "i386-
> apple-darwin8.4.1".
Hello,
If you change the line
#include <architecture/ppc/fp_regs.h>
in ieee-utils/fp-darwin.c to
#include <architecture/i386/fp_regs.h>
does it work?
--
Brian Gough
Network Theory Ltd,
Publishing the GSL Manual --- http://www.network-theory.co.uk/gsl/manual/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Macintosh / Intel
@ 2006-02-28 17:36 Darren Foltinek
2006-03-02 19:23 ` Brian Gough
0 siblings, 1 reply; 5+ messages in thread
From: Darren Foltinek @ 2006-02-28 17:36 UTC (permalink / raw)
To: gsl-discuss
Hi all,
We are using the GSL library on Mac/PPC machines, and recently
got one of the new Intel-based Macs.
Trying to compile GSL on the Intel Mac, it does not use the correct
ieee-utils/fp-* code and so the compile fails.
From my poking around in the code, the floating point architecture
code seems to be switched by the HAVE_****_IEEE_INTERFACE
#define in config.h. I tried changing it from
"HAVE_DARWIN_IEEE_INTERFACE" to
"HAVE_GNUX86_IEEE_INTERFACE" but that did not work, resulting
in an error of:
fp-gnux86.c:21:25: error: fpu_control.h: No such file or directory
This machine has, in it's /usr/include/architecture directory BOTH
a "ppc" subdirectory and an "i386" subdirectory.
The config.guess script correctly identifies the machine as "i386-
apple-darwin8.4.1".
I'm willing to put some time in to get this going, if somebody could
help point me in the right direction that would be much
appreciated!
Thanks,
- Darren
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-29 19:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-29 19:28 Macintosh / Intel Erik Schnetter
-- strict thread matches above, loose matches on Subject: below --
2006-03-29 16:52 Erik Schnetter
2006-03-02 19:40 Darren Foltinek
2006-02-28 17:36 Darren Foltinek
2006-03-02 19:23 ` 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).