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

Andreas Jaeger aj@suse.com
Sun May 12 09:09:00 GMT 2013


On 05/10/2013 02:08 PM, Siddhesh Poyarekar wrote:
> 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.

Thanks, this is ok,

Andreas

> 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)
>


-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list