Commit Graph

21977 Commits

Author SHA1 Message Date
Samuel Thibault d23965cf88 Revert "hurd: Fix building io/tst-fchownat.c"
This reverts commit fc221145a7.
2018-01-28 19:13:20 +01:00
Samuel Thibault 7c5b106dcb hurd: Fix getifaddrs / freeifaddrs exposition
400669754d ('hurd: Fix nscd build') had the side effect of making
libc's freeaddrinfo expose freeifaddrs through __check_pf.  We can just
move the renames to gai.c itself, along others.

* sysdeps/mach/hurd/check_pf.c (__getifaddrs, __freeifaddrs): Do not
define macros.
* nscd/gai.c (__getifaddrs): Define macro to getifaddrs.
(__freeifaddrs): Define macro to freeifaddrs.
2018-01-28 19:06:15 +01:00
Samuel Thibault 28f6186f3e hurd: take __USE_EXTERN_INLINES into account and restrict inlines
* hurd/hurd.h (__hurd_fail): Always declare function, and provide inline
version only if __USE_EXTERN_INLINES is defined.
* hurd/hurd/fd.h (_hurd_fd_error_signal, _hurd_fd_error, __hurd_dfail,
__hurd_sockfail): Likewise.
(_hurd_fd_get): Always declare functions, and provide inline versions
only if __USE_EXTERN_INLINES and _LIBC are defined and IS_IN(libc).
* hurd/hurd/port.h (_hurd_port_init, _hurd_port_locked_get,
_hurd_port_get, _hurd_port_free, _hurd_port_locked_set,
_hurd_port_set): Always declare functions, and provide inline versions
only if __USE_EXTERN_INLINES and _LIBC are defined and
IS_IN(libc).
* hurd/hurd/signal.h (_hurd_self_sigstate, _hurd_critical_section_lock,
_hurd_critical_section_unlock): Likewise.
* hurd/hurd/threadvar.h (__hurd_threadvar_location_from_sp,
* __hurd_threadvar_location): Likewise.
* hurd/hurd/userlink.h (_hurd_userlink_link, _hurd_userlink_unlink,
_hurd_userlink_clear): Likewise.
* mach/lock-intern.h (__spin_lock_init, __spin_lock, __mutex_lock,
__mutex_unlock, __mutex_trylock): Always declare functions, and provide
inline versions only if __USE_EXTERN_INLINES and _LIBC are defined.
* mach/mach/mig_support.h (__mig_strncpy): Likewise.
* sysdeps/generic/machine-lock.h (__spin_unlock, __spin_try_lock,
__spin_lock_locked): Likewise.
* sysdeps/mach/i386/machine-lock.h (__spin_unlock, __spin_try_lock,
__spin_lock_locked): Likewise.
* mach/spin-lock.c (__USE_EXTERN_INLINES): Define to 1.
* hurd/Versions (libc: GLIBC_2.27): Add _hurd_fd_error_signal,
_hurd_fd_error, __hurd_dfail, __hurd_sockfail, _hurd_port_locked_set,
__hurd_threadvar_location_from_sp, __hurd_threadvar_location,
_hurd_userlink_link, _hurd_userlink_unlink, _hurd_userlink_clear.
2018-01-28 18:46:23 +01:00
Samuel Thibault 3fc1ecf935 hurd: Fix building io/tst-copy_file_range.c
* io/tst-copy_file_range.c [!defined CLONE_NEWNS]: Do not include
	<sys/mount.h>.
2018-01-28 17:56:49 +01:00
Samuel Thibault fc221145a7 hurd: Fix building io/tst-fchownat.c
* io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when
	_POSIX_CHOWN_RESTRICTED is defined to 0.
2018-01-28 17:52:46 +01:00
Samuel Thibault cef7166ac1 hurd: Fix building libio/tst-memstream3.c
FWRITE is already an fcntl.h macro.

	* libio/tst-memstream3.c (FWRITE): Rename to _FWRITE.
	(do_test_bz20181): Rename accordingly.
	* libio/tst-wmemstream3.c (FWRITE): Rename accordingly.
2018-01-28 17:45:41 +01:00
Samuel Thibault 5f982b0beb hurd: add base abilist files
* sysdeps/mach/hurd/libhurduser.abilist: New file.
	* sysdeps/mach/libmachuser.abilist: New file.
2018-01-28 17:26:35 +01:00
Thomas Schwinge 84814e2a40 hurd: Add missing fcntl-internal.h
* hurd/fcntl-internal.h: New file.
2018-01-28 17:05:40 +01:00
Samuel Thibault 400669754d hurd: Fix nscd build
nscd won't find check_* from inet/, it needs a sysdeps file.

	* sysdeps/mach/hurd/check_native.c: New file.
	* sysdeps/mach/hurd/check_pf.c: New file.
