svn commit: r257770 - head/lib/msun/src

Ian Lepore ian at FreeBSD.org
Thu Nov 7 19:58:05 UTC 2013


On Wed, 2013-11-06 at 23:44 +0000, Steve Kargl wrote:
> Author: kargl
> Date: Wed Nov  6 23:44:52 2013
> New Revision: 257770
> URL: http://svnweb.freebsd.org/changeset/base/257770
> 
> Log:
>   * Use "math.h" instead of <math.h>.
>   * Use bit twiddling.  This requires inclusion of math_private.h
>     and inclusion of float.h in s_roundl.c.  Raise invalid exception.
>   * Use literal integer constants where possible.  Let the compiler
>     do the appropriate conversion.
>   * In s_roundf.c, use an F suffix on float constants instead of
>     promoting float to double and then converting the result back
>     to float. In s_roundl.c, use an L suffix.
>   * In s_roundl.c, use the ENTERI and RETURNI macros.  This requires
>     the inclusion of fpmath.h and on __i386__ class hardware ieeefp.h.
>   
>   Reviewed by:	bde
> 
> Modified:
>   head/lib/msun/src/s_round.c
>   head/lib/msun/src/s_roundf.c
>   head/lib/msun/src/s_roundl.c
> [snip]

FYI, this seems to be causing build failures on non-x86 platforms.  For
example...

===> lib/msun (obj,depend,all,install)
cc  -fpic -DPIC  -O -pipe  -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include  -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.So
/local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'?
        GET_LDBL_EXPSIGN(hx, x);
        ^
/local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN'
  (i) = ge_u.xbits.expsign;                                     \
             ^
/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here
        } bits;
          ^
/local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'expsign' in 'struct IEEEl2bits::<anonymous at /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:37:2>'
        GET_LDBL_EXPSIGN(hx, x);
        ^~~~~~~~~~~~~~~~~~~~~~~
/local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:20: note: expanded from macro 'GET_LDBL_EXPSIGN'
  (i) = ge_u.xbits.expsign;                                     \
        ~~~~~~~~~~ ^
2 errors generated.
*** [s_roundl.So] Error code 1

bmake[3]: stopped in /local/build/staging/freebsd/bb/src/lib/msun
cc   -O -pipe  -I/local/build/staging/freebsd/bb/src/lib/msun/src -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/include  -I/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -c /local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c -o s_roundl.o
/local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'xbits' in 'union IEEEl2bits'; did you mean 'bits'?
        GET_LDBL_EXPSIGN(hx, x);
        ^
/local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:14: note: expanded from macro 'GET_LDBL_EXPSIGN'
  (i) = ge_u.xbits.expsign;                                     \
             ^
/local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:54:4: note: 'bits' declared here
        } bits;
          ^
/local/build/staging/freebsd/bb/src/lib/msun/src/s_roundl.c:45:2: error: no member named 'expsign' in 'struct IEEEl2bits::<anonymous at /local/build/staging/freebsd/bb/src/lib/msun/../libc/arm/_fpmath.h:37:2>'
        GET_LDBL_EXPSIGN(hx, x);
        ^~~~~~~~~~~~~~~~~~~~~~~
/local/build/staging/freebsd/bb/src/lib/msun/src/math_private.h:224:20: note: expanded from macro 'GET_LDBL_EXPSIGN'
  (i) = ge_u.xbits.expsign;                                     \
        ~~~~~~~~~~ ^
2 errors generated.
*** [s_roundl.o] Error code 1

bmake[3]: stopped in /local/build/staging/freebsd/bb/src/lib/msun

-- Ian




More information about the svn-src-all mailing list