__sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
Daniel Jacobowitz
drow@mvista.com
Tue Jan 13 16:01:00 GMT 2004
On Tue, Jan 13, 2004 at 04:50:30PM +0100, Denis J Barrow wrote:
> Hi Ulrich,
> Dan Jacobwitz posted this patch
> http://sources.redhat.com/ml/libc-alpha/2003-07/msg00177.html
>
> 6 months ago & the --without-fp target for powerpc 32 bit has been broken &
> neglected for this 6 months
> or at least till yesterdays cvs head.
>
> I suggest that this patch + possibly Ronald McGrath's suggestion in reply
> to this are accepted & integrated into glibc or something equivalent
> or better is done.
Here, have an updated patch. Untested.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2004-01-13 Daniel Jacobowitz <drow@mvista.com>
* sysdeps/powerpc/nofpu/sim-full.c (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Declare with
hidden data and nocommon.
* sysdeps/powerpc/nofpu/soft-supp.h (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Use
libc_hidden_proto.
* sysdeps/powerpc/soft-fp/sfp-machine.h (__sim_exceptions)
(__sim_disabled_exceptions, __sim_round_mode): Likewise.
Index: sysdeps/powerpc/nofpu/sim-full.c
===================================================================
RCS file: /big/fsf/rsync/glibc-cvs/libc/sysdeps/powerpc/nofpu/sim-full.c,v
retrieving revision 1.1
diff -u -p -r1.1 sim-full.c
--- sysdeps/powerpc/nofpu/sim-full.c 19 Oct 2002 20:06:29 -0000 1.1
+++ sysdeps/powerpc/nofpu/sim-full.c 13 Jan 2004 15:57:27 -0000
@@ -1,5 +1,5 @@
/* Software floating-point exception handling emulation.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -23,12 +23,15 @@
#include "soft-supp.h"
/* Global to store sticky exceptions. */
-int __sim_exceptions;
+int __sim_exceptions __attribute__ ((nocommon));
+libc_hidden_data_def (__sim_exceptions);
/* By default, no exceptions should trap. */
int __sim_disabled_exceptions = 0xffffffff;
+libc_hidden_data_def (__sim_disabled_exceptions);
-int __sim_round_mode;
+int __sim_round_mode __attribute__ ((nocommon));
+libc_hidden_data_def (__sim_round_mode);
void
__simulate_exceptions (int x)
Index: sysdeps/powerpc/nofpu/soft-supp.h
===================================================================
RCS file: /big/fsf/rsync/glibc-cvs/libc/sysdeps/powerpc/nofpu/soft-supp.h,v
retrieving revision 1.1
diff -u -p -r1.1 soft-supp.h
--- sysdeps/powerpc/nofpu/soft-supp.h 19 Oct 2002 20:06:29 -0000 1.1
+++ sysdeps/powerpc/nofpu/soft-supp.h 13 Jan 2004 15:57:38 -0000
@@ -1,5 +1,5 @@
/* Internal support stuff for complete soft float.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002.
This file is part of the GNU C Library.
@@ -27,7 +27,11 @@ typedef union
} fenv_union_t;
-extern int __sim_exceptions attribute_hidden;
-extern int __sim_disabled_exceptions attribute_hidden;
-extern int __sim_round_mode attribute_hidden;
+extern int __sim_exceptions;
+libc_hidden_proto (__sim_exceptions);
+extern int __sim_disabled_exceptions;
+libc_hidden_proto (__sim_disabled_exceptions);
+extern int __sim_round_mode;
+libc_hidden_proto (__sim_round_mode);
+
extern void __simulate_exceptions (int x) attribute_hidden;
Index: sysdeps/powerpc/soft-fp/sfp-machine.h
===================================================================
RCS file: /big/fsf/rsync/glibc-cvs/libc/sysdeps/powerpc/soft-fp/sfp-machine.h,v
retrieving revision 1.2
diff -u -p -r1.2 sfp-machine.h
--- sysdeps/powerpc/soft-fp/sfp-machine.h 17 Oct 2002 23:13:03 -0000 1.2
+++ sysdeps/powerpc/soft-fp/sfp-machine.h 13 Jan 2004 15:56:39 -0000
@@ -52,7 +52,11 @@
#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex)
#define FP_ROUNDMODE __sim_round_mode
-extern int __sim_exceptions attribute_hidden;
-extern int __sim_disabled_exceptions attribute_hidden;
-extern int __sim_round_mode attribute_hidden;
+extern int __sim_exceptions;
+libc_hidden_proto (__sim_exceptions);
+extern int __sim_disabled_exceptions;
+libc_hidden_proto (__sim_disabled_exceptions);
+extern int __sim_round_mode;
+libc_hidden_proto (__sim_round_mode);
+
extern void __simulate_exceptions (int x) attribute_hidden;
More information about the Libc-alpha
mailing list