2018-01-28 16:28:48 +01:00
Samuel Thibault f8bee46cc2 hurd: Fix warnings
* hurd/hurd/lookup.h (__hurd_file_name_lookup, hurd_file_name_lookup,
	__hurd_file_name_split, hurd_file_name_split,
	__hurd_directory_name_split, hurd_directory_name_split,
	__hurd_file_name_lookup_retry, hurd_file_name_lookup_retry,
	hurd_file_name_path_lookup): Make lookup function parameter take a
	const char *name instead of char *name.
	* hurd/hurdlookup.c (__hurd_file_name_lookup, __hurd_file_name_split,
	__hurd_directory_name_split): Likewise.
	* hurd/lookup-retry.c (__hurd_file_name_lookup_retry): Likewise.
	* hurd/path-lookup.c (hurd_file_name_path_lookup): Likewise.
2018-01-28 16:23:59 +01:00
Samuel Thibault 844bf92148 hurd: Fix warning
* sysdeps/mach/hurd/spawni.c (__spawni): Make relpath and abspath
	const char * instead of char *.
2018-01-28 16:21:28 +01:00
Samuel Thibault 19fd8d0d3e hurd: Make build-many-glibcs.py use mainline gnumach
Some warnings need a couple of fixes in the gnumach headers.

        * scripts/build-many-glibcs.py (checkout_vcs): Add gnumach
        repository URLs, run autoreconf, and make it the default for now.
2018-01-28 15:48:04 +01:00
Samuel Thibault 660b7bff81 hurd: fix warning
* sysdeps/mach/hurd/getresgid.c (__getresgid): Set result from
	critical section to make code simpler and avoid warning.
	* sysdeps/mach/hurd/getresuid.c (__getresuid): Set result from
	critical section to make code simpler and avoid warning.
2018-01-27 23:49:18 +01:00
Samuel Thibault 41cdb1eb5a hurd: Fix enabling vm_copy
Benchmarked on
http://lists.gnu.org/archive/html/bug-hurd/2014-12/msg00081.html

	* sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to
	PAGE_COPY_THRESHOLD and set to benchmarked 16384.
