diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-12-19 21:26:36 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-12-19 21:26:36 +0000 |
commit | eb983568758d85506a348ff63836a114584458b1 (patch) | |
tree | 3fc01beefe87af96a75a4a7cba87cef11c3c7390 /sysdeps/powerpc/powerpc32 | |
parent | 6eeb678ac0b2359bad8f709317185dcaf2a33dd6 (diff) | |
download | glibc-eb983568758d85506a348ff63836a114584458b1.zip glibc-eb983568758d85506a348ff63836a114584458b1.tar.gz glibc-eb983568758d85506a348ff63836a114584458b1.tar.bz2 |
Don't make soft-fp symbols compat symbols for powerpc-nofpu.
sysdeps/powerpc/powerpc32/libgcc-compat.S makes certain symbols that
glibc once accidentally reexported from libgcc into compat symbols.
Where the exports were purely accidental, this is the right thing to
do. However, for powerpc-nofpu the soft-fp symbols are deliberately
exported from libc, given public versions in
sysdeps/powerpc/nofpu/Versions and used by libm in preference to the
libgcc versions that do not support the software exceptions and
rounding modes. The libc versions should also be usable by user
programs, though normally libgcc gets linked in first (meaning,
effectively, that the <fenv.h> functions are broken as regards their
expected effects on user arithmetic).
A longstanding todo item is to remove the functions in question from
libgcc (when built with recent enough glibc) - that is, remove them
from static libgcc and make them compat symbols in shared libgcc - so
that this works properly (this is one of the items mentioned at
<http://gcc.gnu.org/wiki/Software_floating_point> - parts of that page
are obviously out of date, but this item still applies). Doing this
requires first that the functions are actually available from libc for
new links, not just as compat symbols.
This patch stops the symbols in question being compat symbols for
powerpc-nofpu. The nofpu Versions entries for them are removed (the
symbols never were exported at GLIBC_2.3.2, only GLIBC_2.0, because
the compat symbols took precedence).
Tested powerpc-nofpu. The symbols are no longer compat symbols and
libm.so now properly gets undefined references to them (resolved to
libc.so) instead of the libgcc copies getting linked into libm as
before.
* sysdeps/powerpc/powerpc32/libgcc-compat.S
[_SOFT_FLOAT || __NO_FPRS__] (__fixdfdi_v_glibc20): Do not define
as a macro and a compat symbol.
[_SOFT_FLOAT || __NO_FPRS__] (__fixsfdi_v_glibc20): Likewise.
[_SOFT_FLOAT || __NO_FPRS__] (__fixunsdfdi_v_glibc20): Likewise.
[_SOFT_FLOAT || __NO_FPRS__] (__fixunssfdi_v_glibc20): Likewise.
[_SOFT_FLOAT || __NO_FPRS__] (__floatdidf_v_glibc20): Likewise.
[_SOFT_FLOAT || __NO_FPRS__] (__floaddisf_v_glibc20): Likewise.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixdfdi): Do
not use .hidden.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixsfdi):
Likewise.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixunsdfdi):
Likewise.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixunssfdi):
Likewise.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__floaddidf):
Likewise.
[HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__floaddisf):
Likewise.
* sysdeps/powerpc/nofpu/Versions (libc): Remove __fixdfdi,
__fixsfdi, __fixunsdfdi, __fixunssfdi, __floatdidf and __floatdisf
from GLIBC_2.3.2.
Diffstat (limited to 'sysdeps/powerpc/powerpc32')
-rw-r--r-- | sysdeps/powerpc/powerpc32/libgcc-compat.S | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sysdeps/powerpc/powerpc32/libgcc-compat.S b/sysdeps/powerpc/powerpc32/libgcc-compat.S index 59c8c77..4ea870a 100644 --- a/sysdeps/powerpc/powerpc32/libgcc-compat.S +++ b/sysdeps/powerpc/powerpc32/libgcc-compat.S @@ -27,24 +27,28 @@ #define __lshrdi3_v_glibc20 INTUSE (__lshrdi3) #define __cmpdi2_v_glibc20 INTUSE (__cmpdi2) #define __ucmpdi2_v_glibc20 INTUSE (__ucmpdi2) -#define __fixdfdi_v_glibc20 INTUSE (__fixdfdi) -#define __fixsfdi_v_glibc20 INTUSE (__fixsfdi) -#define __fixunsdfdi_v_glibc20 INTUSE (__fixunsdfdi) -#define __fixunssfdi_v_glibc20 INTUSE (__fixunssfdi) -#define __floatdidf_v_glibc20 INTUSE (__floatdidf) -#define __floatdisf_v_glibc20 INTUSE (__floatdisf) +#if !defined _SOFT_FLOAT && !defined __NO_FPRS__ +# define __fixdfdi_v_glibc20 INTUSE (__fixdfdi) +# define __fixsfdi_v_glibc20 INTUSE (__fixsfdi) +# define __fixunsdfdi_v_glibc20 INTUSE (__fixunsdfdi) +# define __fixunssfdi_v_glibc20 INTUSE (__fixunssfdi) +# define __floatdidf_v_glibc20 INTUSE (__floatdidf) +# define __floatdisf_v_glibc20 INTUSE (__floatdisf) +#endif .symver __ashldi3_v_glibc20,__ashldi3@GLIBC_2.0 .symver __ashrdi3_v_glibc20,__ashrdi3@GLIBC_2.0 .symver __lshrdi3_v_glibc20,__lshrdi3@GLIBC_2.0 .symver __cmpdi2_v_glibc20,__cmpdi2@GLIBC_2.0 .symver __ucmpdi2_v_glibc20,__ucmpdi2@GLIBC_2.0 +#if !defined _SOFT_FLOAT && !defined __NO_FPRS__ .symver __fixdfdi_v_glibc20,__fixdfdi@GLIBC_2.0 .symver __fixunsdfdi_v_glibc20,__fixunsdfdi@GLIBC_2.0 .symver __fixsfdi_v_glibc20,__fixsfdi@GLIBC_2.0 .symver __fixunssfdi_v_glibc20,__fixunssfdi@GLIBC_2.0 .symver __floatdidf_v_glibc20,__floatdidf@GLIBC_2.0 .symver __floatdisf_v_glibc20,__floatdisf@GLIBC_2.0 +#endif #ifdef HAVE_DOT_HIDDEN .hidden __ashldi3 @@ -52,12 +56,14 @@ .hidden __lshrdi3 .hidden __cmpdi2 .hidden __ucmpdi2 +# if !defined _SOFT_FLOAT && !defined __NO_FPRS__ .hidden __fixdfdi .hidden __fixsfdi .hidden __fixunsdfdi .hidden __fixunssfdi .hidden __floatdidf .hidden __floatdisf +# endif #endif .section ".text" @@ -97,6 +103,7 @@ __ucmpdi2_v_glibc20: b __ucmpdi2@local .Lfe9: .size __ucmpdi2_v_glibc20,.Lfe9-__ucmpdi2_v_glibc20 +#if !defined _SOFT_FLOAT && !defined __NO_FPRS__ .align 2 .globl __fixdfdi_v_glibc20 .type __fixdfdi_v_glibc20,@function @@ -139,5 +146,6 @@ __floatdisf_v_glibc20: b __floatdisf@local .Lfe15: .size __floatdisf_v_glibc20,.Lfe15-__floatdisf_v_glibc20 +#endif #endif |