This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ #14582] Fix building of static programs with -mieee-fp


Hi,

Compiling a static program with -mieee-fp fails since _LIB_VERSION is
exported from libieee.a as well as libm.a.  Attached patch marks the
_LIB_VERSION in libm as a weak symbol so that the definition in
libieee overrides it.  Verified that there are no regressions in the
testsuite.

Siddhesh

	[BZ #14582]
	* sysdeps/ieee754/s_lib_version.c (_LIB_VERSION_INTERNAL):
	Renamed from _LIB_VERSION.
	(_LIB_VERSION): Set as weak alias of _LIB_VERSION_INTERNAL.

diff --git a/sysdeps/ieee754/s_lib_version.c b/sysdeps/ieee754/s_lib_version.c
index a377ab1..7abb3e0 100644
--- a/sysdeps/ieee754/s_lib_version.c
+++ b/sysdeps/ieee754/s_lib_version.c
@@ -25,16 +25,17 @@ static char rcsid[] = "$NetBSD: s_lib_version.c,v 1.6 1995/05/10 20:47:44 jtc Ex
  * define and initialize _LIB_VERSION
  */
 #ifdef _POSIX_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _POSIX_;
+_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _POSIX_;
 #else
 #ifdef _XOPEN_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _XOPEN_;
+_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _XOPEN_;
 #else
 #ifdef _SVID3_MODE
-_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;
+_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _SVID_;
 #else					/* default _IEEE_MODE */
-_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _IEEE_;
 #endif
 #endif
 #endif
 
+weak_alias (_LIB_VERSION_INTERNAL, _LIB_VERSION)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]