2018-01-27 22:09:30 +01:00
Samuel Thibault f817775364 hurd: fix warning
Making `special_profil_failure' both avoids warning "variable
'special_profil_failure' set but not used", and makes it easier to
access with gdb.

	* sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
	to global scope.
2018-01-27 22:01:34 +01:00
Samuel Thibault 06fac9f503 hurd: fix warning
* sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
	__task_terminate would ever return successfully.
2018-01-27 22:00:23 +01:00
Samuel Thibault f4d3cee3a0 hurd: make build-many-glibcs.py use mainline mig
Some warnings come from code generated by mig, so we need a very recent
version for now.

        * scripts/build-many-glibcs.py (checkout_vcs): Add mig repository
        URL, and run autoreconf, make it the default for now.
2018-01-27 21:44:57 +01:00
Samuel Thibault 7dab2d00ee hurd: drop elder MACH_IPC_COMPAT handling
This was dropped from GNU Mach in 2006.

	* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
	* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
	* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
	MACH_IPC_COMPAT.
2018-01-27 21:40:08 +01:00
Samuel Thibault 903d3633ec hurd: fix warning
* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
	-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
2018-01-27 21:37:29 +01:00
Samuel Thibault d4d5b2ddf3 hurd: fix gcc build in build-many-glibcs.py
gcc's libcilkrts has never actually supported GNU/Hurd, and doesn't
automatically disable it, and the support was actually removed in gcc trunk,
so that will never actually be fixed there.

	* scripts/build-many-glibcs.py [os == gnu] (build_gcc): Pass
	--disable-libcilkrts to gcc configure.
2018-01-27 19:54:38 +01:00
Samuel Thibault 61a3a8c6ce hurd: fix warning
timer_ptr2id and timer_id2ptr are used to convert between
application-visible timer_t and struct timer_node *. timer_ptr2id was made
to use void * instead of timer_t in 49b650430e ('Update.') for no reason.
It happens that on Linux timer_t is void *, so both that change and this
commit are no-ops there, but not on systems where timer_t is not void *.

Using timer_ptr2id for filling sival_ptr also does not make sense since that
actually is a void *.

	* sysdeps/pthread/posix-timer.h (timer_ptr2id): Cast to timer_t
	instead of void *.
	* sysdeps/pthread/timer_create.c (timer_create): Do not use
	timer_ptr2id to cast struct timer_node * to void *.
2018-01-27 17:17:49 +01:00
Samuel Thibault 05ebfe87fa hurd: fix warning
* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Cast
	vm_address_t * to ElfW(Addr) * for dl_main parameter.
2018-01-27 16:49:05 +01:00
Samuel Thibault 147d1dbb9d hurd: fix warnings
* sysdeps/generic/sigsetops.h (__sigemptyset, __sigfillset,
	__sigandset, __sigorset, __sigaddset, __sigdelset): Make them really
	return 0.
2018-01-27 16:47:36 +01:00
Samuel Thibault 4f66dc2390 hurd: fix warning
* sysdeps/generic/sigset-cvt-mask.h: Include <sigsetops.h>.
2018-01-27 16:45:55 +01:00
Samuel Thibault b29848b99b hurd: fix warnings
* sysdeps/generic/not-cancel.h: Include <fcntl.h>, <unistd.h>,
	<sys/wait.h>, <time.h>, <sys/uio.h>.
	(NOT_CANCEL_H): Add inclusion guard.
2018-01-27 16:45:10 +01:00
Samuel Thibault 3538a4b6c3 hurd: fix warning
* resolv/res-close.c: Include <stdlib.h>.
2018-01-27 16:43:16 +01:00
Samuel Thibault da8168df01 hurd: fix warning
* sysdeps/mach/hurd/profil.c: Reuse `a' variable instead of introducing
	a `c' variable.
2018-01-27 16:33:29 +01:00
Samuel Thibault 85285a0ce7 hurd: fix warning
* sysdeps/mach/hurd/xmknodat.c: Include <sys/sysmacros.h>.
2018-01-27 16:32:16 +01:00
James Clarke 7e23a7ddf8 Update hppa libm-test-ulps
* sysdeps/hppa/fpu/libm-test-ulps: Update.

Signed-off-by: James Clarke <jrtc27@jrtc27.com>
2018-01-27 13:32:36 +01:00
James Clarke 3854c5a847 Update Alpha libm-test-ulps
* sysdeps/alpha/fpu/libm-test-ulps: Update.

Signed-off-by: James Clarke <jrtc27@jrtc27.com>
2018-01-27 13:31:38 +01:00
Rafal Luzynski 7817b14ab8 Add ChangeLog entry for "pl_PL: Add alternative month names". 2018-01-27 02:03:34 +01:00
Andreas Schwab 5503f413bf Build only shared libnsl objects if NIS is disabled (bug 22701) 2018-01-26 19:03:44 +01:00
Carlos O'Donell caaf7804e2 README: hppa no longer requires patches. 2018-01-26 09:49:54 -08:00
Patrick McGehearty 1cbf818d25 Update sparc ULPs.
* sysdeps/sparc/fpu/libm-test-ulps: Update
        cpow, ctan, ctanh, j0, j1, y0, yn ulps.
2018-01-26 08:23:01 -08:00
Carlos O'Donell 2ec0e7eade Revert Intel CET changes to __jmp_buf_tag (Bug 22743)
In commit cba595c350 and commit
f81ddabffd, ABI compatibility with
applications was broken by increasing the size of the on-stack
allocated __pthread_unwind_buf_t beyond the oringal size.
Applications only have the origianl space available for
__pthread_unwind_register, and __pthread_unwind_next to use,
any increase in the size of __pthread_unwind_buf_t causes these
functions to write beyond the original structure into other
on-stack variables leading to segmentation faults in common
applications like vlc. The only workaround is to version those
functions which operate on the old sized objects, but this must
happen in glibc 2.28.

Thank you to Andrew Senkevich, H.J. Lu, and Aurelien Jarno, for
submitting reports and tracking the issue down.

The commit reverts the above mentioned commits and testing on
x86_64 shows that the ABI compatibility is restored. A tst-cleanup1
regression test linked with an older glibc now passes when run
with the newly built glibc. Previously a tst-cleanup1 linked with
an older glibc would segfault when run with an affected glibc build.

Tested on x86_64 with no regressions.

Signed-off-by: Carlos O'Donell <carlos@redhat.com>
2018-01-25 23:43:46 -08:00
Samuel Thibault 47c4b4b060 hurd build-many-glibcs.py: use hurd mainline for now
* scripts/build-many-glibcs.py (checkout_vcs): Make hurd
	mainline the default for now.
2018-01-26 02:35:10 +01:00
Rafal Luzynski 65f6c94e68 Add ChangeLog entry for "uk_UA: Add alternative month names". 2018-01-26 00:24:05 +01:00
Palmer Dabbelt fb58aac5fe
Add support for the RISC-V-specific ELF flags
The RISC-V port defines ELF flags that enforce compatibility between
various objects.  This adds the shared support necessary for these
flags.

2018-01-25  Palmer Dabbelt  <palmer@sifive.com>

        * elf/cache.c (print_entry): Add FLAG_RISCV_FLOAT_ABI_SOFT and
        FLAG_RISCV_FLOAT_ABI_DOUBLE.
        * elf/elf.h (EF_RISCV_RVC): New define.
        (EF_RISCV_FLOAT_ABI): Likewise.
        (EF_RISCV_FLOAT_ABI_SOFT): Likewise.
        (EF_RISCV_FLOAT_ABI_SINGLE): Likewise.
        (EF_RISCV_FLOAT_ABI_DOUBLE): Likewise.
        (EF_RISCV_FLOAT_ABI_QUAD): Likewise.
        * sysdeps/generic/ldconfig.h (FLAG_RISCV_FLOAT_ABI_SOFT): New
        define.
        (FLAG_RISCV_FLOAT_ABI_DOUBLE): Likewise.
2018-01-25 10:06:19 -08:00
Andreas Schwab 128c43a2d6 LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotes
The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted
and single quoted context, so that neither shell nor makefile variable
references work.  Consistently put them in single quotes so that they can
refer to makefile variables.
2018-01-25 17:20:28 +01:00
Samuel Thibault 481306902f build-many-glibcs.py: Fix hurd-vcs checkout
* scripts/build-many-glibcs.py (checkout_vcs): Run autoconf.
2018-01-25 03:14:22 +01:00
Samuel Thibault f901500381 build-many-glibcs.py: Add hurd vcs support
* scripts/build-many-glibcs.py (checkout_vcs): Add hurd repository URL.
2018-01-25 03:03:51 +01:00
Joseph Myers 3005b70510 Add soft-float ColdFire to build-many-glibcs.py.
Since it turns out soft-float ColdFire has a different glibc ABI to
hard-float ColdFire, as well as various differences in which glibc
code gets built, this patch adds such a configuration to
build-many-glibcs.py to (hopefully) complete the set of ABIs being
tested.  (Note that the build for soft-float ColdFire is currently
broken even with GCC mainline - I have a glibc patch to fix this, but
it needs before-and-after build-many-glibcs.py comparison of stripped
binaries for all configurations before being committed.)

	* scripts/build-many-glibcs.py (Context.add_all_configs): Add
	soft-float ColdFire configuration.
2018-01-24 23:48:52 +00:00
Joseph Myers 69231fabdd Add localplt.data for ColdFire.
The sole failure for ColdFire in the compilation part of the glibc
testsuite is the localplt test.  This patch adds a localplt baseline
for ColdFire to eliminate that failure.  The difference from the
existing m68k baseline is that no PLT entry for _Unwind_Find_FDE is
expected, because ColdFire does not set
libc_cv_gcc_unwind_find_fde=yes.

Tested with build-many-glibcs.py.

	* sysdeps/unix/sysv/linux/m68k/localplt.data: Move to ....
	* sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data: ... here.
	* sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data: New file.
2018-01-24 23:43:33 +00:00
Joseph Myers d4c7e1d0fd Add no-FPU ColdFire math_private.h.
As with some other soft-float configurations, no-FPU ColdFire needs
various fenv.h functions and glibc-internal macros overridden in
math_private.h to avoid references to undefined FE_* macros when
building glibc.  This patch adds a suitable math_private.h, based on
the MicroBlaze one (Nios II and Tile also have similar files).

There's a case for having such a file in sysdeps/ieee754/soft-fp so
this logic is applied more generally to configurations without
exceptions and rounding modes, even when the relevant macros are
defined in fenv.h - the only case where that might be inappropriate is
ARM soft-float (where the fenv.h functions might or might not work at
runtime, depending on whether the processor used at runtime supports
VFP).  There's also a case that soft-float configurations (on
processors with both hard-float and soft-float) should more
consistently avoid defining FE_* macros in bits/fenv.h when not
actually supported.  But both of those are separate potential
cleanups.

This allows the no-FPU ColdFire build to get further (another fix is
needed to allow the build to complete).

	* sysdeps/m68k/coldfire/nofpu/math_private.h: New file.  Based on
	MicroBlaze file.
2018-01-24 23:33:03 +00:00
Joseph Myers 0cfe5be58f Add jmp_buf-macros.h for no-FPU ColdFire.
Continuing the fixes for ColdFire glibc build with
build-many-glibcs.py, given a GCC patch for the libgcc build failure,
this patch adds jmp_buf-macros.h for no-FPU ColdFire.  This allows the
no-FPU build to progress further than without the patch (although
other fixes are still needed for the build to complete).

	* sysdeps/unix/sysv/linux/m68k/coldfire/jmp_buf-macros.h: Move to
	....
	* sysdeps/unix/sysv/linux/m68k/coldfire/fpu/jmp_buf-macros.h:
	... here.
	* sysdeps/unix/sysv/linux/m68k/coldfire/nofpu/jmp_buf-macros.h:
	New file.
2018-01-24 23:22:28 +00:00
Joseph Myers 91b2cffa9f Add jmp_buf-macros.h for ColdFire.
This patch adds a jmp_buf-macros.h for ColdFire.  In conjunction with
a GCC patch to fix the libgcc build failure for ColdFire
<https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02064.html> this
suffices to restore the build (tested with build-many-glibcs.py).  A
further patch will be needed for soft-float ColdFire (while the
function-calling ABI is the same for hard-float and soft-float
ColdFire, it turns out the glibc ABI is not - so another ColdFire
variant will be needed in build-many-glibcs.py), but I'll deal with
that separately.

Tested with build-many-glibcs.py (m68k-linux-gnu and
m68k-linux-gnu-coldfire).  (There's a localplt test failure for
coldfire; that's the only failure in the compilation part of the
testsuite.)

	* sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h: Move to ....
	* sysdeps/unix/sysv/linux/m68k/m680x0/jmp_buf-macros.h: ... here.
	* sysdeps/unix/sysv/linux/m68k/coldfire/jmp_buf-macros.h: New
	file.
2018-01-24 22:26:24 +00:00
Szabolcs Nagy c739e191d0 aarch64: Revert the change of the __reserved member of mcontext_t
The uc_mcontext.__reserved member of ucontext_t is a user visible API,
that should not be changed, because this is the only way to access cpu
states of various extensions of linux asm/sigcontext.h, it does not
violate namespace rules either, so revert this part of the commit

commit 4fa9b3bfe6
Commit:     Joseph Myers <joseph@codesourcery.com>

    Fix mcontext_t sigcontext namespace (bug 21457).

(In principle the user can type cast &uc_mcontext to struct sigcontext*
to use the linux sigcontext fields, but that's not the existing practice
since mcontext_t used to be a typedef of struct sigcontext.)

	[BZ #22742]
	* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (__glibc_reserved1):
	Rename to __reserved and add comment.
	* sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (__glibc_reserved1):
	Rename to __reserved.
2018-01-24 11:53:30 +00:00
Joseph Myers 394b5bac88 Add build-many-glibcs.py support for Hurd.
This patch adds build-many-glibcs.py support for GNU Hurd.  Builds of
the i686-gnu configuration will fail until sufficient support is
merged to master, so completing build-many-glibcs.py coverage of all
glibc ABIs and making results accurately reflect the broken state of
builds for Hurd.

	* scripts/build-many-glibcs.py (Context.add_all_configs): Add
	i686-gnu configurations.
	(Context.run_builds): Include mig, gnumach and hurd in components
	considered.
	(Context.checkout): Add mig, gnumach and hurd to components.
	(Context.checkout_tar): Add URL mappings for mig, gnumach and
	hurd.
	(Context.bot_cycle): Check for changes to mig, gnumach and hurd.
	(Config.build): Install gnumach headers, build mig and install
	hurd headers for 'gnu' OS.
	(Config.install_gnumach_headers): New function.
	(Config.install_hurd_headers): Likewise.
	(Glibc.build_glibc): Do not use /usr for 'gnu' OS.  Specifiy MIG
	when building for 'gnu' OS.
2018-01-24 01:18:54 +00:00
Tobias Klauser 28c3f14f2e manual: Fix spelling of "Auxiliary." 2018-01-23 11:40:44 -08:00
Rical Jasan 0f5e2da160 manual: Touch up documentation for strftime and ALTMON_* constants.
"%OB" is considered a conversion specifier ("B" is the format
specifier), and the list of format specifiers for months in the
description of the optional "O" modifier was incomplete.  A
cross-reference from the ALTMON_* constants to the strftime section
is also provided.  Lastly, some grammatical fixes (commas) are made
and paragraphs refactored (rewrapped).

	* manual/locale.texi (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4,
	ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10,
	ALTMON_11, ALTMON_12): Improve documentation.
	* manual/time.texi (strftime): Likewise.
2018-01-22 19:36:51 -08:00