A few 'long double'-related tests include math_private.h just for
their variety of math_ldbl.h, which contains macros for assembling and
disassembling the binary representation of 'long double'. math_ldbl.h
insists on being included from math_private.h, but if we relax this
restriction (and fix some portability sloppiness) we can use it
directly and not have to expose all of math_private.h to the testsuite.
* sysdeps/generic/math_private.h: Use __BIG_ENDIAN and
__LITTLE_ENDIAN, not BIG_ENDIAN and LITTLE_ENDIAN.
* sysdeps/generic/math_ldbl.h
* sysdeps/ia64/fpu/math_ldbl.h
* sysdeps/ieee754/ldbl-128/math_ldbl.h
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h
* sysdeps/ieee754/ldbl-96/math_ldbl.h
* sysdeps/powerpc/fpu/math_ldbl.h
* sysdeps/x86_64/fpu/math_ldbl.h:
Allow direct inclusion. Use uintNN_t instead of u_intNN_t.
Use __BIG_ENDIAN and __LITTLE_ENDIAN, not BIG_ENDIAN and
LITTLE_ENDIAN. Include endian.h and/or stdint.h if necessary.
Add copyright notices.
* sysdeps/ieee754/ldbl-128ibm/math_ldbl.h (ldbl_canonicalize_int):
Don't use EXTRACT_WORDS64.
* sysdeps/ieee754/ldbl-96/test-canonical-ldbl-96.c
* sysdeps/ieee754/ldbl-96/test-totalorderl-ldbl-96.c
* sysdeps/ieee754/ldbl-128ibm/test-canonical-ldbl-128ibm.c
* sysdeps/ieee754/ldbl-128ibm/test-totalorderl-ldbl-128ibm.c:
Include math_ldbl.h, not math_private.h.
----------------------------------------------------------
Notes on how to update libm based on Intel's libm releases
----------------------------------------------------------
This source code in this directory is currently based on Intel libm
v2.1 as available from:
http://www.intel.com/software/products/opensource/libraries/num.htm
To ease importing, fix some bugs, and simplify integration into libc,
it is also necessary to apply the patch at:
ftp://ftp.hpl.hp.com/pub/linux-ia64/intel-libm-041228.diff.gz
The expectation is that Intel will integrate most if not all of these
changes into future releases of libm, so this patching step can
hopefully be omitted in the future.
Once the patched libm sources are extracted in a directory $LIBM, they
can be imported into the libc source tree at $LIBC with the following
step:
$ cd $LIBC/src/sysdep/ia64/fpu
$ ./import_intel_libm $LIBM
This should produce a number of "Importing..." messages, without
showing any errors.
At this point, you should be able to build glibc in the usual fashion.
We assume you do this in directory $OBJ. Once the build has
completed, run "make check" to verify that all (math) checks succeed.
If these checks succeed, you should also run the following commands to
verify that the new libm doesn't pollute the name-space and has proper
size-info for the data objects:
$ cd $LIBC/src/sysdep/ia64/fpu
$ import_check $OBJ/math/
There should be no (unexpected) errors reported by this script.
As an optional step, you may also want to confirm that the new libm
exports the exact same global symbols as the old one.
If you want to see the changes introduced by the "import_intel_libm"
script, you can run the commands:
$ cd $LIBC/src/sysdep/ia64/fpu
$ import_diffs
That's it.