svn commit: r242879 - in head/lib: libc/gen msun/src

Konstantin Belousov kostikbel at gmail.com
Sat Nov 10 21:43:50 UTC 2012


On Sat, Nov 10, 2012 at 09:22:10PM +0000, Dimitry Andric wrote:
> Author: dim
> Date: Sat Nov 10 21:22:10 2012
> New Revision: 242879
> URL: http://svnweb.freebsd.org/changeset/base/242879
> 
> Log:
>   Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in
>   libc.a and libc_p.a.  In addition, define isnan in libm.a and libm_p.a,
>   but not in libm.so.
>   
>   This makes it possible to statically link executables using both isnan
>   and isnanf with libc and libm.
>   
>   Tested by:	kargl
>   MFC after:	1 week
> 
> Modified:
>   head/lib/libc/gen/isnan.c
>   head/lib/msun/src/s_isnan.c
> 
> Modified: head/lib/libc/gen/isnan.c
> ==============================================================================
> --- head/lib/libc/gen/isnan.c	Sat Nov 10 21:09:17 2012	(r242878)
> +++ head/lib/libc/gen/isnan.c	Sat Nov 10 21:22:10 2012	(r242879)
> @@ -35,6 +35,7 @@
>   *     binary compat until we can bump libm's major version number.
>   */
>  
> +#ifdef PIC
>  __weak_reference(__isnan, isnan);
>  __weak_reference(__isnanf, isnanf);
>  
> @@ -55,3 +56,4 @@ __isnanf(float f)
>  	u.f = f;
>  	return (u.bits.exp == 255 && u.bits.man != 0);
>  }
> +#endif /* PIC */
> 
> Modified: head/lib/msun/src/s_isnan.c
> ==============================================================================
> --- head/lib/msun/src/s_isnan.c	Sat Nov 10 21:09:17 2012	(r242878)
> +++ head/lib/msun/src/s_isnan.c	Sat Nov 10 21:22:10 2012	(r242879)
> @@ -30,8 +30,9 @@
>  
>  #include "fpmath.h"
>  
> -/* Provided by libc */
> -#if 0
> +/* Provided by libc.so */
> +#ifndef PIC
> +#undef isnan
>  int
>  isnan(double d)
>  {
> @@ -40,7 +41,7 @@ isnan(double d)
>  	u.d = d;
>  	return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0));
>  }
> -#endif
> +#endif /* !PIC */
>  
>  int
>  __isnanf(float f)
So you broke ABI for libm ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20121110/b3a1ec64/attachment.sig>


More information about the svn-src-all mailing list