summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h>Andreas Schwab2017-02-283-2/+7
| | | | The <bits/sigthread.h> header is included by <signal.h>, not <pthread.h>.
* sunrpc: Avoid use-after-free read access in clntudp_call [BZ #21115]Florian Weimer2017-02-274-2/+73
| | | | | | | | | | | After commit bc779a1a5b3035133024b21e2f339fe4219fb11c (CVE-2016-4429: sunrpc: Do not use alloca in clntudp_call [BZ #20112]), ancillary data is stored on the heap, but it is accessed after it has been freed. The test case must be run under a heap debugger such as valgrind to observe the invalid access. A malloc implementation which immediately calls munmap on free would catch this bug as well.
* Allow direct use of math_ldbl.h in testsuite.Zack Weinberg2017-02-2513-53/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Split DIAG_* macros to new header libc-diag.h.Zack Weinberg2017-02-2525-75/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few tests include libc-internal.h just for the DIAG_* macros. Split those macros to their own file, which can be included safely in _ISOMAC mode. I also moved ignore_value, since it seems logically related, even though I didn't notice any tests needing it. Also add -Wnonnull suppressions to two tests that _should_ have them, but the error is masked when compiling against internal headers. * include/libc-diag.h: New file. Define ignore_value, DIAG_PUSH_NEEDS_COMMENT, DIAG_POP_NEEDS_COMMENT, DIAG_IGNORE_NEEDS_COMMENT, and DIAG_IGNORE_Os_NEEDS_COMMENT here. * include/libc-internal.h: Definitions of above macros moved from here. Include libc-diag.h. Add copyright notice. * malloc/tst-malloc.c, malloc/tst-memcheck.c, malloc/tst-realloc.c * misc/tst-error1.c, posix/tst-dir.c, stdio-common/bug21.c * stdio-common/scanf14.c, stdio-common/scanf4.c, stdio-common/scanf7.c * stdio-common/test-vfprintf.c, stdio-common/tst-printf.c * stdio-common/tst-printfsz.c, stdio-common/tst-sprintf.c * stdio-common/tst-unlockedio.c, stdio-common/tstdiomisc.c * stdlib/bug-getcontext.c, string/tester.c, string/tst-endian.c * time/tst-strptime2.c, wcsmbs/tst-wcstof.c: Include libc-diag.h instead of libc-internal.h. * stdlib/tst-environ.c: Include libc-diag.h. Suppress -Wnonnull for call to unsetenv (NULL). * nptl/tst-mutex1.c: Include libc-diag.h. Suppress -Wnonnull for call to pthread_mutexattr_destroy (NULL).
* Clean up conditionals for declaration of gets.Zack Weinberg2017-02-259-43/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gets has the dubious honor of being the only C89 library feature that has been completely removed from the current C and C++ standards. glibc follows suit by not declaring it in _GNU_SOURCE mode either, but it remains present in older compatibility modes. Internally, two test cases need to see stdio.h make the declaration, but all our internal code is of course compiled under _GNU_SOURCE. This is currently kludged by duplicating the gets declaration, fortify wrapper and all, in include/stdio.h. Also, the conditional in the public headers for deciding when to declare gets is complicated and repeated in two places. This patch adds a new macro to features.h that encapsulates the complicated rule for when to declare gets. stdio.h and bits/stdio2.h then simply test __GLIBC_USE (DEPRECATED_GETS), and instead of having a duplicate gets declaration in include/stdio.h, debug/tst-chk1.c and stdio-common/tst-gets.c can force gets to be declared. * include/features.h (__GLIBC_USE_DEPRECATED_GETS): New macro. * libio/stdio.h, libio/bits/stdio2.h: Condition gets on __GLIBC_USE (DEPRECATED_GETS). Update comments to indicate gets was removed from C++ in C++14. * include/stdio.h: Remove redundant declaration of gets. * debug/tst-chk1.c, stdio-common/tst-gets.c: Force gets to be declared, since we are testing it. * stdio-common/Makefile (tst-gets.c): Compile with -Wno-deprecated-declarations. * debug/Makefile (tst-chk1.c, tst-chk2.c, tst-chk3.c, tst-chk4.cc) (tst-chk5.cc, tst-chk6.cc, tst-lfschk1.c, tst-lfschk2.c) (tst-lfschk3.c, tst-lfschk4.cc, tst-lfschk5.cc, tst-lfschk6.cc): Compile with -Wno-deprecated-declarations.
* Use independent type literals in libm-test-support.cTulio Magno Quites Machado Filho2017-02-242-9/+14
| | | | | * math/libm-test-support.c (check_ulp): Use LIT() around literal numbers.
* Get rid of duplicate const declaration specifier warning in tst-resolv-qtypes.c.Stefan Liebler2017-02-242-1/+6
| | | | | | | | | | | | | | Compiling resolv/tst-resolv-qtypes.c with GCC 7 results in: tst-resolv-qtypes.c:53:14: error: duplicate ‘const’ declaration specifier [-Werror=duplicate-decl-specifier] static const const char *domain = "www.example.com"; This patch removes the duplicate const and makes domain a const pointer to const char literal. ChangeLog: * resolv/tst-resolv-qtypes.c (domain): Change type to const pointer to const char.
* Run libm tests separately for each function.Joseph Myers2017-02-24161-973/+1512
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present, libm tests for each function get built into a single executable (for each floating point type, for each of normal / inline / finite-math-only functions, plus vector variants) and run together, resulting in a single PASS or FAIL (for each of those nine variants plus vector variants). Building this executable involves reading over 50 MB of libm-test-*.c sources. This patch arranges for tests of each function to be run separately from the makefiles instead. There are 121 functions being tested for each (type, variant pair) (actually 126, but run as 121 from the Makefile because each of the pairs (exp10, pow10), (isfinite, finite), (lgamma, gamma), (remainder, drem), (scalbn, ldexp), shares a table of test results and so is run together), so 1089 separate tests run from the Makefile, plus 48 vector tests on x86_64 (six functions for eight vector variants). Each test only involves a libm-test-<func>.c file of no more than about 4 MB, rather than all such files taking about 50 MB. With tests run separately, test summaries will indicate which functions actually have problems (of course, those problems may just be out-of-date libm-test-ulps files if the file hasn't been updated for the architecture in question recently). All the .c files for the 1089+48 tests are generated automatically from the Makefiles. Various checked-in boilerplate .c files are removed as no longer needed. CFLAGS definitions for the different kinds of tests are generated using makefile iterators to apply target-specific variable settings. libm-have-vector-test.h is no longer needed; the list of functions to test for each vector type is now in the sysdeps Makefile. This should reduce the amount of boilerplate needed for float128 testing support; test-float128.h will still be needed, but not various .c files or Makefile CFLAGS definitions. The logic for creating dependencies on libm-test-support-*.o files should also render <https://sourceware.org/ml/libc-alpha/2017-02/msg00279.html> unnecessary. Tested for x86_64 and x86. * math/Makefile (libm-tests-generated): Remove variable. (libm-tests-base-normal): New variable. (libm-tests-base-finite): Likewise. (libm-tests-base-inline): Likewise. (libm-tests-base): Likewise. (libm-tests-normal): Likewise. (libm-tests-finite): Likewise. (libm-tests-inline): Likewise. (libm-tests-vector): Likewise. (libm-tests): Define in terms of these new variables. (libm-tests-for-type): New variable. (libm-tests.o): Move definition. (tests): Move addition of $(libm-tests). (generated): Update for new and removed libm test files. ($(objpfx)libm-test.c): Remove target. ($(objpfx)libm-have-vector-test.h): Likewise. (CFLAGS-test-double-vlen2.c): Remove variable. (CFLAGS-test-double-vlen4.c): Likewise. (CFLAGS-test-double-vlen8.c): Likewise. (CFLAGS-test-float-vlen4.c): Likewise. (CFLAGS-test-float-vlen8.c): Likewise. (CFLAGS-test-float-vlen16.c): Likewise. (CFLAGS-test-float.c): Likewise. (CFLAGS-test-float-finite.c): Likewise. (CFLAGS-libm-test-support-float.c): Likewise. (CFLAGS-test-double.c): Likewise. (CFLAGS-test-double-finite.c): Likewise. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-test-ldouble.c): Likewise. (CFLAGS-test-ldouble-finite.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. (libm-test-inline-cflags): New variable. (CFLAGS-test-ifloat.c): Remove variable. (CFLAGS-test-idouble.c): Likewise. (CFLAGS-test-ildouble.c): Likewise. ($(addprefix $(objpfx), $(libm-tests.o))): Move target and update dependencies. ($(foreach t,$(libm-tests-normal),$(objpfx)$(t).c)): New rule. ($(foreach t,$(libm-tests-finite),$(objpfx)$(t).c)): Likewise. ($(foreach t,$(libm-tests-inline),$(objpfx)$(t).c)): Likewise. ($(foreach t,$(libm-tests-vector),$(objpfx)$(t).c)): Likewise. ($(foreach t,$(types),$(objpfx)libm-test-support-$(t).c)): Likewise. (dependencies on libm-test-support-*.o): Remove. ($(foreach f,$(libm-test-funcs-all),$(objpfx)$(o)-$(f).o)): New rules using iterators. ($(addprefix $(objpfx),$(call libm-tests-for-type,$(o)))): Likewise. ($(objpfx)libm-test-support-$(o).o): Likewise. ($(addprefix $(objpfx),$(filter-out $(tests-static) $(libm-vec-tests),$(tests)))): Filter out $(libm-tests-vector) instead. ($(addprefix $(objpfx), $(libm-vec-tests))): Use iterator to define rule instead. * math/README.libm-test: Update. * math/libm-test-acos.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-acosh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-asin.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-asinh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-atan.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-atan2.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-atanh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cabs.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cacos.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cacosh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-canonicalize.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-carg.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-casin.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-casinh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-catan.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-catanh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cbrt.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ccos.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ccosh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ceil.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cexp.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cimag.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-clog.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-clog10.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-conj.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-copysign.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cos.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cosh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cpow.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-cproj.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-creal.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-csin.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-csinh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-csqrt.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ctan.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ctanh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-erf.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-erfc.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-exp.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-exp10.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-exp2.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-expm1.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fabs.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fdim.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-floor.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fma.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fmax.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fmaxmag.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fmin.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fminmag.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fmod.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fpclassify.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-frexp.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fromfp.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-fromfpx.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-getpayload.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-hypot.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ilogb.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-iscanonical.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-iseqsig.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isfinite.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isgreater.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isgreaterequal.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isinf.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isless.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-islessequal.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-islessgreater.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isnan.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isnormal.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-issignaling.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-issubnormal.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-isunordered.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-iszero.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-j0.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-j1.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-jn.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-lgamma.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-llogb.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-llrint.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-llround.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-log.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-log10.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-log1p.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-log2.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-logb.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-lrint.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-lround.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-modf.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-nearbyint.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-nextafter.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-nextdown.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-nexttoward.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-nextup.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-pow.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-remainder.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-remquo.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-rint.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-round.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-roundeven.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-scalb.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-scalbln.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-scalbn.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-setpayload.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-setpayloadsig.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-signbit.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-significand.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-sin.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-sincos.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-sinh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-sqrt.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-tan.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-tanh.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-tgamma.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-totalorder.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-totalordermag.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-trunc.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ufromfp.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-ufromfpx.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-y0.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-y1.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-yn.inc: Include libm-test-driver.c. (do_test): New function. * math/libm-test-driver.c: Do not include libm-have-vector-test.h. (HAVE_VECTOR): Remove macro. (START): Do not call HAVE_VECTOR. * math/test-double-vlen2.h (FUNC_TEST): Remove macro. * math/test-double-vlen4.h (FUNC_TEST): Remove macro. * math/test-double-vlen8.h (FUNC_TEST): Remove macro. * math/test-float-vlen16.h (FUNC_TEST): Remove macro. * math/test-float-vlen4.h (FUNC_TEST): Remove macro. * math/test-float-vlen8.h (FUNC_TEST): Remove macro. * math/test-math-vector.h (FUNC_TEST): New macro. (WRAPPER_DECL): Rename to WRAPPER_DECL_f. * sysdeps/x86_64/fpu/Makefile (double-vlen2-funcs): New variable. (double-vlen4-funcs): Likewise. (double-vlen4-avx2-funcs): Likewise. (double-vlen8-funcs): Likewise. (float-vlen4-funcs): Likewise. (float-vlen8-funcs): Likewise. (float-vlen8-avx2-funcs): Likewise. (float-vlen16-funcs): Likewise. (CFLAGS-test-double-vlen4-avx2.c): Remove variable. (CFLAGS-test-float-vlen8-avx2.c): Likewise. * sysdeps/x86_64/fpu/test-double-vlen4.h (TEST_VECTOR_cos): Remove macro. (TEST_VECTOR_sin): Likewise. (TEST_VECTOR_sincos): Likewise. (TEST_VECTOR_log): Likewise. (TEST_VECTOR_exp): Likewise. (TEST_VECTOR_pow): Likewise. * sysdeps/x86_64/fpu/test-double-vlen8.h (TEST_VECTOR_cos): Likewise. (TEST_VECTOR_sin): Likewise. (TEST_VECTOR_sincos): Likewise. (TEST_VECTOR_log): Likewise. (TEST_VECTOR_exp): Likewise. (TEST_VECTOR_pow): Likewise. * sysdeps/x86_64/fpu/test-float-vlen16.h (TEST_VECTOR_cosf): Likewise. (TEST_VECTOR_sinf): Likewise. (TEST_VECTOR_sincosf): Likewise. (TEST_VECTOR_logf): Likewise. (TEST_VECTOR_expf): Likewise. (TEST_VECTOR_powf): Likewise. * sysdeps/x86_64/fpu/test-float-vlen8.h (TEST_VECTOR_cosf): Likewise. (TEST_VECTOR_sinf): Likewise. (TEST_VECTOR_sincosf): Likewise. (TEST_VECTOR_logf): Likewise. (TEST_VECTOR_expf): Likewise. (TEST_VECTOR_powf): Likewise. * math/gen-libm-have-vector-test.sh: Remove file. * math/libm-test.inc: Likewise. * math/libm-test-support-double.c: Likewise. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/test-double-finite.c: Likewise.: Likewise. * math/test-double.c: Likewise. * math/test-float-finite.c: Likewise. * math/test-float.c: Likewise. * math/test-idouble.c: Likewise. * math/test-ifloat.c: Likewise. * math/test-ildouble.c: Likewise. * math/test-ldouble-finite.c: Likewise. * math/test-ldouble.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen2.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen2.h: Likewise. * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen4.c: Likewise. * sysdeps/x86_64/fpu/test-double-vlen8.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen16.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen4.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen4.h: Likewise. * sysdeps/x86_64/fpu/test-float-vlen8-avx2.c: Likewise. * sysdeps/x86_64/fpu/test-float-vlen8.c: Likewise.
* Add new templates for IEEE wrappersGabriel F. T. Gomes2017-02-2329-1/+1084
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several wrappers for IEEE functions use _LIB_VERSION / matherr / __kernel_standard functionality, which we want to obsolete. New wrappers, such as for float128, must not use this functionality. This patch adds new wrappers that only __set_errno and can be used by the new float128 wrappers. Tested for powerpc64le. * math/Makefile: Add wrappers to gen-libm-calls. * math/w_acos_template.c: New file. * math/w_acosh_template.c: Likewise. * math/w_asin_template.c: Likewise. * math/w_atan2_template.c: Likewise. * math/w_atanh_template.c: Likewise. * math/w_cosh_template.c: Likewise. * math/w_exp10_template.c: Likewise. * math/w_exp2_template.c: Likewise. * math/w_exp_template.c: Likewise. * math/w_fmod_template.c: Likewise. * math/w_hypot_template.c: Likewise. * math/w_j0_template.c: Likewise. * math/w_j1_template.c: Likewise. * math/w_jn_template.c: Likewise. * math/w_lgamma_r_template.c: Likewise. * math/w_lgamma_template.c: Likewise. * math/w_log10_template.c: Likewise. * math/w_log2_template.c: Likewise. * math/w_log_template.c: Likewise. * math/w_pow_template.c: Likewise. * math/w_remainder_template.c: Likewise. * math/w_sinh_template.c: Likewise. * math/w_sqrt_template.c: Likewise. * math/w_tgamma_template.c: Likewise.: Likewise. * sysdeps/generic/math-type-macros-double.h (__USE_WRAPPER_TEMPLATE): New macro to control inclusion of the new wrappers. * sysdeps/generic/math-type-macros-float.h: Likewise. * sysdeps/generic/math-type-macros-ldouble.h: Likewise.
* Add TFD_TIMER_CANCEL_ON_SET to sys/timerfd.h.Joseph Myers2017-02-222-1/+6
| | | | | | | | | | | In Linux 4.10, timerfd constants moved to a new uapi header, which showed up that glibc's sys/timerfd.h is missing the old flag TFD_TIMER_CANCEL_ON_SET. This patch adds that flag to glibc's header. Tested for x86_64. * sysdeps/unix/sysv/linux/sys/timerfd.h (TFD_TIMER_CANCEL_ON_SET): New enum constant and macro.
* Use Linux 4.10 in build-many-glibcs.py.Joseph Myers2017-02-222-1/+6
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux kernel version to 4.10.
* Add IP_RECVFRAGSIZE from Linux 4.10.Joseph Myers2017-02-212-0/+5
| | | | | | | | | | Linux 4.10 adds a new IP_RECVFRAGSIZE macro to include/uapi/linux/in.h. This patch adds it to glibc's sysdeps/unix/sysv/linux/bits/in.h. Tested for x86_64. * sysdeps/unix/sysv/linux/bits/in.h (IP_RECVFRAGSIZE): New macro.
* powerpc: Update powerpc-fpu libm-test-ulpsTulio Magno Quites Machado Filho2017-02-212-98/+110
| | | | * sysdeps/powerpc/fpu/libm-test-ulps: Update.
* powerpc: Add tests for __ppc_set_ppr_* functions.Wainer dos Santos Moschetta2017-02-213-0/+111
| | | | | | | | | | | | | The sys/platform/ppc.h header defines a class of __ppc_set_ppr functions used to set the Program Priority Register (PPR) in PowerPC. This patch implements test cases for these functions. Tested on ppc64le, ppc64, and ppc. * sysdeps/powerpc/tst-set_ppr.c: New file. Implement test cases for __ppc_set_ppr_* functions. * sysdeps/powerpc/Makefile ($(subdir),misc): Add tst-set_ppr in the list of tests.
* powerpc: Convert tests to the new support test-driverWainer dos Santos Moschetta2017-02-214-21/+19
| | | | | | | | | | | | | | | | Change the powerpc tests to use <support/test-driver.c>. Also replace some of pthread calls to its xpthread equivalent. Tested on ppc64le. * sysdeps/powerpc/test-get_hwcap.c: Use <support/test-driver.c> instead of test-skeleton.c. (do_test): Replaced pthread_create and pthread_join with xpthread_create and xpthread_join. Use TEST_VERIFY_EXIT macro. Removed unneeded status variable. * sysdeps/powerpc/test-gettimebase.c: Use <support/test-driver.c> instead of test-skeleton.c. * sysdeps/powerpc/tst-tlsopt-powerpc.c: Likewise.
* Bug 20313: Update to Unicode 9.0.0Mike FABIAN2017-02-2117-2596/+6701
| | | | | | * Unicode 9.0.0 Support: Character encoding, character type info, and transliteration tables are all updated to Unicode 9.0.0, using generator scripts contributed by Mike FABIAN (Red Hat).
* Remove some unused libm-test exception macros.Joseph Myers2017-02-202-28/+9
| | | | | | | | | | | | | | | | | | | This patch removes some libm-test-support.h macros for exceptions that are no longer used. EXCEPTIONS_OK has been unused for some time. The macros for underflow exceptions with some types only were used when the results for complex inverse trig and hyperbolic functions were manually maintained, but are no longer needed now the auto-libm-test machinery is used to determine the correct result and exceptions for every floating-point format and rounding mode. Tested for x86_64. * math/libm-test-support.h (EXCEPTIONS_OK): Remove macro. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise.
* One more obvious missing #include in the testsuite.Zack Weinberg2017-02-192-0/+5
| | | | * rt/tst-mqueue4.c: Include stdint.h.
* Update arm, mips, powerpc-nofpu libm-test-ulps.Joseph Myers2017-02-175-304/+343
| | | | | | | * sysdeps/arm/libm-test-ulps: Update. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
* Rework -fno-omit-frame-pointer support on i386Adhemerval Zanella2017-02-176-41/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6b1df8b27f fixed the -OS build issue on i386 (BZ#20729) by expliciting disabling frame pointer (-fomit-frame-pointer) on the faulty objects. Although it does fix the issue, it is a subpar workaround that adds complexity in build process (a rule for each object to add the required compiler option and pontentially more rules for objects that call {INLINE,INTERNAL}_SYSCALL) and does not allow the implementations to get all the possible debug/calltrack information possible (used mainly in debuggers and performance measurement tools). This patch fixes it by adding an explicit configure check to see if -fno-omit-frame-pointer is set and to act accordingly (set or not OPTIMIZE_FOR_GCC_5). The make rules is simplified and only one is required: to add libc-do-syscall on loader due mmap (which will be empty anyway for default build with -fomit-frame-pointer). Checked on i386-linux-gnu with GCC 6.2.1 with CFLAGS sets as '-Os', '-O2 -fno-omit-frame-pointer', and '-O2 -fomit-frame-pointer'. For '-Os' the testsuite issues described by BZ#19463 and BZ#15105 still applied. It fixes BZ #21029, although it is marked as duplicated of #20729 (I reopened to track this cleanup). [BZ #21029] * config.h.in [CAN_USE_REGISTER_ASM_EBP]: New define. * sysdeps/unix/sysv/linux/i386/Makefile [$(subdir) = elf] (sysdep-dl-routines): Add libc-do-syscall. (uses-6-syscall-arguments): Remove. [$(subdir) = misc] (CFLAGS-epoll_pwait.o): Likewise. [$(subdir) = misc] (CFLAGS-epoll_pwait.os): Likewise. [$(subdir) = misc] (CFLAGS-mmap.o): Likewise. [$(subdir) = misc] (CFLAGS-mmap.os): Likewise. [$(subdir) = misc] (CFLAGS-mmap64.o): Likewise. [$(subdir) = misc] (CFLAGS-mmap64.os): Likewise. [$(subdir) = misc] (CFLAGS-pselect.o): Likewise. [$(subdir) = misc] (cflags-pselect.o): Likewise. [$(subdir) = misc] (cflags-pselect.os): Likewise. [$(subdir) = misc] (cflags-rtld-mmap.os): Likewise. [$(subdir) = sysvipc] (cflags-semtimedop.o): Likewise. [$(subdir) = sysvipc] (cflags-semtimedop.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fadvise64.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fadvise64.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate.os): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate64.o): Likewise. [$(subdir) = io] (CFLAGS-posix_fallocate64.os): Likewise. [$(subdir) = io] (CFLAGS-sync_file_range.o): Likewise. [$(subdir) = io] (CFLAGS-sync_file_range.os): Likewise. [$(subdir) = io] (CFLAGS-fallocate.o): Likewise. [$(subdir) = io] (CFLAGS-fallocate.os): Likewise. [$(subdir) = io] (CFLAGS-fallocate64.o): Likewise. [$(subdir) = io] (CFLAGS-fallocate64.os): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.o): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrdlock.os): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.o): Likewise. [$(subdir) = nptl] (CFLAGS-pthread_rwlock_timedrwlock.os): Likewise. [$(subdir) = nptl] (CFLAGS-sem_wait.o): Likewise. [$(subdir) = nptl] (CFLAGS-sem_wait.os): Likewise. [$(subdir) = nptl] (CFLAGS-sem_timedwait.o): Likewise. [$(subdir) = nptl] (CFLAGS-sem_timedwait.os): Likewise. * sysdeps/unix/sysv/linux/i386/configure.ac: Add check if compiler allows ebp on inline assembly. * sysdeps/unix/sysv/linux/i386/configure: Regenerate. * sysdeps/unix/sysv/linux/i386/sysdep.h (OPTIMIZE_FOR_GCC_5): Set if CAN_USE_REGISTER_ASM_EBP is set. (check_consistency): Likewise.
* Use index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bitH.J. Lu2017-02-172-1/+6
| | | | | * sysdeps/x86/cpu-features.c (init_cpu_features): Use index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit.
* Move tests of catan, catanh to auto-libm-test-*.Joseph Myers2017-02-1710-919/+76430
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves tests of catan and catanh with finite inputs (other than the divide-by-zero cases producing an exact infinity) to using the auto-libm-test machinery. Each of auto-libm-test-out-catan and auto-libm-test-out-catanh takes about three seconds to generate on my system (so in fact it wasn't necessary after all to defer the move to auto-libm-test-* until the output files were split up by function). Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add tests of catan and catanh. * math/auto-libm-test-out-catan: New generated file. * math/auto-libm-test-out-catanh: Likewise. * math/libm-test-catan.inc (catan_test_data): Use AUTO_TESTS_c_c. Move tests with finite inputs, except divide-by-zero cases, to auto-libm-test-in. * math/libm-test-catanh.inc (catanh_test_data): Likewise. * math/Makefile (libm-test-funcs-auto): Add catan and catanh. (libm-test-funcs-noauto): Remove catan and catanh. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Move tests of casin, casinh to auto-libm-test-*.Joseph Myers2017-02-1710-1391/+92082
| | | | | | | | | | | | | | | | | | | | | | | This patch moves tests of casin and casinh with finite inputs to using the auto-libm-test machinery. Each of auto-libm-test-out-casin and auto-libm-test-out-casinh takes about 38 minutes to generate on my system because of MPC slowness on special cases that appear in the tests (with MPC 1.0.3; I don't know to what extent current MPC master might speed it up). Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add tests of casin and casinh. * math/auto-libm-test-out-casin: New generated file. * math/auto-libm-test-out-casinh: Likewise. * math/libm-test-casin.inc (casin_test_data): Use AUTO_TESTS_c_c. Move tests with finite inputs to auto-libm-test-in. * math/libm-test-casinh.inc (casinh_test_data): Likewise. * math/Makefile (libm-test-funcs-auto): Add casin and casinh. (libm-test-funcs-noauto): Remove casin and casinh. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Move tests of cacos, cacosh to auto-libm-test-*.Joseph Myers2017-02-1710-1342/+92033
| | | | | | | | | | | | | | | | | | | | | | | This patch moves tests of cacos and cacosh with finite inputs to using the auto-libm-test machinery. Each of auto-libm-test-out-cacos and auto-libm-test-out-cacosh takes about 80 minutes to generate on my system because of MPC slowness on special cases that appear in the tests (with MPC 1.0.3; I don't know to what extent current MPC master might speed it up). Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add tests of cacos and cacosh. * math/auto-libm-test-out-cacos: New generated file. * math/auto-libm-test-out-cacosh: Likewise. * math/libm-test-cacos.inc (cacos_test_data): Use AUTO_TESTS_c_c. Move tests with finite inputs to auto-libm-test-in. * math/libm-test-cacosh.inc (cacosh_test_data): Likewise. * math/Makefile (libm-test-funcs-auto): Add cacos and cacosh. (libm-test-funcs-noauto): Remove cacos and cacosh. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Revert header inclusion changes that break math/ testing on x86_64.Joseph Myers2017-02-173-3/+17
| | | | | | | | | | Revert: 2017-02-16 Zack Weinberg <zackw@panix.com> * sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h. Don't include init-arch.h. * sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h. Don't include init-arch.h.
* Fix lgamma*, log10* and log2* results [BZ #21171]Tulio Magno Quites Machado Filho2017-02-1712-11/+28
| | | | | | | | | | | | | | | | | | | | | | | lgamma(-x) should return +Inf and raise divide-by-zero. log10(+-0) and log2(+-0) should return -Inf and raise divide-by-zero. Tested on powerpc, powerpc64, powerpc64le and x86_64. [BZ #21171] * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r): Return +Inf and raise divide-by-zero when x is negative. * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r): Likewise. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Likewise. * sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Return -Inf and raise divide-by-zero when x = +-0. * sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise. * sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise. * sysdeps/ieee754/flt-32/e_log2f.c (__ieee754_log2f): Likewise. * sysdeps/ieee754/ldbl-128/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128/e_log2l.c (__ieee754_log2l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_log10l.c (__ieee754_log10l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_log2l.c (__ieee754_log2l): Likewise.
* build-many-glibcs: don't crash if email is not configuredZack Weinberg2017-02-162-0/+16
| | | | | | | | | | | The 'bot-cycle' action for build-many-glibcs is a convenient way to not have to remember all the steps in keeping a many-glibcs tree up to date ... or it would be, if the script could send mail _optionally_. Make it so by skipping the mail step if mail isn't configured. * scripts/build-many-glibcs.py (bot_build_mail): If the bot_config does not contain all of the necessary email- related settings, just print a warning and continue.
* Add missing header files throughout the testsuite.Zack Weinberg2017-02-1683-30/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * crypt/md5.h: Test _LIBC with #if defined, not #if. * dirent/opendir-tst1.c: Include sys/stat.h. * dirent/tst-fdopendir.c: Include sys/stat.h. * dirent/tst-fdopendir2.c: Include stdlib.h. * dirent/tst-scandir.c: Include stdbool.h. * elf/tst-auditmod1.c: Include link.h and stddef.h. * elf/tst-tls15.c: Include stdlib.h. * elf/tst-tls16.c: Include stdlib.h. * elf/tst-tls17.c: Include stdlib.h. * elf/tst-tls18.c: Include stdlib.h. * iconv/tst-iconv6.c: Include endian.h. * iconvdata/bug-iconv11.c: Include limits.h. * io/test-utime.c: Include stdint.h. * io/tst-faccessat.c: Include sys/stat.h. * io/tst-fchmodat.c: Include sys/stat.h. * io/tst-fchownat.c: Include sys/stat.h. * io/tst-fstatat.c: Include sys/stat.h. * io/tst-futimesat.c: Include sys/stat.h. * io/tst-linkat.c: Include sys/stat.h. * io/tst-mkdirat.c: Include sys/stat.h and stdbool.h. * io/tst-mkfifoat.c: Include sys/stat.h and stdbool.h. * io/tst-mknodat.c: Include sys/stat.h and stdbool.h. * io/tst-openat.c: Include stdbool.h. * io/tst-readlinkat.c: Include sys/stat.h. * io/tst-renameat.c: Include sys/stat.h. * io/tst-symlinkat.c: Include sys/stat.h. * io/tst-unlinkat.c: Include stdbool.h. * libio/bug-memstream1.c: Include stdlib.h. * libio/bug-wmemstream1.c: Include stdlib.h. * libio/tst-fwrite-error.c: Include stdlib.h. * libio/tst-memstream1.c: Include stdlib.h. * libio/tst-memstream2.c: Include stdlib.h. * libio/tst-memstream3.c: Include stdlib.h. * malloc/tst-interpose-aux.c: Include stdint.h. * misc/tst-preadvwritev-common.c: Include sys/stat.h. * nptl/tst-basic7.c: Include limits.h. * nptl/tst-cancel25.c: Include pthread.h, not pthreadP.h. * nptl/tst-cancel4.c: Include stddef.h, limits.h, and sys/stat.h. * nptl/tst-cancel4_1.c: Include stddef.h. * nptl/tst-cancel4_2.c: Include stddef.h. * nptl/tst-cond16.c: Include limits.h. Use sysconf(_SC_PAGESIZE) instead of __getpagesize. * nptl/tst-cond18.c: Include limits.h. Use sysconf(_SC_PAGESIZE) instead of __getpagesize. * nptl/tst-cond4.c: Include stdint.h. * nptl/tst-cond6.c: Include stdint.h. * nptl/tst-stack2.c: Include limits.h. * nptl/tst-stackguard1.c: Include stddef.h. * nptl/tst-tls4.c: Include stdint.h. Don't include tls.h. * nptl/tst-tls4moda.c: Include stddef.h. Don't include stdio.h, unistd.h, or tls.h. * nptl/tst-tls4modb.c: Include stddef.h. Don't include stdio.h, unistd.h, or tls.h. * nptl/tst-tls5.h: Include stddef.h. Don't include stdlib.h or tls.h. * posix/tst-getaddrinfo2.c: Include stdio.h. * posix/tst-getaddrinfo5.c: Include stdio.h. * posix/tst-pathconf.c: Include sys/stat.h. * posix/tst-posix_fadvise-common.c: Include stdint.h. * posix/tst-preadwrite-common.c: Include sys/stat.h. * posix/tst-regex.c: Include stdint.h. Don't include spawn.h or spawn_int.h. * posix/tst-regexloc.c: Don't include spawn.h or spawn_int.h. * posix/tst-vfork3.c: Include sys/stat.h. * resolv/tst-bug18665-tcp.c: Include stdlib.h. * resolv/tst-res_hconf_reorder.c: Include stdlib.h. * resolv/tst-resolv-search.c: Include stdlib.h. * stdio-common/tst-fmemopen2.c: Include stdint.h. * stdio-common/tst-vfprintf-width-prec.c: Include stdlib.h. * stdlib/test-canon.c: Include sys/stat.h. * stdlib/tst-tls-atexit.c: Include stdbool.h. * string/test-memchr.c: Include stdint.h. * string/tst-cmp.c: Include stdint.h. * sysdeps/pthread/tst-timer.c: Include stdint.h. * sysdeps/unix/sysv/linux/tst-sync_file_range.c: Include stdint.h. * sysdeps/wordsize-64/tst-writev.c: Include limits.h and stdint.h. * sysdeps/x86_64/fpu/math-tests-arch.h: Include cpu-features.h. Don't include init-arch.h. * sysdeps/x86_64/multiarch/test-multiarch.h: Include cpu-features.h. Don't include init-arch.h. * sysdeps/x86_64/tst-auditmod10b.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod3b.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod4b.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod5b.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod6b.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod6c.c: Include link.h and stddef.h. * sysdeps/x86_64/tst-auditmod7b.c: Include link.h and stddef.h. * time/clocktest.c: Include stdint.h. * time/tst-posixtz.c: Include stdint.h. * timezone/tst-timezone.c: Include stdint.h.
* ChangeLog entry for previous changesetZack Weinberg2017-02-161-0/+16
|
* Clean up redundancies between string.h and strings.h.Zack Weinberg2017-02-163-141/+39
| | | | | | | | | | | | | | | | | | | | * string/string.h [__USE_MISC]: Include strings.h. (__bzero, bcmp, bcopy, bzero, index, rindex) (strcasecmp, strncasecmp, strcasecmp_l, strncasecmp_l) (ffs, ffsl, ffsll): Don't declare. * string/strings.h: Do not suppress the file if string.h has already been included. (bcmp, bcopy, bzero, strcasecmp, strncasecmp): Add __nonnull annotations. (index, rindex): Define inline forwarders even if __CORRECT_ISO_CPP_STRING_H_PROTO is defined. (ffs): Use __attribute_const__. (ffsl, ffsll): Declare here. (strcasecmp_l, strncasecmp_l): Correct comments; these functions have now been standardized. * include/string.h (__bzero): Declare here.
* Move bits/types.h into posix/bits.Zack Weinberg2017-02-163-0/+6
| | | | | | | | bits/types.h has no sysdeps variants, so it should be in the subdirectory that installs it (namely, posix). * bits/types.h: Move to posix/bits. * include/bits/types.h: New wrapper.
* Remove the str(n)cmp inlines from string/bits/string2.h. The strncmpWilco Dijkstra2017-02-152-58/+6
| | | | | | | | | | | optimization seems unlikely to ever be useful, but if it occurs in real code it should be added to GCC. Expanding strcmp of small strings does appear useful (benchmarking shows it is 2-3x faster), so this would be useful to implement in GCC (PR 78809). * string/bits/string2.h (strcmp): Remove define. (__strcmp_cg): Likewise. (strncmp): Likewise.
* The internal header include/string.h does not work in C++: it causes link errorsWilco Dijkstra2017-02-152-2/+6
| | | | | | | | | in several C++ debug tests when any of the functions it declares are called. The best option would be to not use internal headers for tests (unless explicitly needed). Add guards so that it is safe to use include/string.h from C++. * include/string.h: Add __cplusplus check.
* Fix y0 and y1 exception handling for zero input [BZ #21134]Gabriel F. T. Gomes2017-02-157-6/+17
| | | | | | | | | | | | | | | | | | | | | The Bessel functions of the second type (Yn) should raise the "divide by zero" exception when input is zero (both positive and negative). Current code gives the right output, but fails to set the exception. This error is exposed for float, double, and long double when linking with -lieee. Without this flag, the error is not exposed, because the wrappers for these functions, which use __kernel_standard functionality, set the exception as expected. Tested for powerpc64le. [BZ #21134] * sysdeps/ieee754/dbl-64/e_j0.c (__ieee754_y0): Raise the "divide by zero" exception when the input is zero. * sysdeps/ieee754/dbl-64/e_j1.c (__ieee754_y1): Likewise. * sysdeps/ieee754/flt-32/e_j0f.c (__ieee754_y0f): Likewise. * sysdeps/ieee754/flt-32/e_j1f.c (__ieee754_y1f): Likewise. * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_y0l): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
* Move most libmvec test contents from .c to .h files.Joseph Myers2017-02-1517-82/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libmvec tests put substantive, architecture-specific contents in .c files such as test-double-vlen4.c, so making those files architecture-specific and causing issues for generating such files automatically when splitting up tests by function. This patch moves all the substantive contents to .h files, so the .c files only include the .h file and then libm-test.c. This allows for automatic generation of per-function .c files in future. The .h files in turn #include or #include_next the architecture-independent file and add the architecture-specific definitions to that. (Splitting by function should in fact allow the TEST_VECTOR_* macros to be replaced by sysdeps makefile information on which functions to test in each case, removing the need for gen-libm-have-vector-test.sh as well as removing the need for some of the architecture-specific headers.) Tested for x86_64. * sysdeps/x86_64/fpu/test-double-vlen2.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-double-vlen2.h: ... here. New file. * sysdeps/x86_64/fpu/test-double-vlen4-avx2.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-double-vlen4-avx2.h: ... here. New file. * sysdeps/x86_64/fpu/test-double-vlen4.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-double-vlen4.h: ... here. New file. * sysdeps/x86_64/fpu/test-double-vlen8.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-double-vlen8.h: ... here. New file. * sysdeps/x86_64/fpu/test-float-vlen16.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-float-vlen16.h: ... here. New file. * sysdeps/x86_64/fpu/test-float-vlen4.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-float-vlen4.h: ... here. New file. * sysdeps/x86_64/fpu/test-float-vlen8-avx2.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-float-vlen8-avx2.h: ... here. New file. * sysdeps/x86_64/fpu/test-float-vlen8.c: Move most contents to, and include ... * sysdeps/x86_64/fpu/test-float-vlen8.h: ... here. New file.
* Move INIT_ARCH_EXT call from libm-test-support to libm-test-driver.Joseph Myers2017-02-144-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | libmvec tests involve calling INIT_ARCH_EXT during initialization then CHECK_ARCH_EXT before testing each function to see if the processor being used for testing supports the required instruction set extensions. After my refactoring of libm-test infrastructure, the INIT_ARCH_EXT call is in libm-test-support.c, built only once per floating-point type. Now, in fact all definitions of this macro are empty, but given that the definitions in sysdeps/x86_64/fpu/math-tests-arch.h are conditional on REQUIRE_* macros defined in particular vector tests, it seems more correct for the INIT_ARCH_EXT call to go instead in libm-test-driver.c which gets built separately with those REQUIRE_* macros properly defined. This patch moves the call there. Tested for x86_64 and x86. * math/libm-test-support.h: Do not include <math-tests-arch.h> here. * math/libm-test-support.c (libm_test_init): Do not call INIT_ARCH_EXT here. * math/libm-test-driver.c: Include <math-tests-arch.h>. (main): Call INIT_ARCH_EXT.
* ldbl-128: Fix y0 and y1 for -Inf input [BZ #21130]Gabriel F. T. Gomes2017-02-123-12/+9
| | | | | | | | | | | | | | | | | The Bessel functions of the second type (Yn) are not defined for negative input and should return NAN with the "invalid" exception raised, in these cases. However, current code checks for infinity and return zero, regardless of the sign. This error is exposed for long double when linking with -lieee. Without this flag, the error is not exposed, because the wrappers for these functions, which use __kernel_standard functionality, return the correct value. Tested for powerpc64le. [BZ #21130] * sysdeps/ieee754/ldbl-128/e_j0l.c (__ieee754_y0l): Return NAN with the "invalid" exception raised when x is -Inf. * sysdeps/ieee754/ldbl-128/e_j1l.c (__ieee754_y1l): Likewise.
* GLIBC uses strchr (s, '\0') as an idiom to find the end of a string.Wilco Dijkstra2017-02-102-10/+4
| | | | | | | | | | | This is transformed into rawmemchr by the bits/string2.h header. However this is generally slower than strlen on most targets, even when an optimized rawmemchr implementation exists. Since GCC7 optimizes strchr (s, '\0') to strlen (s) + s, the GLIBC headers should not transform this to rawmemchr. As GCC recognizes strchr as a builtin, defining strchr as the builtin is not useful. * string/bits/string2.h (strchr): Remove define.
* x86-64: Verify that _dl_runtime_resolve preserves vector registersH.J. Lu2017-02-0910-4/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | | On x86-64, _dl_runtime_resolve must preserve the first 8 vector registers. Add 3 _dl_runtime_resolve tests to verify that SSE, AVX and AVX512 registers are preserved. * sysdeps/x86_64/Makefile (tests): Add tst-sse, tst-avx and tst-avx512. (test-extras): Add tst-avx-aux and tst-avx512-aux. (extra-test-objs): Add tst-avx-aux.o and tst-avx512-aux.o. (modules-names): Add tst-ssemod, tst-avxmod and tst-avx512mod. ($(objpfx)tst-sse): New rule. ($(objpfx)tst-avx): Likewise. ($(objpfx)tst-avx512): Likewise. (CFLAGS-tst-avx-aux.c): New. (CFLAGS-tst-avxmod.c): Likewise. (CFLAGS-tst-avx512-aux.c): Likewise. (CFLAGS-tst-avx512mod.c): Likewise. * sysdeps/x86_64/tst-avx-aux.c: New file. * sysdeps/x86_64/tst-avx.c: Likewise. * sysdeps/x86_64/tst-avx512-aux.c: Likewise. * sysdeps/x86_64/tst-avx512.c: Likewise. * sysdeps/x86_64/tst-avx512mod.c: Likewise. * sysdeps/x86_64/tst-avxmod.c: Likewise. * sysdeps/x86_64/tst-sse.c: Likewise. * sysdeps/x86_64/tst-ssemod.c: Likewise.
* Move more csin, csinh tests to auto-libm-test-in.Joseph Myers2017-02-096-6/+1187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When I moved tests of csin and csinh to auto-libm-test-in, I didn't move a few tests for which gen-auto-libm-tests was very slow because of MPC slowness on certain inputs. Now that auto-libm-test-out has been split up, such slowness only affects regenerating the test expectations for the individual functions in question, rather than any addition of tests for any function to auto-libm-test-in. Thus, I no longer consider it a problem to have these inputs in auto-libm-test-in, and this patch moves them there. This results in test generation for csin and csinh taking 5m43s (for each of csin and csinh) on my system, while other functions are unaffected. I expect the test generation to be much faster in MPC 1.1 (the relevant performance improvements went in MPC mainline in Dec 2013, but there hasn't been a release from mainline since then). Tested for x86_64 and x86. * math/auto-libm-test-in: Add more tests of csin and csinh. * math/auto-libm-test-out-csin: Regenerated. * math/auto-libm-test-out-csinh: Likewise. * math/libm-test-csin.inc (csin_test_data): Remove tests moved to auto-libm-test-in. * math/libm-test-csinh.inc (csinh_test_data): Likewise.
* Merge libm-compat-calls-auto and libm-compat-callsGabriel F. T. Gomes2017-02-092-9/+15
| | | | | | | | | | | | | | | | | | | | | | | Both libm-compat-calls and libm-compat-calls-auto list the functions that must be built for the types float, double, and long double, but not for other floating-point types that get added to libm. Besides that, the use of libm-compat-calls-ldouble-yes to select if w_lgamma_compatl and k_standardl should be built for long-double (in libm-compat-calls) has the same effect of the use of type-foreach (in libm-compat-calls-auto). This patch merges the contents of libm-compat-calls into libm-compat-calls-auto, then renames the latter to libm-compat-calls. Tested for powerpc64le, s390, and x86_64. * math/Makefile (libm-compat-calls-ldouble-yes): Merge into libm-compat-calls-auto. (libm-compat-calls): Likewise. (libm-compat-calls-auto): Rename to libm-compat-calls and add w_lgamma_compatF and k_standardF (merged from the items above). (libm-routines): Use libm-compat-calls, instead of libm-compat-calls-auto, with type-foreach.
* Move -U__LIBC_INTERNAL_MATH_INLINES to test-math-inline.h.Joseph Myers2017-02-093-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libm tests of inline functions undefine __NO_MATH_INLINES (from math-CPPFLAGS) in test-math-inline.h, but __LIBC_INTERNAL_MATH_INLINES via -U options in the makefile. This is an odd inconsistency between the handling of the two macros. It also depends on the ordering (in compilation commands) of the various variables providing compiler options (which I think is why it's using CPPFLAGS-*.c instead of CFLAGS-*.c). This patch moves the undefine to test-math-inline.h, so improving consistency and eliminating the dependency on the order in which variables go in the compilation commands. The CPPFLAGS-*.c variables are renamed to CFLAGS-*.c, matching those for the non-inline libm function tests. By moving the -U option to the header file, this should ensure that ordering issues don't arise with a subsequent move of the options to these tests to target-specific CFLAGS += ... variable settings (for when tests for each function are build separately and so compilation options need setting for many more makefile targets, for which target-specific variable settings seem to be the most convenient form to generate with iterators). Tested for x86_64. * math/test-math-inline.h (__LIBC_INTERNAL_MATH_INLINES): Undefine macro. * math/Makefile (CPPFLAGS-test-ifloat.c): Rename to ... (CFLAGS-test-ifloat.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES. * math/Makefile (CPPFLAGS-test-idouble.c): Rename to ... (CFLAGS-test-idouble.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES. * math/Makefile (CPPFLAGS-test-ildouble.c): Rename to ... (CFLAGS-test-ildouble.c): ... this. Remove -U__LIBC_INTERNAL_MATH_INLINES.
* Build most libm-test support code once per type.Joseph Myers2017-02-088-1317/+1622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libm-test-driver.c contains various functions used in the course of libm testing, which are built as part of each test using this machinery. Currently, these functions get built for three tests for each type (e.g. test-float, test-ifloat, test-float-finite), plus the vector function tests. All these tests are huge and thus slow to build; the output of gen-libm-test.pl totals around 40 MB across all functions. To make the individual tests built from the Makefile smaller, it makes sense to split these tests up so the tests for each function are built separately (thus, three tests for each (function, type) pair, plus vector tests built only for functions that actually have vector versions). This improves parallelism and means that if tests fail, the summary of failed tests makes it more obvious where the problem might be without needing to look in the .out files to see which functions' tests failed (though architecture maintainers still need to keep libm-test-ulps up to date to avoid spurious failures of little interest). Simply including libm-test-driver.c as-is in such individual-function tests does not work because of unused static check_* functions (those functions only being used for the types of the outputs of the function under test). It also means the common code gets built over 1000 times instead of nine (plus vector tests). To avoid that issue, this patch splits out the bulk of the libm-test-driver.c code into a separate file libm-test-support.c (with a few functions made non-static). That separate file is built only once for each floating-point type (so at present three times, or twice on architectures with long double = double). Definitions needed in both libm-test-support.c and libm-test-driver.c go in libm-test-support.h (it's possible some of those are in fact only needed in one of the two files). libm-test-driver.c keeps definitions of a limited number of variables used to configure how libm-test-support.c behaves, various macros and structures needed by individual-function tests, and the main function. This move is also consistent in spirit with the move away from test-skeleton.c having all the test support code, to a small support/test-driver.c included in individual tests with most of the code built separately. Tested for x86_64 and x86. * math/libm-test-support.c: New file. Content from math/libm-test-driver.c. * math/libm-test-support.h: Likewise. * math/libm-test-support-double.c: New file. * math/libm-test-support-float.c: Likewise. * math/libm-test-support-ldouble.c: Likewise. * math/libm-test-driver.c: Remove main comment and header includes. Include libm-test-support.h. [!_GNU_SOURCE] (_GNU_SOURCE): Do not define. (flag_test_errno): Remove static. (flag_test_exceptions): Likewise. (flag_test_finite): Likewise. (flag_test_inline): Likewise. (flag_test_mathvec): Likewise. (test_msg): Likewise. (NO_EXCEPTION): Remove. (INVALID_EXCEPTION): Likewise. (DIVIDE_BY_ZERO_EXCEPTION): Likewise. (OVERFLOW_EXCEPTION): Likewise. (UNDERFLOW_EXCEPTION): Likewise. (INEXACT_EXCEPTION): Likewise. (INVALID_EXCEPTION_OK): Likewise. (DIVIDE_BY_ZERO_EXCEPTION_OK): Likewise. (OVERFLOW_EXCEPTION_OK): Likewise. (UNDERFLOW_EXCEPTION_OK): Likewise. (NO_INEXACT_EXCEPTION): Likewise. (EXCEPTIONS_OK): Likewise. (IGNORE_ZERO_INF_SIGN): Likewise. (TEST_NAN_SIGN): Likewise. (TEST_NAN_PAYLOAD): Likewise. (NO_TEST_INLINE): Likewise. (XFAIL_TEST): Likewise. (ERRNO_UNCHANGED): Likewise. (ERRNO_EDOM): Likewise. (ERRNO_ERANGE): Likewise. (IGNORE_RESULT): Likewise. (NON_FINITE): Likewise. (TEST_SNAN): Likewise. (NO_TEST_MATHVEC): Likewise. (__CONCATX): Likewise. (TYPE_MIN): Likewise. (TYPE_TRUE_MIN): Likewise. (TYPE_MAX): Likewise. (MIN_EXP): Likewise. (MAX_EXP): Likewise. (MANT_DIG): Likewise. (FSTR_MAX): Likewise. (ulp_idx): Likewise. (qtype_str): Remove static. (TEST_COND_binary32): Remove. (TEST_COND_binary64): Likewise. (TEST_COND_binary128): Likewise. (TEST_COND_ibm128): Likewise. (TEST_COND_intel96): Likewise. (TEST_COND_m68k96): Likewise. (TEST_COND_ibm128_libgcc): Likewise. (XFAIL_IBM128_LIBGCC): Likewise. (PAYLOAD_DIG): Likewise. (UNDERFLOW_EXCEPTION_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_OK_FLOAT): Likewise. (UNDERFLOW_EXCEPTION_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_OK_DOUBLE): Likewise. (UNDERFLOW_EXCEPTION_LDOUBLE_IBM): Likewise. (UNDERFLOW_EXCEPTION_BEFORE_ROUNDING): Likewise. (TEST_COND_long32): Likewise. (TEST_COND_long64): Likewise. (TEST_COND_before_rounding): Likewise. (TEST_COND_after_rounding): Likewise. (ulps_file_name): Likewise. (ulps_file): Likewise. (output_ulps): Likewise. (output_dir): Likewise. (noErrors): Likewise. (noTests): Likewise. (noExcTests): Likewise. (noErrnoTests): Likewise. (verbose): Likewise. (output_max_error): Likewise. (output_points): Likewise. (ignore_max_ulp): Likewise. (max_error): Likewise. (real_max_error): Likewise. (imag_max_error): Likewise. (prev_max_error): Likewise. (prev_real_max_error): Likewise. (prev_imag_max_error): Likewise. (max_valid_error): Likewise. (TYPE_DECIMAL_DIG): Likewise. (TYPE_HEX_DIG): Likewise. (fmt_ftostr): Likewise. (compare_ulp_data): Likewise. (find_ulps): Likewise. (init_max_error): Likewise. (set_max_error): Likewise. (print_float): Likewise. (print_screen): Likewise. (print_screen_max_error): Likewise. (update_stats): Likewise. (print_function_ulps): Likewise. (print_complex_function_ulps): Likewise. (fpstack_test): Likewise. (print_max_error): Likewise. (print_complex_max_error): Likewise. (test_single_exception): Likewise. (test_exceptions): Likewise. (test_single_errno): Likewise. (test_errno): Likewise. (ULPDIFF): Likewise. (ulp): Likewise. (check_float_internal): Likewise. (check_float): Likewise. (check_complex): Likewise. (check_int): Likewise. (check_long): Likewise. (check_bool): Likewise. (check_longlong): Likewise. (check_intmax_t): Likewise. (check_uintmax_t): Likewise. (enable_test): Likewise. (matherr): Likewise. (initialize): Likewise. (options): Likewise. (doc): Remove static. (argp): Likewise. (parse_opt): Remove. (check_ulp): Likewise. (libm_test_init): Likewise. (libm_test_finish): Likewise. * math/Makefile (libm-test-support): New variable. (test-extras): Add libm-test-support files. (extra-test-objs): Likewise. (CFLAGS-libm-test-support-float.c): New variable. (CFLAGS-libm-test-support-double.c): Likewise. (CFLAGS-libm-test-support-ldouble.c): Likewise. ($(addprefix $(objpfx),$(libm-tests)): Depend on appropriate libm-test-support objects.
* Move w_exp to libm-compat-call-autoGabriel F. T. Gomes2017-02-0813-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the "_compat" suffix to the wrappers of the function exp, which use _LIB_VERSION / matherr / __kernel_standard functionality. Tested for powerpc64le, s390, and x86_64. * math/Makefile (libm-calls): Move w_exp... (libm-compat-calls-auto): Here. * math/w_expl.c: Add suffix "_compat" to filename. * sysdeps/ia64/fpu/w_expl.c: Likewise. * sysdeps/ia64/fpu/w_expf.c: Likewise. * sysdeps/ia64/fpu/w_exp.c: Likewise. * sysdeps/ieee754/dbl-64/w_exp.c: Likewise. * sysdeps/ieee754/flt-32/w_expf.c: Likewise. * sysdeps/ieee754/ldbl-128/w_expl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/w_expl.c: Likewise. * sysdeps/ieee754/ldbl-96/w_expl.c: Likewise. * math/w_expl_compat.c: New file, copied from above. * sysdeps/ia64/fpu/w_exp_compat.c: Likewise. * sysdeps/ia64/fpu/w_expf_compat.c: Likewise. * sysdeps/ia64/fpu/w_expl_compat.c: Likewise. * sysdeps/ieee754/dbl-64/w_exp_compat.c: Likewise. * sysdeps/ieee754/flt-32/w_expf_compat.c: Likewise. * sysdeps/ieee754/ldbl-128/w_expl_compat.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c: Likewise. * sysdeps/ieee754/ldbl-96/w_expl_compat.c: Likewise. * sysdeps/ieee754/ldbl-64-128/w_expl.c: Add suffix "_compat" to filename. * sysdeps/ieee754/ldbl-opt/w_exp.c: Likewise. * sysdeps/ieee754/ldbl-64-128/w_expl_compat.c: New file, copied from above and adjusted for the new filenames. * sysdeps/ieee754/ldbl-opt/w_exp_compat.c: Likewise.
* Move w_lgamma to libm-compat-calls-autoGabriel F. T. Gomes2017-02-085-2/+14
| | | | | | | | | | | | | | | | | | | | This patch adds the suffix "_compat2" to the wrappers for lgamma, which use _LIB_VERSION / matherr / __kernel_standard functionality. The suffix "_compat2" is used because the suffix "_compat" is already used. Tested for powerpc64le, s390, and x86_64. * math/Makefile (libm-calls): Move w_lgammaF... (libm-compat-calls-auto): Here. * math/w_lgamma.c: Add suffix "_compat2" to filename. * math/w_lgammaf.c: Likewise. * math/w_lgammal.c: Likewise. * math/w_lgamma_compat2.c: New file, copied from above. * math/w_lgammaf_compat2.c: Likewise. * math/w_lgammal_compat2.c: Likewise.
* Move w_lgamma_r to libm-compat-calls-autoGabriel F. T. Gomes2017-02-0810-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the suffix "_compat" to lgamma_r wrappers and make some adjustments to #includes and Makefiles. This is a step towards deprecation of wrappers that use _LIB_VERSION / matherr / __kernel_standard functionality. Tested for powerpc64le, s390, and x86_64. * math/Makefile (libm-calls): Move w_lgammaF_r... (libm-compat-calls-auto): Here. * math/w_lgamma_r.c: Add suffix "_compat" to filename. * math/w_lgammaf_r.c: Likewise. * math/w_lgammal_r.c: Likewise. * sysdeps/ia64/fpu/w_lgammal_r.c: Likewise. * sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise. * sysdeps/ia64/fpu/w_lgamma_r.c: Likewise. * math/w_lgamma_r_compat.c: New file, copied from above. * math/w_lgammaf_r_compat.c: Likewise. * math/w_lgammal_r_compat.c: Likewise. * sysdeps/ia64/fpu/w_lgamma_r_compat.c: Likewise. * sysdeps/ia64/fpu/w_lgammaf_r_compat.c: Likewise. * sysdeps/ia64/fpu/w_lgammal_r_compat.c: Likewise. * sysdeps/ieee754/ldbl-opt/w_lgamma_r.c: Add suffix "_compat" to filename. * sysdeps/ieee754/ldbl-opt/w_lgammal_r.c: Likewise. * sysdeps/ieee754/ldbl-opt/w_lgamma_r_compat.c: New file copied from above and adjusted for the new filenames. * sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c: Likewise.
* aarch64: fix errno address calculation in SYSCALL_ERROR_HANDLERAdhemerval Zanella2017-02-082-1/+6
| | | | | | | | | | | | | | | This patch fixes the last regression in LTP lite scenario (mmap16) comparing to lp64 in my source trees [1, 2]. The fix has been suggested back in 2015 [3] but was never applied. Checked on aarch64-linux-gnu. * sysdeps/unix/sysv/linux/aarch64/sysdep.h: use PTR_REG() for offset calculation in SYSCALL_ERROR_HANDLER(). [1] https://github.com/norov/glibc/tree/dev9 [2] https://github.com/norov/linux/tree/ilp32-20170203 [3] https://sourceware.org/ml/libc-alpha/2015-03/msg00587.html
* Fix a typo in the manual.Rical Jasan2017-02-082-1/+5
| | | | | | | I only caught this because I saw a file in manual/ change. Oh, the irony... and thank you! * manual/contrib.texi: Fix typo.
* Fix getting tunable values on big-endian (BZ #21109)Siddhesh Poyarekar2017-02-084-6/+18
| | | | | | | The code to set value passed a tunable_val_t, which when cast to int32_t on big-endian gives the wrong value. Instead, use tunable_val_t.numval instead, which can then be safely cast into int32_t.
* Add Linux PTRACE_EVENT_STOPKir Kolyshkin2017-02-088-14/+39
| | | | | | | | | | | | | | | | | | | | | | | Add PTRACE_EVENT_STOP value to Linux's sys/ptrace.h, modify related comments accordingly. This constant initially appeared in Linux 3.1 (kernel commit 3544d72a, "ptrace: implement PTRACE_SEIZE") but its value has changed later in Linux 3.4 (kernel commit 5cdf389a, "ptrace: renumber PTRACE_EVENT_STOP so that future new options and events can match"). The comment is also taken from the above commit. This constant is used by e.g. strace, CRIU, Mozilla RR. * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_eventcodes): Add PTRACE_EVENT_STOP. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/s390/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/tile/sys/ptrace.h: Likewise.