about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* RISC-V: Thread-Local Storage SupportPalmer Dabbelt2018-01-296-0/+269
| | | | | | | | | | | | | | | | | This patch implements TLS support for RISC-V. We support all four standard TLS addressing modes (LE, IE, LD, and GD) when running on Linux via NPTL. There is a draft psABI document that defines our TLS ABI here https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#thread-local-storage 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/dl-tls.h: New file. * sysdeps/riscv/libc-tls.c: Likewise. * sysdeps/riscv/nptl/tcb-offsets.sym: Likewise. * sysdeps/riscv/nptl/tls.h: Likewise. * sysdeps/riscv/stackinfo.h: Likewise.
* RISC-V: ABI ImplementationPalmer Dabbelt2018-01-2924-0/+1170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains code that needs to directly know about the RISC-V ABI, which is specified in a work-in-progress psABI document: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md This is meant to contain all the RISC-V code that needs to explicitly name registers or manage in-memory structure layout. This does not contain any of the Linux-specific code. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/__longjmp.S: New file. * sysdeps/riscv/backtrace.c: Likewise. * sysdeps/riscv/bits/endian.h: Likewise. * sysdeps/riscv/bits/setjmp.h: Likewise. * sysdeps/riscv/bits/wordsize.h: Likewise. * sysdeps/riscv/bsd-_setjmp.c: Likewise. * sysdeps/riscv/bsd-setjmp.c: Likewise. * sysdeps/riscv/dl-trampoline.S: Likewise. * sysdeps/riscv/gccframe.h: Likewise. * sysdeps/riscv/jmpbuf-offsets.h: Likewise. * sysdeps/riscv/jmpbuf-unwind.h: Likewise. * sysdeps/riscv/machine-gmon.h: Likewise. * sysdeps/riscv/memusage.h: Likewise. * sysdeps/riscv/setjmp.S: Likewise. * sysdeps/riscv/sys/asm.h: Likewise. * sysdeps/riscv/tls-macros.h: Likewise.
* Add documentation for __riscv_flush_icachePalmer Dabbelt2018-01-292-0/+21
| | | | | | | | | | | | This function is used by GCC to enforce ordering between data writes and instruction fetches, and while we'd prefer that users rely on the GCC intrinsic when possible this is user visible in case that's not possible. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * manual/platform.texi: Add RISC-V documenation for __riscv_flush_icache.
* Add RISC-V entries to config.h.inPalmer Dabbelt2018-01-292-0/+6
| | | | | | | | These were autogenerated. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * config.h.in: Regenerate.
* Skeleton documentation for the RISC-V portPalmer Dabbelt2018-01-294-5/+15
| | | | | | | | | | During the upstreaming process it was suggested that I add a handful of small documentation entries about the RISC-V port, which I've collected here. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * manual/math.texi: RISC-V supports _Float128 and _Float64x.
* sysdeps/init_array: Add PREINIT_FUNCTION to crti.SPalmer Dabbelt2018-01-292-0/+19
| | | | | | | | | | | | | The RISC-V port contains a crti.S that simply contains a link to PREINIT_FUNCTION (when defined). As this should be entirely generic, Joseph Myers suggested that we update the generic init_array version to contain this. Since RISC-V is the only user of init_array this won't break any existing ports. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/init_array/crti.S (.section .init_array): Add PREINIT_FUNCTION when defined.
* libnsl: Turn remaining symbols into compat symbols [BZ #22701]Florian Weimer2018-01-299-5/+31
|
* microblaze: don't use copy_file_range syscall with kernel headers < 4.10Romain Naour2018-01-292-0/+10
| | | | | | | | | | | | | | copy_file_range syscall was added for microblaze in 4.10. This patch makes the MicroBlaze kernel-features.h undefine __ASSUME_COPY_FILE_RANGE for toolchains built with kernel headers < 4.10. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h (__ASSUME_COPY_FILE_RANGE) [__LINUX_KERNEL_VERSION < 0x040A00]: Undef. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=7181e5590e5ba898804aef3ee6be7f27606e6f8b Signed-off-by: Romain Naour <romain.naour@gmail.com>
* Make build-many-glibcs.py clean git source directories.Joseph Myers2018-01-292-0/+6
| | | | | | | | | | | | | | | | | | With the git checkouts of Hurd components in build-many-glibcs.py involving running autoreconf, there's a risk that generated files could be left behind by an old autoreconf run (if an old version of the sources generates those files in the source directory but a new version does not). This patch avoids that by using git clean -dxfq when updating git checkouts. In this patch, that's conditional on --replace-sources, to avoid removing any local not-checked-in files someone may have in their checkout unless the option has been specifically passed that says it's OK to blow old checkouts away, complete with any local changes to them. * scripts/build-many-glibcs.py (Context.git_checkout): Use git clean -dxfq for git updates when replacing sources.
* Clean up build-many-glibcs.py libcilkrts disabling.Joseph Myers2018-01-292-3/+9
| | | | | | | | | | | | | | | | The disabling of libcilkrts in build-many-glibcs.py has some peculiarities. It's only for the final GCC build, not the initial bootstrap one, whereas normally anything disabled for the final build should be disabled for the bootstrap one as well. And it's only for Hurd, when it's more natural by analogy with the libsanitizer disabling to disable this library unconditionally, not only for targets where it's known to break. This patch cleans up that disabling accordingly, adding a comment so it's obvious it can be removed once GCC 7 is too old to build glibc. * scripts/build-many-glibcs.py (Config.build_gcc): Use --disable-libcilkrts unconditionally, not just for the final GCC build for Hurd.
* Use Linux 4.15 in build-many-glibcs.py.Joseph Myers2018-01-292-1/+6
| | | | | | | | This patch makes build-many-glibcs.py use Linux 4.15. Other glibc updates for Linux 4.15 can wait until after the 2.27 release. * scripts/build-many-glibcs.py (Context.checkout): Default Linux version to 4.15.
* lt_LT: Add alternative month names (bug 10871).Rafal Luzynski2018-01-292-0/+18
| | | | | | [BZ #10871] * localedata/locales/lt_LT (alt_mon): Import from CLDR (nominative case).
* be_BY, be_BY@latin: Add alternative month names (bug 10871).Rafal Luzynski2018-01-293-26/+78
| | | | | | | | | | | | | | | | | | | This patch also fixes spelling of lang_name in be_BY@latin, as reported by Ihar Hrachyshka. [BZ #10871] * localedata/locales/be_BY (mon): Rename to... (alt_mon): This, then synchronize with CLDR (nominative case). (abmon): Rename to... (ab_alt_mon): This, then synchronize with CLDR (nominative case). (mon): Import from CLDR (genitive case). (abmon): Likewise. * localedata/locales/be_BY@latin (mon): Rename to... (alt_mon): This. (mon): Add, proper genitive forms provided by Viktar Siarheichyk. * localedata/locales/be_BY@latin (lang_name): Reworded to "biełaruskaja mova".
* el_CY, el_GR: Add alternative month names (bug 10871).Rafal Luzynski2018-01-293-2/+34
| | | | | | | | [BZ #10871] * localedata/locales/el_CY (mon): Renamed to... (alt_mon): This. (mon): Import from CLDR (genitive case). * localedata/locales/el_GR: Likewise.
* ru_RU, ru_UA: Add alternative month names (bug 10871).Rafal Luzynski2018-01-294-9/+73
| | | | | | | | | | | | | | [BZ #10871] * localedata/locales/ru_RU (mon): Rename to... (alt_mon): This. (abmon): Rename to... (ab_alt_mon): This. (mon): Import from CLDR (genitive case). (abmon): Copy from the old content except the 5th month which is now in the genitive case, even when abbreviated. * localedata/locales/ru_UA: Likewise. * time/tst-strptime.c (day_tests): Add an actual example of a difference between %b and %Ob in Russian.
* hurd: Fix includesSamuel Thibault2018-01-294-1/+6
| | | | | | | * sysdeps/mach/hurd/net/ethernet.h: Include <stdint.h>. * sysdeps/mach/hurd/net/if_arp.h: Include <stdint.h>. * sysdeps/mach/hurd/net/if_ppp.h: Do not include non-existing <net/ppp_defs.h>.
* hurd: Fix _POSIX_VDISABLE valueSamuel Thibault2018-01-292-1/+3
| | | | | * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_VDISABLE): Set to '\0' instead of invalid -1.
* hurd: Build stubs for new gnumach.defsSamuel Thibault2018-01-284-3/+6
| | | | | | * mach/Makefile (user-interfaces): Add mach/gnumach. * sysdeps/mach/configure.ac (mach_interface_list): Add gnumach. * sysdeps/mach/configure (mach_interface_list): Regenerate.
* hurd: Include <sigsetops.h> from hurd/hurd/signal.hSamuel Thibault2018-01-282-0/+7
| | | | | * hurd/hurd/signal.h [__USE_EXTERN_INLINES][_LIBC][IS_IN(libc) || IS_IN(libpthread)]: Include <sigsetops.h>.
* hurd: Fix allocalim buildSamuel Thibault2018-01-282-2/+7
| | | | | * sysdeps/pthread/allocalim.h [!defined PTHREAD_STACK_MIN]: Do not check size against PTHREAD_STACK_MIN.
* hurd: fix typoSamuel Thibault2018-01-281-1/+1
|
* hurd: Fix posix optionsSamuel Thibault2018-01-282-2/+4
| | | | | | | _POSIX_CHOWN_RESTRICTED and _POSIX_NO_TRUNC should be always defined. * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC): Define to 0.
* Revert "hurd: Fix building io/tst-fchownat.c"Samuel Thibault2018-01-282-3/+1
| | | | This reverts commit fc221145a734d128d8f56f40d40fd4bb70a1d151.
* hurd: Fix getifaddrs / freeifaddrs expositionSamuel Thibault2018-01-283-2/+4
| | | | | | | | | | | 400669754de4 ('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.
* hurd: take __USE_EXTERN_INLINES into account and restrict inlinesSamuel Thibault2018-01-2813-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* hurd: Fix building io/tst-copy_file_range.cSamuel Thibault2018-01-282-1/+5
| | | | | * io/tst-copy_file_range.c [!defined CLONE_NEWNS]: Do not include <sys/mount.h>.
* hurd: Fix building io/tst-fchownat.cSamuel Thibault2018-01-282-1/+3
| | | | | * io/tst-fchownat.c [!defined _POSIX_CHOWN_RESTRICTED]: Act like when _POSIX_CHOWN_RESTRICTED is defined to 0.
* hurd: Fix building libio/tst-memstream3.cSamuel Thibault2018-01-283-6/+9
| | | | | | | | 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.
* hurd: add base abilist filesSamuel Thibault2018-01-283-0/+2
| | | | | * sysdeps/mach/hurd/libhurduser.abilist: New file. * sysdeps/mach/libmachuser.abilist: New file.
* hurd: Add missing fcntl-internal.hThomas Schwinge2018-01-282-0/+66
| | | | * hurd/fcntl-internal.h: New file.
* hurd: Fix nscd buildSamuel Thibault2018-01-283-0/+6
| | | | | | | 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.
* hurd: Fix warningsSamuel Thibault2018-01-285-14/+24
| | | | | | | | | | | | | * 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.
* hurd: Fix warningSamuel Thibault2018-01-282-1/+4
| | | | | * sysdeps/mach/hurd/spawni.c (__spawni): Make relpath and abspath const char * instead of char *.
* hurd: Make build-many-glibcs.py use mainline gnumachSamuel Thibault2018-01-282-3/+10
| | | | | | | 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.
* hurd: fix warningSamuel Thibault2018-01-273-22/+16
| | | | | | | * 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.
* hurd: Fix enabling vm_copySamuel Thibault2018-01-272-2/+4
| | | | | | | | 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.
* hurd: fix warningSamuel Thibault2018-01-272-1/+4
| | | | | | | | | 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.
* hurd: fix warningSamuel Thibault2018-01-272-0/+5
| | | | | * sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if __task_terminate would ever return successfully.
* hurd: make build-many-glibcs.py use mainline migSamuel Thibault2018-01-272-1/+10
| | | | | | | | 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.
* hurd: drop elder MACH_IPC_COMPAT handlingSamuel Thibault2018-01-274-35/+9
| | | | | | | | | 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.
* hurd: fix warningSamuel Thibault2018-01-272-0/+6
| | | | | * sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add -DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
* hurd: fix gcc build in build-many-glibcs.pySamuel Thibault2018-01-272-0/+4
| | | | | | | | | 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.
* hurd: fix warningSamuel Thibault2018-01-273-2/+6
| | | | | | | | | | | | | | | | 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 49b650430eb5 ('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 *.
* hurd: fix warningSamuel Thibault2018-01-272-1/+3
| | | | | * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Cast vm_address_t * to ElfW(Addr) * for dl_main parameter.
* hurd: fix warningsSamuel Thibault2018-01-272-6/+9
| | | | | | * sysdeps/generic/sigsetops.h (__sigemptyset, __sigfillset, __sigandset, __sigorset, __sigaddset, __sigdelset): Make them really return 0.
* hurd: fix warningSamuel Thibault2018-01-272-0/+3
| | | | * sysdeps/generic/sigset-cvt-mask.h: Include <sigsetops.h>.
* hurd: fix warningsSamuel Thibault2018-01-272-0/+14
| | | | | | * sysdeps/generic/not-cancel.h: Include <fcntl.h>, <unistd.h>, <sys/wait.h>, <time.h>, <sys/uio.h>. (NOT_CANCEL_H): Add inclusion guard.
* hurd: fix warningSamuel Thibault2018-01-272-0/+2
| | | | * resolv/res-close.c: Include <stdlib.h>.
* hurd: fix warningSamuel Thibault2018-01-272-3/+5
| | | | | * sysdeps/mach/hurd/profil.c: Reuse `a' variable instead of introducing a `c' variable.
* hurd: fix warningSamuel Thibault2018-01-272-0/+5
| | | | * sysdeps/mach/hurd/xmknodat.c: Include <sys/sysmacros.h>.