yann@1
|
1 |
Sender: libc-alpha-owner@sources.redhat.com
|
yann@1
|
2 |
Date: Tue, 29 Jul 2003 17:49:47 -0400
|
yann@1
|
3 |
From: Daniel Jacobowitz <drow@mvista.com>
|
yann@1
|
4 |
To: GNU C Library <libc-alpha@sources.redhat.com>
|
yann@1
|
5 |
Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
|
yann@1
|
6 |
Message-ID: <20030729214947.GA29932@nevyn.them.org>
|
yann@1
|
7 |
|
yann@1
|
8 |
On Tue, Jul 29, 2003 at 02:53:33PM -0700, Dan Kegel wrote:
|
yann@1
|
9 |
> On ppc405, I'm getting the following when linking glibc's libm:
|
yann@1
|
10 |
> /gcc-3.3-glibc-2.3.2/build-glibc/math/libm_pic.a(fclrexcpt.os)(.text+0x1a):
|
yann@1
|
11 |
> In function `feclearexcept@GLIBC_2.1':
|
yann@1
|
12 |
> : undefined reference to `__sim_exceptions'
|
yann@1
|
13 |
>
|
yann@1
|
14 |
> That symbol seems to be present in libc.so. nm shows
|
yann@1
|
15 |
|
yann@1
|
16 |
--without-fp doesn't work. Try this. Make up a changelog entry if it
|
yann@1
|
17 |
works.
|
yann@1
|
18 |
|
yann@1
|
19 |
Date: Tue, 29 Jul 2003 14:56:50 -0700
|
yann@1
|
20 |
Message-Id: <200307292156.h6TLuol24356@magilla.sf.frob.com>
|
yann@1
|
21 |
From: Roland McGrath <roland@redhat.com>
|
yann@1
|
22 |
To: Daniel Jacobowitz <drow@mvista.com>
|
yann@1
|
23 |
Cc: GNU C Library <libc-alpha@sources.redhat.com>
|
yann@1
|
24 |
Subject: Re: __sim_exceptions undefined when linking glibc-2.3.2's libm.so with --without-fp
|
yann@1
|
25 |
In-Reply-To: Daniel Jacobowitz's message of Tuesday, 29 July 2003 17:49:47 -0400 <20030729214947.GA29932@nevyn.them.org>
|
yann@1
|
26 |
|
yann@1
|
27 |
> +int __sim_exceptions __attribute__ ((section(".bss")));
|
yann@1
|
28 |
|
yann@1
|
29 |
Use __attribute__ ((nocommon)) instead (and please watch the standard
|
yann@1
|
30 |
whitespace conventions, i.e. ``section ('').
|
yann@1
|
31 |
|
yann@1
|
32 |
diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c
|
yann@1
|
33 |
--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/sim-full.c 2002-10-19 16:06:29.000000000 -0400
|
yann@1
|
34 |
+++ glibc-2.3.2/sysdeps/powerpc/nofpu/sim-full.c 2003-05-14 15:10:42.000000000 -0400
|
yann@1
|
35 |
@@ -24,11 +24,14 @@
|
yann@1
|
36 |
|
yann@1
|
37 |
/* Global to store sticky exceptions. */
|
yann@1
|
38 |
-int __sim_exceptions;
|
yann@1
|
39 |
+int __sim_exceptions __attribute__ ((nocommon));
|
yann@1
|
40 |
+libc_hidden_data_def (__sim_exceptions);
|
yann@1
|
41 |
|
yann@1
|
42 |
/* By default, no exceptions should trap. */
|
yann@1
|
43 |
int __sim_disabled_exceptions = 0xffffffff;
|
yann@1
|
44 |
+libc_hidden_data_def (__sim_disabled_exceptions);
|
yann@1
|
45 |
|
yann@1
|
46 |
-int __sim_round_mode;
|
yann@1
|
47 |
+int __sim_round_mode __attribute__ ((nocommon));
|
yann@1
|
48 |
+libc_hidden_data_def (__sim_round_mode);
|
yann@1
|
49 |
|
yann@1
|
50 |
void
|
yann@1
|
51 |
__simulate_exceptions (int x)
|
yann@1
|
52 |
diff -purN glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h
|
yann@1
|
53 |
--- glibc-2.3.2.orig/sysdeps/powerpc/nofpu/soft-supp.h 2002-10-19 16:06:29.000000000 -0400
|
yann@1
|
54 |
+++ glibc-2.3.2/sysdeps/powerpc/nofpu/soft-supp.h 2003-05-14 15:09:53.000000000 -0400
|
yann@1
|
55 |
@@ -27,7 +27,11 @@ typedef union
|
yann@1
|
56 |
} fenv_union_t;
|
yann@1
|
57 |
|
yann@1
|
58 |
|
yann@1
|
59 |
-extern int __sim_exceptions attribute_hidden;
|
yann@1
|
60 |
-extern int __sim_disabled_exceptions attribute_hidden;
|
yann@1
|
61 |
-extern int __sim_round_mode attribute_hidden;
|
yann@1
|
62 |
+extern int __sim_exceptions;
|
yann@1
|
63 |
+libc_hidden_proto (__sim_exceptions);
|
yann@1
|
64 |
+extern int __sim_disabled_exceptions;
|
yann@1
|
65 |
+libc_hidden_proto (__sim_disabled_exceptions);
|
yann@1
|
66 |
+extern int __sim_round_mode;
|
yann@1
|
67 |
+libc_hidden_proto (__sim_round_mode);
|
yann@1
|
68 |
+
|
yann@1
|
69 |
extern void __simulate_exceptions (int x) attribute_hidden;
|
yann@1
|
70 |
diff -urp glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h
|
yann@1
|
71 |
--- glibc-2.3.2.orig/sysdeps/powerpc/soft-fp/sfp-machine.h 2002-10-17 18:36:14.000000000 -0400
|
yann@1
|
72 |
+++ glibc-2.3.2/sysdeps/powerpc/soft-fp/sfp-machine.h 2003-05-14 16:48:13.000000000 -0400
|
yann@1
|
73 |
@@ -52,7 +52,11 @@
|
yann@1
|
74 |
#define FP_HANDLE_EXCEPTIONS __simulate_exceptions (_fex)
|
yann@1
|
75 |
#define FP_ROUNDMODE __sim_round_mode
|
yann@1
|
76 |
|
yann@1
|
77 |
-extern int __sim_exceptions attribute_hidden;
|
yann@1
|
78 |
-extern int __sim_disabled_exceptions attribute_hidden;
|
yann@1
|
79 |
-extern int __sim_round_mode attribute_hidden;
|
yann@1
|
80 |
+extern int __sim_exceptions;
|
yann@1
|
81 |
+libc_hidden_proto (__sim_exceptions);
|
yann@1
|
82 |
+extern int __sim_disabled_exceptions;
|
yann@1
|
83 |
+libc_hidden_proto (__sim_disabled_exceptions);
|
yann@1
|
84 |
+extern int __sim_round_mode;
|
yann@1
|
85 |
+libc_hidden_proto (__sim_round_mode);
|
yann@1
|
86 |
+
|
yann@1
|
87 |
extern void __simulate_exceptions (int x) attribute_hidden;
|
yann@1
|
88 |
|
yann@1
|
89 |
|