aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-27powerpc64*: fix the order of implied sysdeps directoriesGabriel F. T. Gomes
The creation of the divergent sysdeps directory for powerpc64le commit 2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a Author: Paul E. Murphy <murphyp@linux.vnet.ibm.com> Date: Fri Jul 15 18:04:40 2016 -0500 powerpc64le: Create divergent sysdep directory for powerpc64le. allowed float128 to be enabled for powerpc64le (little-endian) and not for powerpc64 (big-endian). Since the only intended difference between them was the presence or absence of the float128 interface, the sysdeps directory for powerpc64le explicitly reused the files from powerpc64 (through the use of Implies files). Although this works, it also means that files under the powerpc64 directory might be preferred over files under powerpc64le. For instance, on a build for powerpc64le with target set to power9, a file from powerpc64/power5 might get built, even though a file with the same name exists in powerpc64le/power8. That happens because the processor hierarchy was only defined in the sysdeps directory for powerpc64 (and borrowed by powerpc64le). This patch fixes this behavior, by creating new subdirectories under powerpc64 (i.e.: powerpc64/be and powerpc64/le) and creating new Implies files to provide the hierarchy of processors for powerpc64 and powerpc64le separately. These changes have no effect on installed, stripped binaries (which remain unchanged). Tested that installed stripped binaries are unchanged and that there are no regressions on powerpc64 and powerpc64le.
2018-04-27Remove tilegx port.Joseph Myers
Since tile support has been removed from the Linux kernel for 4.17, this patch removes the (unmaintained) port to tilegx from glibc (the tilepro support having been previously removed). This reflects the general principle that a glibc port needs upstream support for the architecture in all the components it build-depends on (so binutils, GCC and the Linux kernel, for the normal case of a port supporting the Linux kernel but no other OS), in order to be maintainable. Apart from removal of sysdeps/tile and sysdeps/unix/sysv/linux/tile, there are updates to various comments referencing tile for which removal of those references seemed appropriate. The configuration is removed from README and from build-many-glibcs.py. contrib.texi keeps mention of removed contributions, but I updated Chris Metcalf's entry to reflect that he also contributed the non-removed support for the generic Linux kernel syscall interface. __ASSUME_FADVISE64_64_NO_ALIGN support is removed, as it was only used by tile. * sysdeps/tile: Remove. * sysdeps/unix/sysv/linux/tile: Likewise. * README (tilegx-*-linux-gnu): Remove from list of supported configurations. * manual/contrib.texi (Contributors): Mention Chris Metcalf's contribution of support for generic Linux kernel syscall interface. * scripts/build-many-glibcs.py (Context.add_all_configs): Remove tilegx configurations. (Config.install_linux_headers): Do not handle tile. * sysdeps/unix/sysv/linux/aarch64/ldsodefs.h: Do not mention Tile in comment. * sysdeps/unix/sysv/linux/nios2/Makefile: Likewise. * sysdeps/unix/sysv/linux/posix_fadvise.c: Likewise. [__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove conditional undefine and redefine. * sysdeps/unix/sysv/linux/posix_fadvise64.c: Do not mention Tile in comment. [__ASSUME_FADVISE64_64_NO_ALIGN] (__ALIGNMENT_ARG): Remove conditional undefine and redefine.
2018-04-26Add tst-sigaction.c to test BZ #23069Aurelien Jarno
This simple test uses sigaction to define a signal handler. It then uses sigaction again to fetch the information about the same signal handler, and check that they are consistent. This is enough to detect mismatches between struct kernel_sigaction and the kernel version of struct sigaction, like in BZ #23069. Changelog: * signal/tst-sigaction.c: New file to test BZ #23069. * signal/Makefile (tests): Fix indentation. Add tst-sigaction.
2018-04-26Increase robustness of internal dlopen() by using RTLD_NOW [BZ #22766]Tulio Magno Quites Machado Filho
Prevent random runtime crashes due to missing symbols caused by mixed libnss_* versions. [BZ #22766] * include/dlfcn.h [__libc_dl_open]: Replace RTLD_LAZY with RTLD_NOW. * sysdeps/gnu/unwind-resume.c (__lib_gcc_s_init): Replace __libc_dlopen_mode() using RTLD_NOW with __libc_dlopen. * sysdeps/nptl/unwind-forcedunwind.c: Likewise. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2018-04-25Consolidate getdirentries{64} implementationAdhemerval Zanella
This patch consolidates Linux getdirentries{64} implementation on just the default sysdeps/unix/sysv/linux/getdirentries{64} ones. The default implementation handles the Linux requirements: * getdirentries is only built for _DIRENT_MATCHES_DIRENT64 being 0. * getdirentries64 is always built and aliased to getdents for ABIs that define _DIRENT_MATCHES_DIRENT64 to 1. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/getdirentries.c (getdirentries): Build iff _DIRENT_MATCHES_DIRENT64 is not defined. * sysdeps/unix/sysv/linux/getdirentries64.c (getdirentries64): Open implementation and alias to getdirentries if _DIRENT_MATCHES_DIRENT64 is defined. * sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c: Remove file. * sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c: Remove file.
2018-04-25Use GCC 8 in build-many-glibcs.py by default.Joseph Myers
Now that GCC 8 has branched, this patch makes build-many-glibcs.py default to using GCC 8 branch instead of GCC 7. The effect should be that all builds complete cleanly and the compilation parts of the glibc testsuite complete cleanly except for on i686-gnu (with GCC 7 there were testsuite failures for some other configurations as well). I've replaced my bot building using GCC 6 branch with one using GCC 8 branch. (Of course glibc should continue building with GCC 6 - and for that matter GCC 5 and 4.9, which are no longer maintained, are supported versions as well - but building with GCC 6 will no longer be included in my bot testing.) * scripts/build-many-glibcs.py (Context.checkout): Default GCC version to GCC 8 branch.
2018-04-24Fix Hurd glibc build with GCC 8.Joseph Myers
The build of glibc for Hurd has been failing with GCC mainline because of the checks that aliases have the same type as the symbol aliased; the Hurd dl-sysdep.c has a macro that defines aliases without using the proper type. When GCC 8 branches (soon), I intend to make it the default version in build-many-glibcs.py, so these failures would mean the default build-many-glibcs.py build fails for Hurd again. This patch fixes the Hurd build with GCC 8 by changing the macro that defines the problem aliases to use the correct type for them. An include of <not-errno.h> is needed to avoid this use of typeof resulting in an error for __access_noerrno not being declared. Tested compilation for i686-gnu with build-many-glibcs.py. * sysdeps/mach/hurd/dl-sysdep.c: Include <not-errno.h>. (check_no_hidden): Use type of original function when declaring alias.
2018-04-24Fix tst-strfmon_l test for hr_HR localeMike FABIAN
The test needs to be adapted for the change in the thousands separators: “hr_HR locale: fix thousands_sep and mon_thousands_sep” [BZ #23094]
2018-04-24Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.Joseph Myers
This patch adds the PTRACE_SECCOMP_GET_METADATA constant from Linux 4.16 to all relevant sys/ptrace.h files. A type struct __ptrace_seccomp_metadata, analogous to other such types, is also added. Tested for x86_64, and with build-many-glibcs.py. * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): New enum value and macro. * sysdeps/unix/sysv/linux/bits/ptrace-shared.h (struct __ptrace_seccomp_metadata): New type. * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/arm/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/ia64/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/tile/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise. * sysdeps/unix/sysv/linux/x86/sys/ptrace.h (PTRACE_SECCOMP_GET_METADATA): Likewise.
2018-04-23Consolidate alphasort{64} and versionsort{64} implementationAdhemerval Zanella
This patch consolidates both alphasort{64} and versionsort{64} implementation on just the default dirent/alphasort{64}c and dirent/versionsort{64} respectively. It changes the logic to follow the conventions used on other code consolidation: * the non-LFS variant is only built for _DIRENT_MATCHES_DIRENT64 being 0. * the LFS variant is always built and aliased to getdents for ABIs that define _DIRENT_MATCHES_DIRENT64 to 1. Also on Linux the compat symbol for old non-LFS dirent64 definition requires a platform-specific scandir64.c. For powerpc32 and sparcv9 it requires to add specific arch-implementation to override the generic Linux one because neither ABI exports an compat symbol for non-LFS alphasort64 and versionsort64 variant. It is most likely a bug and it is also not one that can be fixed (in that there would be existing binaries expecting both meanings of that symbol at its single existing version, with binaries expecting the new meaning probably much more common than those expecting the original meaning of that symbol at that version). Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and powerpc64le-linux-gnu. * dirent/alphasort.c (alphasort): Build iff _DIRENT_MATCHES_DIRENT64 is defined. * dirent/versionsort.c (versionsort): Likewise. * dirent/alphasort64.c (alphasort64): Build regardless and alias to alphasort if _DIRENT_MATCHES_DIRENT64 is defined. * dirent/versionsort64.c (versionsort64): Likewise. * sysdeps/unix/sysv/linux/i386/alphasort64.c: Remove file. * sysdeps/unix/sysv/linux/arm/alphasort64.c: Likewise. * sysdeps/unix/sysv/linux/arm/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/m68k/alphasort64.c: Likewise. * sysdeps/unix/sysv/linux/m68k/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/alphasort64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/i386/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/alphasort64.c: New file. * sysdeps/unix/sysv/linux/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/alphasort64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/versionsort64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/alphasort64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/versionsort64.c: Likewise.
2018-04-23Add NT_PPC_PKEY from Linux 4.16 to elf.h.Joseph Myers
This patch adds the NT_PPC_PKEY macro from Linux 4.16 to elf.h. Tested for x86_64. * elf/elf.h (NT_PPC_PKEY): New macro.
2018-04-23NEWS: Reindent and copyeditZack Weinberg
Make the indentation of the "Deprecated and removed features" section for 2.28 consistent with the indentation of the "Major new features" section above. Also, consistently refer to "stdio functions" instead of "stdio.h functions".
2018-04-23hr_HR locale: fix thousands_sep and mon_thousands_sepDragan Stanojevic - Nevidljivi
[BZ #23094] * localedata/locales/hr_HR: fix thousands_sep and mon_thousands_sep
2018-04-20Define XTABS to TAB3 on alpha to match Linux 4.16.Joseph Myers
This patch makes the alpha bits/termios.h define XTABS to TAB3, so matching a change made in Linux 4.16 as well as matching other architectures where the values are already equal. Tested with build-many-glibcs.py for alpha-linux-gnu. * sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_MISC] (XTABS): Define to TAB3.
2018-04-20Update hppa libm-test-ulpsAdhemerval Zanella
* sysdeps/hppa/fpu/libm-test-ulps: Update.
2018-04-20Consolidate scandir{at}{64} implementationAdhemerval Zanella
This patch consolidates scandir{at}{64} implementation on just the default dirent/scandir{at}{64}{_r}.c ones. It changes the logic to follow the conventions used on other code consolidation: * scandir{at} is only built for _DIRENT_MATCHES_DIRENT64 being 0. * scandir{at}{64} is always built and aliased to getdents for ABIs that define _DIRENT_MATCHES_DIRENT64 to 1. Also on Linux the compat symbol for old non-LFS dirent64 definition requires a platform-specific scandir64.c. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and powerpc64le-linux-gnu. * dirent/scandir-tail-common.c: New file. * dirent/scandir-tail.c: Use scandir-tail-common.c. (__scandir_tail): Build iff _DIRENT_MATCHES_DIRENT64 is not defined. * dirent/scandir.c: Use scandir-tail-common.c. * dirent/scandirat.c: Likewise. * dirent/scandir64-tail.c: Use scandir-tail-common.c. * dirent/scandir64.c (scandir64): Always build and alias to scandir if _DIRENT_MATCHES_DIRENT64 is defined. * dirent/scandirat64.c (scandirat64): Likewise. * include/dirent.h (__scandir_tail): Only define iff _DIRENT_MATCHES_DIRENT64 is not defined. (__scandir64_tail): Define regardless. (__scandirat, scandirat64): Remove libc_hidden_proto. * sysdeps/unix/sysv/linux/arm/scandir64.c: Remove file. * sysdeps/unix/sysv/linux/m68k/scandir64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/scandir64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/scandir64.c: Likewise. * sysdeps/unix/sysv/linux/i386/scandir64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/scandir64.c: Likewise. * sysdeps/unix/sysv/linux/scandir64.c: New file.
2018-04-20Update aarch64 bits/hwcap.h, dl-procinfo.c for Linux 4.16 HWCAP_ASIMDFHM.Joseph Myers
This patch updates the aarch64 bits/hwcap.h and dl-procinfo.c for the new HWCAP_ASIMDFHM value in Linux 4.16. Tested with build-many-glibcs.py for aarch64-linux-gnu. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_ASIMDFHM): New macro. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c (_DL_HWCAP_COUNT): Increase to 24. (_dl_aarch64_cap_flags): Add asimdfhm.
2018-04-20hurd xfails: Add missing bug referencesSamuel Thibault
2018-04-20hurd: XFAIL tests for signal features not implemented yetSamuel Thibault
* conform/data/signal.h-data (SA_SIGINFO, SA_NOCLDWAIT): XFAIL on i386-gnu. * conform/data/sys/wait.h-data (WIFCONTINUED, WEXITED, WSTOPPED, WCONTINUED, WNOWAIT): XFAIL on i386-gnu.
2018-04-20hurd: XFAIL appearance of sched_param and sched_priority from <sys/types.h>Samuel Thibault
Reported at BZ #23088. * sysdeps/mach/hurd/i386/Makefile (test-xfail-POSIX/fcntl.h/conform): Add. (test-xfail-POSIX/signal.h/conform): Add. (test-xfail-POSIX/semaphore.h/conform): Add. (test-xfail-POSIX/regex.h/conform): Add. (test-xfail-POSIX/aio.h/conform): Add. (test-xfail-POSIX/mqueue.h/conform): Add. (test-xfail-POSIX/sys/types.h/conform): Add. (test-xfail-UNIX98/fcntl.h/conform): Add. (test-xfail-UNIX98/netdb.h/conform): Add. (test-xfail-UNIX98/signal.h/conform): Add. (test-xfail-UNIX98/semaphore.h/conform): Add. (test-xfail-UNIX98/regex.h/conform): Add. (test-xfail-UNIX98/aio.h/conform): Add. (test-xfail-UNIX98/ftw.h/conform): Add. (test-xfail-UNIX98/mqueue.h/conform): Add. (test-xfail-UNIX98/netinet/in.h/conform): Add. (test-xfail-UNIX98/sys/wait.h/conform): Add. (test-xfail-UNIX98/sys/sem.h/conform): Add. (test-xfail-UNIX98/sys/uio.h/conform): Add. (test-xfail-UNIX98/sys/socket.h/conform): Add. (test-xfail-UNIX98/sys/types.h/conform): Add. (test-xfail-UNIX98/stdlib.h/conform): Add. (test-xfail-UNIX98/arpa/inet.h/conform): Add. (test-xfail-POSIX2008/fcntl.h/conform): Add. (test-xfail-POSIX2008/netdb.h/conform): Add. (test-xfail-POSIX2008/signal.h/conform): Add. (test-xfail-POSIX2008/semaphore.h/conform): Add. (test-xfail-POSIX2008/regex.h/conform): Add. (test-xfail-POSIX2008/aio.h/conform): Add. (test-xfail-POSIX2008/mqueue.h/conform): Add. (test-xfail-POSIX2008/netinet/in.h/conform): Add. (test-xfail-POSIX2008/sys/wait.h/conform): Add. (test-xfail-POSIX2008/sys/socket.h/conform): Add. (test-xfail-POSIX2008/sys/types.h/conform): Add. (test-xfail-POSIX2008/arpa/inet.h/conform): Add. (test-xfail-XOPEN2K/fcntl.h/conform): Add. (test-xfail-XOPEN2K/netdb.h/conform): Add. (test-xfail-XOPEN2K/signal.h/conform): Add. (test-xfail-XOPEN2K/semaphore.h/conform): Add. (test-xfail-XOPEN2K/regex.h/conform): Add. (test-xfail-XOPEN2K/aio.h/conform): Add. (test-xfail-XOPEN2K/ftw.h/conform): Add. (test-xfail-XOPEN2K/mqueue.h/conform): Add. (test-xfail-XOPEN2K/netinet/in.h/conform): Add. (test-xfail-XOPEN2K/sys/wait.h/conform): Add. (test-xfail-XOPEN2K/sys/sem.h/conform): Add. (test-xfail-XOPEN2K/sys/uio.h/conform): Add. (test-xfail-XOPEN2K/sys/socket.h/conform): Add. (test-xfail-XOPEN2K/sys/types.h/conform): Add. (test-xfail-XOPEN2K/stdlib.h/conform): Add. (test-xfail-XOPEN2K/arpa/inet.h/conform): Add. (test-xfail-XOPEN2K8/fcntl.h/conform): Add. (test-xfail-XOPEN2K8/netdb.h/conform): Add. (test-xfail-XOPEN2K8/signal.h/conform): Add. (test-xfail-XOPEN2K8/semaphore.h/conform): Add. (test-xfail-XOPEN2K8/regex.h/conform): Add. (test-xfail-XOPEN2K8/aio.h/conform): Add. (test-xfail-XOPEN2K8/ftw.h/conform): Add. (test-xfail-XOPEN2K8/mqueue.h/conform): Add. (test-xfail-XOPEN2K8/netinet/in.h/conform): Add. (test-xfail-XOPEN2K8/sys/wait.h/conform): Add. (test-xfail-XOPEN2K8/sys/sem.h/conform): Add. (test-xfail-XOPEN2K8/sys/uio.h/conform): Add. (test-xfail-XOPEN2K8/sys/socket.h/conform): Add. (test-xfail-XOPEN2K8/sys/types.h/conform): Add. (test-xfail-XOPEN2K8/stdlib.h/conform): Add. (test-xfail-XOPEN2K8/arpa/inet.h/conform): Add.
2018-04-20Revert "hurd: Fix mach installed headers test"Samuel Thibault
This reverts commit d4379e0216d01fd1395b1f3b37255e3486760135: the proper headers are actually already getting installed.
2018-04-20Drop fpregset unused symbol expositionSamuel Thibault
* sysdeps/arm/sys/ucontext.h: Remove fpregset struct name, unused and non-compliant. * sysdeps/i386/sys/ucontext.h: Likewise. * sysdeps/m68k/sys/ucontext.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Likewise.
2018-04-20hurd: Fix hurd installed headers testSamuel Thibault
* sysdeps/hurd/include/hurd.h [!_ISOMAC]: Do not declare libc hidden prototypes. * sysdeps/hurd/include/hurd/fd.h [!_ISOMAC]: Likewise. * sysdeps/hurd/include/hurd/signal.h [!_ISOMAC]: Likewise.
2018-04-19hurd: Add missing RLIM_SAVED_MAX/CURSamuel Thibault
* bits/resource.h (RLIM_SAVED_MAX, RLIM_SAVED_CUR): New macros.
2018-04-19hurd: Fix termios.h symbolsSamuel Thibault
* bits/termios.h [__USE_XOPEN || __USE_XOPEN2K8] (IXANY): Define. [__USE_XOPEN && !__USE_XOPEN2K] (IUCLC, OLCUC): Define. [__USE_XOPEN] (OFDEL): New macro. [__USE_XOPEN && !__USE_XOPEN2K] (XCASE): New macro.
2018-04-19hurd: remove non-standard siginfo symbolSamuel Thibault
* bits/types/siginfo_t.h: Remove siginfo struct name, unused and non-compliant.
2018-04-19hurd: fix sigevent's sigev_notify_attributes field typeSamuel Thibault
* sysdeps/pthread/bits/types/sigevent_t.h: New file, based on the generic version but include <bits/pthreadtypes.h> to make struct sigevent's sigev_notify_attributes field a pthread_attr_t*.
2018-04-19Update sysdeps/nios2/libm-test-ulpsChung-Lin Tang
2018-04-19hurd: Avoid exposing all <sched.h> symbols from sys/types.hSamuel Thibault
* bits/sched.h: Include <bits/types/struct_sched_param.h> and move struct sched_param definition to it. * sysdeps/unix/sysv/linux/bits/sched.h: Likewise. * bits/types/struct_sched_param.h: New file. * sysdeps/htl/bits/types/struct___pthread_attr.h: Include <bits/types/struct_sched_param.h> instead of <sched.h>. * posix/Makefile (headers): Add bits/types/struct_sched_param.h.
2018-04-19Fix mips64n32 getdents aliasAdhemerval Zanella
Fix commit 298d0e3 for mips64n32, checked on a mips64n32-linux-gnu build. * sysdeps/unix/sysv/linux/mips/mips64/getdents64.c (__getdents64): Only alias to __getdents for _DIRENT_MATCHES_DIRENT64.
2018-04-19hurd: Fix symbols expositionSamuel Thibault
* bits/in.h [!__USE_MISC]: Do not define struct ip_opts. * conform/data/netinet/in.h-data: Allow sin_ and sin6_ prefix. * sysdeps/gnu/bits/msq.h (struct msqid_ds): Use __wait_queue struct instead of wait_queue. * sysdeps/gnu/bits/shm.h (struct shmid_ds): Use __vm_area_struct instead of vm_area_struct.
2018-04-19Consolidate Linux getdents{64} implementationAdhemerval Zanella
This patch consolidates Linux getdents{64} implementation on just the default sysdeps/unix/sysv/linux/getdents{64}{_r}.c ones. Although this symbol is used only internally, the non-LFS version still need to be build due the non-LFS getdirentries which requires its semantic. The non-LFS default implementation now uses the wordsize-32 as base which uses getdents64 syscall plus adjustment for overflow (it allows to use the same code for architectures that does not support non-LFS getdents syscall). It has two main differences to wordsize-32 one: - DIRENT_SET_DP_INO is added to handle alpha requirement to zero the padding. - alloca is removed by allocating a bounded temporary buffer (it increases stack usage by roughly 276 bytes). The default implementation handle the Linux requirements: * getdents is only built for _DIRENT_MATCHES_DIRENT64 being 0. * getdents64 is always built and aliased to getdents for ABIs that define _DIRENT_MATCHES_DIRENT64 to 1. * A compat symbol is added for getdents64 for ABI that used to export the old non-LFS version. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, sparc64-linux-gnu, powerpc-linux-gnu, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/alpha/getdents.c: Add comments with alpha requirements. (_DIRENT_MATCHES_DIRENT64): Undef * sysdeps/unix/sysv/linux/alpha/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/arm/getdents64.c: Remove file. * sysdeps/unix/sysv/linux/generic/getdents.c: Likewise. * sysdeps/unix/sysv/linux/generic/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/generic/wordsize-32/getdents.c: Likewise. * sysdeps/unix/sysv/linux/getdents.c: Simplify implementation by use getdents64 syscalls as base. * sysdeps/unix/sysv/linux/getdents64.c: Likewise and add compatibility symbol if required. * sysdeps/unix/sysv/linux/hppa/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/i386/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/m68k/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/getdents.c: Likewise. * sysdeps/unix/sysv/linux/wordsize-64/getdents64.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c (__get_clockfreq_via_proc_openprom): Use __getdents64. * sysdeps/unix/sysv/linux/mips/mips64/getdents64.c: New file.
2018-04-19Disable lock elision for mutex pretty printer tests.Stefan Liebler
If e.g. the testcase nptl/test-mutex-printers is run with enabled lock-elision, it fails on s390x with: Error: Response does not match the expected pattern. Command: print *mutex Expected pattern: pthread_mutex_t Response: No symbol "mutex" in current context. (gdb) See https://www.sourceware.org/ml/libc-alpha/2018-03/msg00583.html for more details. In fact the mutex pretty printer tests rely on looking at the internal details of the lock, thus we disable it by setting up the GLIB_TUNABLES environment variable inside gdb. ChangeLog: * scripts/test_printers_common.py (init_test): Disable lock elision.
2018-04-19Use volatile global counters in test-tgmath.c.Stefan Liebler
If build with -Os on s390x, the test-tgmath fails with: float functions not called often enough (-10000) Within compile_testf(), the counter (count_float) is saved before the complex functions are called. Afterwards the saved counter differs to the current-counter. But the tests with the complex functions do not increment count_float! Instead count_float is saved to a register before calling totalorder and totalordermag which both increment count_float. The compiler is allowed to do that as totalorderf and totalordermagf is declared with __attribute__ ((__const__)) in math/bits/mathcalls.h. Thus this patch adjusts the global counters to be volatile. Then count_float is saved after totalordermag. ChangeLog: * math/test-tgmath.c (count_double, count_float, count_ldouble, count_cdouble, count_cfloat, count_cldouble): Use volatile int.
2018-04-19hurd: Update struct statfs according to struct statvfsSamuel Thibault
* sysdeps/mach/hurd/bits/statfs.h (struct statfs): Make f_bsize, f_namemax, f_frsize, and f_flag fields unsigned long int instead of unsigned int. (struct statfs64): Likewise.
2018-04-19hurd: Fix standard compliance of some statvfs fieldsSamuel Thibault
Standards require that the f_bsize, f_frsize, f_flag and f_namemax fields be unsigned long. They used to be only unsigned on hurd, which happens to be compatible with unsigned long on the only existing, 32bit, port. We can thus merely fix the type. * sysdeps/mach/hurd/bits/statvfs.h (struct statvfs): Make f_bsize, f_namemax, f_frsize, and f_flag fields unsigned long int instead of unsigned int. (struct statvfs64): Likewise.
2018-04-19hurd: xfail some structure fields ABI incompatibility with standardsSamuel Thibault
* sysdeps/mach/hurd/i386/Makefile [$(subdir) = conform] (conformtest-xfail-conds): Add i386-gnu. * conform/data/fcntl.h-data (flock.l_type, flock.l_whence): XFAIL for i386-gnu. * conform/data/sys/ipc.h-data (ipc_perm.uid, ipc_perm.gid, ipc_perm.cuid, ipc_perm.cgid): Likewise. * conform/data/sys/msg.h-data (msqid_ds.msg_lspid, msqid_ds.msg_lrpid): Likewise. * conform/data/sys/shm.h-data (shmid_ds.shm_lpid, shmid_ds.shm_cpid): Likewise. * conform/data/sys/stat.h-data (stat.st_dev): Likewise. * conform/data/sys/statvfs.h-data (statvfs.f_fsid): Likewise.
2018-04-19hurd: Fix mach installed headers testSamuel Thibault
* include/lock-intern.h [!_ISOMAC]: Do not declare libc hidden prototypes. * include/mach.h [!_ISOMAC]: Likewise. * include/mach/mig_support.h [!_ISOMAC]: Likewise. * include/mach_error.h [!_ISOMAC]: Likewise.
2018-04-19Revert "Fix sched_param"Samuel Thibault
This reverts commit 783c4820303fb6b031d401564f8089ecaf154b62 which accidentaly flew out.
2018-04-18conform sys/un.h: Allow sun_ prefix, not only sun_lenSamuel Thibault
* conform/data/sys/un.h-data: Allow sun_ prefix.
2018-04-18Fix sched_paramSamuel Thibault
2018-04-18Make build-many-glibcs.py build GCC for powerpcspe with --enable-obsolete.Joseph Myers
The powerpcspe GCC port has been obsoleted in GCC 8 for not having had the removal of code for non-SPE processors completed. This patch accordingly arranges for build-many-glibcs.py to configure GCC with --enable-obsolete for affected configurations. This is temporary; either the port gets cleaned up and unobsoleted in GCC and the configure option can be removed, or the port gets removed in GCC and we should remove the corresponding glibc support. Tested with build-many-glibcs.py for the affected configurations. * scripts/build-many-glibcs.py (Context.add_all_configs): Use --enable-obsolete for powerpc-linux-gnuspe.
2018-04-18hurd: Fix spurious installation of headers defining hidden prototypesSamuel Thibault
* sysdeps/mach/include/lock-intern.h: Move to include/. * sysdeps/mach/include/mach.h: Move to include/. * sysdeps/mach/include/mach/mig_support.h: Move to include/mach/. * sysdeps/mach/include/mach_error.h: Move to include/.
2018-04-18hurd: fix conformity test for sys/un.hSamuel Thibault
sun_len is used by BSD systems, and conformant. * conform/data/sys/un.h-data (struct sockaddr_un): Allow sun_len member.
2018-04-16arm: Remove ununsed ARM code in optimized implementationAdhemerval Zanella
This patch removes the ununsed ARM code path for armv6t2 memchr and strlen and armv7 memch and strcmp. In all implementation, the ARM code is not used in any possible build (unless glibc is explicit build with the non-documented NO_THUMB compiler flag) and for armv7 the resulting code either produces wrong results (memchr) and throw build error (strcmp). Checked on arm-linux-gnueabihf built targeting both armv6 and armv7. * sysdeps/arm/armv6t2/memchr.S (memchr): Remove ARM code path. * sysdeps/arm/armv6t2/strlen.S (memchr): Likewise. * sysdeps/arm/armv7/multiarch/memchr_neon.S (memchr): Likewise. * sysdeps/arm/armv7/strcmp.S (strcmp): Likewise.
2018-04-16Add aliases to recognize normalized charset names (bug 19527)Andreas Schwab
2018-04-15Improves __ieee754_exp(x) performance by 18-37% when |x| < 1.0397Patrick McGehearty
Adds a fast path to e_exp.c when |x| < 1.03972053527832. When values are tested in isolation, reduction in execution time is: aarch 30%, sparc 18%, x86 37%. When comparing benchtests/bench.out which includes values outside that range, the gains are: aarch 8%, sparc 5%, x86 9%. make check is clean (no increase in ulp for any math test). Testing 20M values for each rounding mode in that range shows approximately one in 200 values is off by 1 ulp. No value tested for exp(x) changed by 2 or more ulp. No observed change in performance or accuracy for x outside fast path range. These changes will be active for all platforms that don't provide their own exp() routines. They will also be active for ieee754 versions of ccos, ccosh, cosh, csin, csinh, sinh, exp10, gamma, and erf.
2018-04-12Update kernel version in syscall-names.list to 4.16.DJ Delorie
Linux 4.16 does not add any new syscalls; this patch updates the version number in syscall-names.list to reflect that it's still current for 4.16. Tested for x86_64 (compilation with build-many-glibcs.py, using Linux 4.16). * sysdeps/unix/sysv/linux/syscall-names.list: Update kernel version to 4.16.
2018-04-12S390: Fix struct sigaction for 31bit in kernel_sigaction.h.Stefan Liebler
The recent commit b4a5d26d8835d972995f0a0a2f805a8845bafa0b "linux: Consolidate sigaction implementation" changed the definition of struct sigaction for s390 (31bit). Unfortunately the order of the fields were wrong. This leads to blocking testcases e.g. nptl/tst-sem11. A thread which blocks due to sem_wait() is cancelled via pthread_cancel() and the signal-handler sigcancel_handler (see <glibc-src>/nptl/nptl-init.c is called. But it just returns as the siginfo_t argument is not setup by the kernel. Then the main-thread is blocking due to pthread_join(). The flag SA_SIGINFO is set in sa_flags in struct sigaction and is copied to the "kernel_sigaction.h" struct by the sigaction() call, but due to the wrong ordering of the struct fields, the kernel does not recognize it.
2018-04-09resolv: Fully initialize struct mmsghdr in send_dg [BZ #23037]Florian Weimer