about summary refs log tree commit diff
path: root/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* Add more IPV6_* macros to sysdeps/unix/sysv/linux/bits/in.h.Joseph Myers2017-03-131-0/+12
| | | | | | | | | | | | | | | | | | | | | Linux 4.10 adds IPV6_RECVFRAGSIZE to include/uapi/linux/in6.h, which shows that several such IPV6_* macros are missing from glibc's sysdeps/unix/sysv/linux/bits/in.h (while older ones are present). I don't know whether any of these might be deliberately omitted, but this patch adds what appear to be the missing more recent macros to glibc. Tested for x86_64. * sysdeps/unix/sysv/linux/bits/in.h (IPV6_AUTOFLOWLABEL): New macro. (IPV6_ADDR_PREFERENCES): Likewise. (IPV6_MINHOPCOUNT): Likewise. (IPV6_ORIGDSTADDR): Likewise. (IPV6_RECVORIGDSTADDR): Likewise. (IPV6_TRANSPARENT): Likewise. (IPV6_UNICAST_IF): Likewise. (IPV6_RECVFRAGSIZE): Likewise.
* Add missing ChangeLog entries.Thorsten Kukuk2017-03-131-0/+9
|
* sh: Fix building with gcc5/6Alexey Neyman2017-03-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build glibc for sh4-unknown-linux-gnu currently fails if one's using GCC5/6: in dl-conflict.c, the elf_machine_rela() function is called with NULL as its 3rd argument, sym. The implementation of that function in sysdeps/sh/dl-machine.h dereferences that pointer: const Elf32_Sym *const refsym = sym; ... if (map == &GL(dl_rtld_map)) value -= map->l_addr + refsym->st_value + reloc->r_addend; GCC discovers a null pointer dereference, and in accordance with -fdelete-null-pointer-checks (which is enabled in -O2) replaces this code with a trap - which, as SH does not implement a trap pattern in GCC, evaluates to an abort() call. This abort() call pulls many more objects from libc_nonshared.a, eventually resulting in link failure due to multiple definitions for a number of symbols. As far as I see, the conditional before this code is always false in rtld: _dl_resolve_conflicts() is called with main_map as the first argument, not GL(_dl_rtld_map), but since that call is in yet another compilation unit, GCC does not know about it. Patch that wraps this conditional into !defined RESOLVE_CONFLICT_FIND_MAP attached. * sysdeps/sh/dl-machine.h (elf_machine_rela): The condition in R_SH_DIR32 case is always false when inlined from dl-conflict.c. Ifdef out to prevent GCC from insertin an abort() call.
* Fix send consolidation typoMarko Myllynen2017-03-121-0/+6
| | | | | | | | Fix 60f9423b type for alpha kernel-features.h definition. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_RECV_SYSCALL): Replace duplicate by __ASSUME_SEND_SYSCALL.
* Update auto-libm-test-out for catan / catanh.Stefan Liebler2017-03-101-0/+6
| | | | | | | | | | | | | | I've used gmp 6.1.2, mpfr 3.1.5 and upstream mpc with fix in mpc_atan (https://scm.gforge.inria.fr/anonscm/gitweb?p=mpc/mpc.git;a=commit;h=958aac9b15a659d6fb5edcb11778123f8a35b14f) to build gen-auto-libm-tests and regenerated catan / catanh out files. Regenerated ULPs for s390 from scratch. Now the catan / catanh tests are passing. ChangeLog: * math/auto-libm-test-out-catan: Regenerated. * math/auto-libm-test-out-catanh: Likewise. * sysdeps/s390/fpu/libm-test-ulps: Likewise.
* Regenerate MIPS catan, catanh long double ulps.Joseph Myers2017-03-091-0/+5
| | | | | | | | | | | | This patch regenerates MIPS catan and catanh ulps for long double with fixed expected results for the tests of those functions. ulps for other types (which may see variation depending on whether glibc is built for a processor with fused multiply-add support) are deliberately not reduced. ulps are not regenerated for powerpc-nofpu as such regeneration does not result in any changes for long double. * sysdeps/mips/mips64/libm-test-ulps: Update catan and catanh ulps for long double with corrected test expectations.
* Consolidate Linux send implementationAdhemerval Zanella2017-03-091-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the send Linux syscall implementation on sysdeps/unix/sysv/linux/send{to}.c. The changes are: 1. Remove send from auto-generation syscalls.list on the architecture that uses __NR_send. 2. Define __NR_send for architectures that supports it. It was done instead of defining in default kernel-features.h because current Linux practice for new ports are to implement only __NR_sendto [1] and it will require adding new kernel-features for ports that do not require it (aarch64 for instance). 3. Remove __ASSUME_SENDTO_FOR_SEND_SYSCALL and decide to use __NR_sendto for send generation based on __ASSUME_SENDTO_SYSCALL. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Define. * sysdeps/unix/sysv/linux/aarch64/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Undefine. * sysdeps/unix/sysv/linux/nios2/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Likewise. * sysdeps/unix/sysv/linux/tile/sysdep.h (HAVE_INTERNAL_SEND_SYMBOL): Likewise. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_RECV_SYSCALL): Define. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Remove define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove send from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewike. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/send.c: Simplify includes. (__ASSUME_SENDTO_FOR_SEND_SYSCALL): Replace by __ASSUME_SENDTO_SYSCALL. * sysdeps/unix/sysv/linux/x86_64/send.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/send.c: Likewise. * sysdeps/unix/sysv/linux/generic/send.c: Likewise.
* Consolidate Linux sendto implementationAdhemerval Zanella2017-03-091-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the sendto Linux syscall implementation on sysdeps/unix/sysv/linux/sendto.c. The changes are: 1. Define __ASSUME_SENDTO_SYSCALL by default. 2. Undef it for architectures that do not support __NR_sendto. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove sendto from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Define by default. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Undef it is kernel does not support __NR_sendto. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Remove definition. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_SENDTO_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h: (__ASSUME_SENDTO_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sendto.c: Simplify includes.
* Consolidate Linux recv implementationAdhemerval Zanella2017-03-091-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the recv Linux syscall implementation on sysdeps/unix/sysv/linux/recv.c. The changes are: 1. Remove recv from auto-generation syscalls.list on the architecture that uses __NR_recv. 2. Define __NR_recv for architectures that supports it. It was done instead of defining in default kernel-features.h because current Linux practice for new ports is to implement only __NR_recvfrom [1] and it will require adding new kernel-features for ports that do not require it (aarch64 for instance). 3. Remove __ASSUME_RECVFROM_FOR_RECV_SYSCALL and decide to use __NR_recvfrom for recv generation based on __ASSUME_RECVFROM_SYSCALL. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove recv from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__ASSUME_RECV_SYSCALL): New define. * sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/ia64/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_RECV_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_RECVFROM_FOR_RECV_SYSCALL): Remove define. * sysdeps/unix/sysv/linux/generic/recv.c: Remove file. * sysdeps/unix/sysv/linux/mips/mips64/recv.c: Likewise. * sysdeps/unix/sysv/linux/x86_64/recv.c: Likewise. * sysdeps/unix/sysv/linux/recv.c: Simplify includes. (__libc_recv): Use __ASSUME_RECVFROM_SYSCALL instead of __ASSUME_RECVFROM_FOR_RECV_SYSCALL to issue recvfrom syscall. [1] include/asm-generic/unistd.h (__ARCH_WANT_SYSCALL_DEPRECATED)
* Consolidate Linux recvfrom implementationAdhemerval Zanella2017-03-091-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the recvfrom Linux syscall implementation on sysdeps/unix/sysv/linux/recvfrom.c. The changes are: 1. Define __ASSUME_RECVFROM_SYSCALL by default 2. Undef it for architectures that do not support __NR_recvfrom. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove recvfrom from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Define by default. (__ASSUME_RECVFROM_SYSCALL): Undef it if kernel does not support __NR_recvfrom. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Remove definition. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_RECVFROM_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/recvfrom.c: Simplify includes.
* Consolidate Linux connect implementationAdhemerval Zanella2017-03-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the connect Linux syscall implementation on sysdeps/unix/sysv/linux/accept.c. The changes are: 1. Remove connect from auto-generation syscalls.list on the architecture that uses __NR_connect. 2. Define __NR_connect as default (__ASSUME_CONNECT_SYSCALL) and undef for architectures that do not support it. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove connect from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/connect.c: Simplify include list. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_CONNECT_SYSCALL): Define. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_CONNECT_SYSCALL): Undef if kernel does not support it. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_CONNECT_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_CONNECT_SYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_CONNECT_SYSCALL): Likewise.
* Consolidate Linux accept implementationAdhemerval Zanella2017-03-091-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch consolidates the accept Linux syscall implementation on sysdeps/unix/sysv/linux/accept.c. The changes are: 1. Remove accept from auto-generation syscalls.list on the architecture that uses __NR_accept. 2. Define __NR_accept as default (__ASSUME_ACCEPT_SYSCALL) and undef for architectures that do not support it. 3. Remove __ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL and decide to use __NR_accept4 for accept generation based on __ASSUME_ACCEPT4_SYSCALL. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/accept.c (__libc_accept): Replace __ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL by __ASSUME_ACCEPT4_SYSCALL. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove accept from auto-generation list. * sysdeps/unix/sysv/linux/arm/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/generic/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/i386/kernel-features.h (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define. (__ASSUME_ACCEPT_SYSCALL): Undefine. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_ACCEPT_SYSCALL): New define. * sysdeps/unix/sysv/linux/m68k/kernel-features.h (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define. (__ASSUME_ACCEPT_SYSCALL): Define wheter kernel version supports. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_ACCEPT_SYSCALL): Define. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h (__ASSUME_ACCEPT_SYSCALL): Undefine. * sysdeps/unix/sysv/linux/s390/kernel-features.h (__ASSUME_ACCEPT4_FOR_ACCEPT_SYSCALL): Remove define. (__ASSUME_ACCEPT_SYSCALL): Undefine. * sysdeps/unix/sysv/linux/sh/kernel-features.h (__ASSUME_ACCEPT_SYSCALL): Undefine. * sysdeps/unix/sysv/linux/sparc/kernel-features.h (__ASSUME_ACCEPT_SYSCALL): Undefine for 32 bits.
* Test for correct setting of errno.Yury Norov2017-03-081-0/+8
| | | | | | | | | | | | | | | This patch adds tests for POSIX and Linux specific syscalls that implemented with syscall templates machinery. The reason of tests is to receive the expected error code and test if it's handled properly by glibc. 2017-03-08 Yury Norov <ynorov@caviumnetworks.com> Zack Weinberg <zackw@panix.com> * posix/test-errno.c: New file. * posix/Makefile (tests): Add test-errno. * sysdeps/unix/sysv/linux/test-errno.c: New file. * sysdeps/unix/sysv/linux/Makefile (tests): Add test-errno.
* S390: Regenerate ULPsStefan Liebler2017-03-081-0/+4
| | | | | | | | | | | Updated ulps file. There are still fails for long double catan / catanh due to MPC bug. See post from Joseph Myers: https://www.sourceware.org/ml/libc-alpha/2017-03/msg00099.html ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.
* Fix auto-merge issue in ChangeLogFlorian Weimer2017-03-071-2/+0
|
* tzset: Clean up preprocessor macros min, max, signFlorian Weimer2017-03-071-0/+8
|
* timezone: Remove TZNAME_MAX limit from sysconf [BZ #15576]Florian Weimer2017-03-071-0/+18
| | | | | glibc does not impose a limit, and POSIX does not allow a sysconf limit which changes during the lifetime of a process.
* Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209)Siddhesh Poyarekar2017-03-071-0/+10
| | | | | | | | | | | | | | | | | | | The LD_HWCAP_MASK environment variable may alter the selection of function variants for some architectures. For AT_SECURE process it means that if an outdated routine has a bug that would otherwise not affect newer platforms by default, LD_HWCAP_MASK will allow that bug to be exploited. To be on the safe side, ignore and disable LD_HWCAP_MASK for setuid binaries. [BZ #21209] * elf/rtld.c (process_envvars): Ignore LD_HWCAP_MASK for AT_SECURE processes. * sysdeps/generic/unsecvars.h: Add LD_HWCAP_MASK. * elf/tst-env-setuid.c (test_parent): Test LD_HWCAP_MASK. (test_child): Likewise. * elf/Makefile (tst-env-setuid-ENV): Add LD_HWCAP_MASK.
* hppa: set __IPC_64 as zero for SysV IPC callsAdhemerval Zanella2017-03-071-0/+4
| | | | | | | | | | | | | In 1e5834c38a22 ("Refactor Linux ipc_priv header") a different approach to passing __IPC_64 as zero was created. Hppa kernel ABI requires to oass __IPC_64 as zero since it does not set CONFIG_ARCH_WANT_IPC_PARSE_VERSION in the kernel. Checked on hppa-linux-gnu with some adjustments to avoid BZ#21016 (basically by removing hppa compat implementations and adjusting required headers). * sysdeps/unix/sysv/linux/hppa/ipc_priv.h: New file.
* S390: Optimize atomic macros.Stefan Liebler2017-03-061-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch activates C11 atomic builtins by defining USE_ATOMIC_COMPILER_BUILTINS to 1. Note: E.g. in nptl/pthread_key_delete.c if compiled with GCCs 6 and before, an extra stack-frame is generated and the old value is stored on stack before cs instruction but it never loads this value from stack. An unreleased GCC 7 omit those stack operations. E.g. in nptl/pthread_once.c the condition code of cs instruction is evaluated by a sequence of ipm, sra, compare and jump instructions instead of one conditional jump instruction. This also occurs with an unreleased GCC 7. These shortcomings does not really hurt. Nevertheless, the gcc guys are investigating those ones and plan to fix them before GCC 7 release. The atomic_fetch_abc_def C11 builtins are now using load-and-abc instructions on z196 zarch and higher cpus instead of a loop with compare-and-swap instruction. Some of the non-C11 atomic macros from include/atomic.h are now implemented with help of the C11 atomic builtins. The other non-C11 atomic macros are using the macros defined here. ChangeLog: * sysdeps/s390/atomic-machine.h (USE_ATOMIC_COMPILER_BUILTINS): Define to 1. (__arch_compare_and_exchange_val_8_acq, __arch_compare_and_exchange_val_16_acq, __arch_compare_and_exchange_val_32_acq, __arch_compare_and_exchange_val_64_acq): Delete macro. (atomic_compare_and_exchange_val_acq, atomic_compare_and_exchange_val_rel, atomic_compare_and_exchange_bool_acq, catomic_compare_and_exchange_bool_acq, atomic_exchange_acq, atomic_exchange_rel, atomic_exchange_and_add_acq, atomic_exchange_and_add_rel, catomic_exchange_and_add, atomic_or_val, atomic_or, catomic_or, atomic_bit_test_set, atomic_and_val, atomic_and, catomic_and): Define macros with help of C11 atomic builtins.
* hurd: Provide truncate64 and ftruncate64.Justus Winter2017-03-041-0/+5
| | | | | * sysdeps/mach/hurd/ftruncate64.c: New file. * sysdeps/mach/hurd/truncate64.c: Likewise.
* tzset: Remove unused NOID macroFlorian Weimer2017-03-031-0/+5
|
* tzset: Remove __attribute_noinline__ from compute_offsetFlorian Weimer2017-03-031-0/+4
| | | | | | After commit 42261ad731991df345880b0b509d83b0b9a9b9d8, compute_offset is only called once, so not inlining it increases executable size.
* Remove header file inclusion guard from elf/get-dynamic-info.hFlorian Weimer2017-03-021-0/+4
| | | | | This file is included multiple times, so the guard is harmful. Fixes commit 9090848d0607e93fb08a1d68d9f263846ee33f02.
* Document and fix --enable-bind-now [BZ #21015]Florian Weimer2017-03-021-0/+17
|
* Narrowing the visibility of libc-internal.h even further.Zack Weinberg2017-03-011-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | posix/wordexp-test.c used libc-internal.h for PTR_ALIGN_DOWN; similar to what was done with libc-diag.h, I have split the definitions of cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN to a new header, libc-pointer-arith.h. It then occurred to me that the remaining declarations in libc-internal.h are mostly to do with early initialization, and probably most of the files including it, even in the core code, don't need it anymore. Indeed, only 19 files actually need what remains of libc-internal.h. 23 others need libc-diag.h instead, and 12 need libc-pointer-arith.h instead. No file needs more than one of them, and 16 don't need any of them! So, with this patch, libc-internal.h stops including libc-diag.h as well as losing the pointer arithmetic macros, and all including files are adjusted. * include/libc-pointer-arith.h: New file. Define cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN here. * include/libc-internal.h: Definitions of above macros moved from here. Don't include libc-diag.h anymore either. * posix/wordexp-test.c: Include stdint.h and libc-pointer-arith.h. Don't include libc-internal.h. * debug/pcprofile.c, elf/dl-tunables.c, elf/soinit.c, io/openat.c * io/openat64.c, misc/ptrace.c, nptl/pthread_clock_gettime.c * nptl/pthread_clock_settime.c, nptl/pthread_cond_common.c * string/strcoll_l.c, sysdeps/nacl/brk.c * sysdeps/unix/clock_settime.c * sysdeps/unix/sysv/linux/i386/get_clockfreq.c * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Don't include libc-internal.h. * elf/get-dynamic-info.h, iconv/loop.c * iconvdata/iso-2022-cn-ext.c, locale/weight.h, locale/weightwc.h * misc/reboot.c, nis/nis_table.c, nptl_db/thread_dbP.h * nscd/connections.c, resolv/res_send.c, soft-fp/fmadf4.c * soft-fp/fmasf4.c, soft-fp/fmatf4.c, stdio-common/vfscanf.c * sysdeps/ieee754/dbl-64/e_lgamma_r.c * sysdeps/ieee754/dbl-64/k_rem_pio2.c * sysdeps/ieee754/flt-32/e_lgammaf_r.c * sysdeps/ieee754/flt-32/k_rem_pio2f.c * sysdeps/ieee754/ldbl-128/k_tanl.c * sysdeps/ieee754/ldbl-128ibm/k_tanl.c * sysdeps/ieee754/ldbl-96/e_lgammal_r.c * sysdeps/ieee754/ldbl-96/k_tanl.c, sysdeps/nptl/futex-internal.h: Include libc-diag.h instead of libc-internal.h. * elf/dl-load.c, elf/dl-reloc.c, locale/programs/locarchive.c * nptl/nptl-init.c, string/strcspn.c, string/strspn.c * malloc/malloc.c, sysdeps/i386/nptl/tls.h * sysdeps/nacl/dl-map-segments.h, sysdeps/x86_64/atomic-machine.h * sysdeps/unix/sysv/linux/spawni.c * sysdeps/x86_64/nptl/tls.h: Include libc-pointer-arith.h instead of libc-internal.h. * elf/get-dynamic-info.h, sysdeps/nacl/dl-map-segments.h * sysdeps/x86_64/atomic-machine.h: Add multiple include guard.
* Miscellaneous low-risk changes preparing for _ISOMAC testsuite.Zack Weinberg2017-03-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are a grab bag of changes where the testsuite was using internal symbols of some variety, but this was straightforward to fix, and the fixed code should work with or without the change to compile the testsuite under _ISOMAC. Four of these are just more #include adjustments, but I want to highlight sysdeps/powerpc/fpu/tst-setcontext-fpscr.c, which appears to have been written before the advent of sys/auxv.h. I think a big chunk of this file could be replaced by a simple call to getauxval, but I'll let someone who actually has a powerpc machine to test on do that. dlfcn/tst-dladdr.c was including ldsodefs.h just so it could use DL_LOOKUP_ADDRESS to print an additional diagnostic; as requested by Carlos, I have removed this. math/test-misc.c was using #ifndef NO_LONG_DOUBLE, which is an internal configuration macro, to decide whether to do certain tests involving 'long double'. I changed the test to #if LDBL_MANT_DIG > DBL_MANT_DIG instead, which uses only public float.h macros and is equivalent on all supported platforms. (Note that NO_LONG_DOUBLE doesn't mean 'the compiler doesn't support long double', it means 'long double is the same as double'.) tst-writev.c has a configuration macro 'ARTIFICIAL_LIMIT' that the Makefiles are expected to define, and sysdeps/unix/sysv/linux/Makefile was using the internal __getpagesize in the definition; changed to sysconf(_SC_PAGESIZE) which is the POSIX equivalent. ia64-linux doesn't supply 'clone', only '__clone2', which is not defined in the public headers(!) All the other clone tests have local extern declarations of __clone2, but tst-clone.c doesn't; it was getting away with this because include/sched.h does declare __clone2. * nss/tst-cancel-getpwuid_r.c: Include nss.h. * string/strcasestr.c: No need to include config.h. * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Include sys/auxv.h. Don't include sysdep.h. * sysdeps/powerpc/tst-set_ppr.c: Don't include dl-procinfo.h. * dlfcn/tst-dladdr.c: Don't include ldsodefs.h. Don't use DL_LOOKUP_ADDRESS. * math/test-misc.c: Instead of testing NO_LONG_DOUBLE, test whether LDBL_MANT_DIG is greater than DBL_MANT_DIG. * sysdeps/unix/sysv/linux/Makefile (CFLAGS-tst-writev.c): Use sysconf (_SC_PAGESIZE) instead of __getpagesize in definition of ARTIFICIAL_LIMIT. * sysdeps/unix/sysv/linux/tst-clone.c [__ia64__]: Add extern declaration of __clone2.
* Add scripts/backport-support.shFlorian Weimer2017-02-281-0/+4
| | | | | This script is intended for maintaining the stable branches and distribution backports.
* sunrpc: Improvements for UDP client timeout handling [BZ #20257]Florian Weimer2017-02-281-0/+23
| | | | | | This commit fixes various aspects in the UDP client timeout handling. Timeouts are now applied in a more consistent fashion. Discarded UDP packets no longer prevent the timeout from happening at all.
* sunrpc: Do not unregister services if not registered [BZ #5010]Florian Weimer2017-02-281-0/+12
| | | | | | | | | The change in commit 718946816cf60374f9d8f674d3ed649fdb33205a has no effect because of two bugs which cancel each other out: The svc_is_mapped condition is inverted, and svc_is_mapped always returns false because the check is performed after the service has already been unregistered. As a result, pmap_unset is called unconditionally, as before.
* Refer to <signal.h> instead of <pthread.h> in <bits/sigthread.h>Andreas Schwab2017-02-281-0/+5
| | | | 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-271-0/+8
| | | | | | | | | | | 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-251-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-241-0/+5
| | | | | * 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-241-0/+5
| | | | | | | | | | | | | | 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-241-0/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-231-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-0/+3
| | | | | | | | | | | 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-221-0/+5
| | | | | * scripts/build-many-glibcs.py (Context.checkout): Default Linux kernel version to 4.10.
* Add IP_RECVFRAGSIZE from Linux 4.10.Joseph Myers2017-02-211-0/+4
| | | | | | | | | | 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-211-0/+4
| | | | * sysdeps/powerpc/fpu/libm-test-ulps: Update.
* powerpc: Add tests for __ppc_set_ppr_* functions.Wainer dos Santos Moschetta2017-02-211-0/+7
| | | | | | | | | | | | | 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-211-0/+11
| | | | | | | | | | | | | | | | 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-211-0/+6
| | | | | | * 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-201-0/+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-191-0/+4
| | | | * rt/tst-mqueue4.c: Include stdint.h.
* Update arm, mips, powerpc-nofpu libm-test-ulps.Joseph Myers2017-02-171-0/+7
| | | | | | | * 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-171-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.