Commit Graph

22366 Commits

Author SHA1 Message Date
Tulio Magno Quites Machado Filho 3392791442 Replace M_SUF (M_LN2) with M_MLIT (M_LN2)
According to math-type-macros.h, M_SUF should be used to paste the
suffix used by functions, while M_MLIT is used with macro constants.

	* math/e_exp2_template.c: Replace M_SUF (M_LN2) with M_MLIT (M_LN2).

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2018-04-27 17:13:10 -03:00
Tulio Magno Quites Machado Filho 06135c33b7 Replace M_SUF (fabs) with M_FABS
math-type-macros.h provides the macro M_FABS in order to reference
the correct fabs function for a specific type.
In most of the cases, M_FABS is identical to M_SUF (fabs), but that
may change in the future.

	* math/w_acos_template.c: Replace M_SUF (fabs) with M_FABS.
	* math/w_asin_template.c: Likewise.
	* math/w_atanh_template.c: Likewise.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2018-04-27 17:11:29 -03:00
Gabriel F. T. Gomes 3a33b06969 powerpc64*: fix the order of implied sysdeps directories
The creation of the divergent sysdeps directory for powerpc64le

commit 2f7f3cd8cd
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-27 16:32:01 -03:00
Joseph Myers a3fb6b6bc3 Remove tilegx port.
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-27 19:11:24 +00:00
Aurelien Jarno 7a6f747871 Add tst-sigaction.c to test BZ #23069
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-26 22:21:13 +02:00
Tulio Magno Quites Machado Filho 81b49e9692 Increase robustness of internal dlopen() by using RTLD_NOW [BZ #22766]
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-26 10:41:43 -03:00
Adhemerval Zanella 7d80f48e93 Consolidate getdirentries{64} implementation
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-25 17:55:33 -03:00
Joseph Myers 42a2bf58ff Use GCC 8 in build-many-glibcs.py by default.
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-25 15:05:01 +00:00
Joseph Myers 5e14bb9793 Fix Hurd glibc build with GCC 8.
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-24 16:33:47 +00:00
Joseph Myers 9320ca88a1 Add PTRACE_SECCOMP_GET_METADATA from Linux 4.16 to sys/ptrace.h.
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-24 12:11:35 +00:00
Adhemerval Zanella af7e376b00 Consolidate alphasort{64} and versionsort{64} implementation
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-23 17:35:16 -03:00
Joseph Myers da5e0361d9 Add NT_PPC_PKEY from Linux 4.16 to elf.h.
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-23 19:41:09 +00:00
Dragan Stanojevic - Nevidljivi ea76691a75 hr_HR locale: fix thousands_sep and mon_thousands_sep
[BZ #23094]
	* localedata/locales/hr_HR: fix thousands_sep and
	mon_thousands_sep
2018-04-23 17:00:26 +02:00
Joseph Myers 573963e32f Define XTABS to TAB3 on alpha to match Linux 4.16.
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-20 19:52:02 +00:00
Adhemerval Zanella 0900a84959 Update hppa libm-test-ulps
* sysdeps/hppa/fpu/libm-test-ulps: Update.
2018-04-20 15:36:41 -03:00
Adhemerval Zanella c0123b3b11 Consolidate scandir{at}{64} implementation
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-20 13:57:12 -03:00
Joseph Myers 458b94f63e Update aarch64 bits/hwcap.h, dl-procinfo.c for Linux 4.16 HWCAP_ASIMDFHM.
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-20 16:36:00 +00:00
Samuel Thibault cbc256b1dc hurd: XFAIL tests for signal features not implemented yet
* 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-20 02:27:54 +02:00
Samuel Thibault f00b62ec89 hurd: XFAIL appearance of sched_param and sched_priority from <sys/types.h>
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-20 01:56:57 +02:00
Samuel Thibault c5896a4595 Revert "hurd: Fix mach installed headers test"
This reverts commit d4379e0216d01fd1395b1f3b37255e3486760135: the proper
headers are actually already getting installed.
2018-04-20 01:27:13 +02:00
Samuel Thibault 81b032c833 Drop fpregset unused symbol exposition
* 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-20 01:27:13 +02:00
Samuel Thibault 5dbfe13b35 hurd: Fix hurd installed headers test
* 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-20 00:16:40 +02:00
Samuel Thibault a279b8ed9b hurd: Add missing RLIM_SAVED_MAX/CUR
* bits/resource.h (RLIM_SAVED_MAX, RLIM_SAVED_CUR): New macros.
2018-04-19 23:55:13 +02:00
Samuel Thibault a564872d2d hurd: Fix termios.h symbols
* 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-19 23:50:12 +02:00
Samuel Thibault ed37092475 hurd: remove non-standard siginfo symbol
* bits/types/siginfo_t.h: Remove siginfo struct name, unused and
	non-compliant.
2018-04-19 21:43:44 +02:00
Samuel Thibault 5cd2931ab8 hurd: fix sigevent's sigev_notify_attributes field type
* 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-19 21:43:44 +02:00
Chung-Lin Tang 9f0437e862 Update sysdeps/nios2/libm-test-ulps 2018-04-19 12:00:58 -07:00
Samuel Thibault e60c3f2bb7 hurd: Avoid exposing all <sched.h> symbols from sys/types.h
* 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-19 20:24:36 +02:00
Adhemerval Zanella 50511ca466 Fix mips64n32 getdents alias
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-19 15:21:07 -03:00
Samuel Thibault 77b9339028 hurd: Fix symbols exposition
* 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-19 20:14:45 +02:00
Adhemerval Zanella 298d0e3129 Consolidate Linux getdents{64} implementation
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-19 08:49:52 -03:00
Stefan Liebler 0085be1415 Disable lock elision for mutex pretty printer tests.
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-19 12:45:11 +02:00
Stefan Liebler da796524f8 Use volatile global counters in test-tgmath.c.
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-19 12:32:50 +02:00
Samuel Thibault f55a4fdefb hurd: Update struct statfs according to struct statvfs
* 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-19 02:25:03 +02:00
Samuel Thibault 9d9f8f03af hurd: Fix standard compliance of some statvfs fields
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-19 02:05:54 +02:00
Samuel Thibault 0dd25301f6 hurd: xfail some structure fields ABI incompatibility with standards
* 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-19 01:52:51 +02:00
Samuel Thibault d4379e0216 hurd: Fix mach installed headers test
* 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-19 00:42:14 +02:00
Samuel Thibault 3dc0814cba conform sys/un.h: Allow sun_ prefix, not only sun_len
* conform/data/sys/un.h-data: Allow sun_ prefix.
2018-04-18 21:07:44 +02:00
Joseph Myers d6397de369 Make build-many-glibcs.py build GCC for powerpcspe with --enable-obsolete.
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-18 16:07:19 +00:00
Samuel Thibault c4375964db hurd: Fix spurious installation of headers defining hidden prototypes
* 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-18 02:07:17 +02:00
Samuel Thibault 8323a9022e hurd: fix conformity test for sys/un.h
sun_len is used by BSD systems, and conformant.

	* conform/data/sys/un.h-data (struct sockaddr_un): Allow sun_len
	member.
2018-04-18 01:10:23 +02:00
Adhemerval Zanella 743b9c2a98 arm: Remove ununsed ARM code in optimized implementation
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-16 17:24:31 -03:00
Andreas Schwab 326e74e7c1 Add aliases to recognize normalized charset names (bug 19527) 2018-04-16 17:30:56 +02:00
Patrick McGehearty a14d8acd32 Improves __ieee754_exp(x) performance by 18-37% when |x| < 1.0397
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-15 18:46:37 -04:00
DJ Delorie a700e7cb37 Update kernel version in syscall-names.list to 4.16.
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-12 15:25:50 -04:00
Stefan Liebler d8abfab7d4 S390: Fix struct sigaction for 31bit in kernel_sigaction.h.
The recent commit b4a5d26d88
"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-12 09:37:26 +02:00
Florian Weimer 583a27d525 resolv: Fully initialize struct mmsghdr in send_dg [BZ #23037] 2018-04-09 10:08:16 +02:00
Adhemerval Zanella 942de61a89 Consolidate Linux readdir{64}{_r} implementation
This patch consolidates Linux readdir{64}{_r} implementation on just
the default sysdeps/unix/sysv/linux/readdir{64}{_r}.c ones.  The
default implementation handle the Linux requirements:

  * readdir{_r} is only built for _DIRENT_MATCHES_DIRENT64 being 0.

  * readdir64{_r} is always built and aliased to readdir{_r} for
    ABI that define _DIRENT_MATCHES_DIRENT64.

  * A compat symbol is added for readdir64{_r} 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/posix/readdir.c (__READDIR, __GETDENTS, DIRENTY_TYPE,
	__READDIR_ALIAS): Undefine after usage.
	* sysdeps/posix/readdir_r.c (__READDIR_R, __GETDENTS, DIRENT_TYPE,
	__READDIR_R_ALIAS): Likewise.
	* sysdeps/unix/sysv/linux/arm/readdir64.c: Remove file.
	* sysdeps/unix/sysv/linux/arm/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/m68k/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/i386/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/readdir.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/readdir64.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/readdir64_r.c: Likewise.
	* sysdeps/unix/sysv/linux/wordsize-64/readdir_r.c: Likewise.
	* sysdeps/unix/sysv/linux/readdir.c: New file.
	* sysdeps/unix/sysv/linux/readdir_r.c: Likewise.
	* sysdeps/unix/sysv/linux/readdir64.c: Add compat symbol if required.
	* sysdeps/unix/sysv/linux/readdir64_r.c: Likewise.
2018-04-06 17:49:02 -03:00
Adhemerval Zanella 243f59e5aa Update i386 libm-test-ulps.
Updated ulps after recent commit "[PATCH 1/7] sin/cos slow paths:
avoid slow paths for small inputs"
(19a8b9a300).

	* sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Update.
2018-04-06 17:24:15 -03:00
Andreas Schwab 690c3475f1 Fix missing @ before texinfo command 2018-04-06 08:56:24 +02:00