about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Move some fenv.h override macros to generic math_private.h.Joseph Myers2018-02-016-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various configurations lacking support for floating-point exceptions and rounding modes have a math_private.h that overrides certain functions and macros, internal and external, to avoid references to FE_* constants that are undefined in those configurations. For example, there are unconditional feraiseexcept (FE_INVALID) calls in generic libm code, and these macro definitions duly define feraiseexcept to ignore its argument to avoid an error from FE_INVALID being undefined. In fact it is easy to tell in an architecture-independent way whether this is needed, by testing whether FE_ALL_EXCEPT == 0. Thus, this patch puts such a test, and feraiseexcept and __feraiseexcept macros, in the generic math_private.h, so reducing the duplication between architecture versions of this header. The feclearexcept macro present in several versions of this header, and fetestexcept in the tile version, are not needed; they would have been needed before there were proper soft-fp fma implementations (when generic versions, that depend on FE_TOWARDZERO and FE_INEXACT, were being used for configurations not supporting those features), but aren't needed any more, and so are removed. The tile version of this header has several inline functions for fenv.h functions to optimize calls to them away in such configurations where they do nothing useful, and all these header versions also have definitions of some of the libc_fe* internal macros. I intend to make those generic in subsequent patches. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. * sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0] (feraiseexcept): New macro. [FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise. * sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept): Remove macro. (__feraiseexcept): Likewise. (feclearexcept): Likewise. * sysdeps/microblaze/math_private.h (feraiseexcept): Likewise. (__feraiseexcept): Likewise. (feclearexcept): Likewise. * sysdeps/nios2/math_private.h (feraiseexcept): Likewise. (__feraiseexcept): Likewise. (feclearexcept): Likewise. * sysdeps/tile/math_private.h (feraiseexcept): Likewise. (__feraiseexcept): Likewise. (feclearexcept): Likewise. (fetestexcept): Likewise.
* Add ColdFire math-tests.h.Joseph Myers2018-02-012-0/+31
| | | | | | | | | | Since I've been fixing build issues for ColdFire, this patch adds a math-tests.h file for ColdFire, reflecting the lack of support for exceptions and rounding modes for soft float. I think it is logically correct, but have not tested it beyond build-many-glibcs.py for both hard and soft float. * sysdeps/m68k/coldfire/math-tests.h: New file.
* Fix m68k bits/fenv.h for no-FPU ColdFire.Joseph Myers2018-02-012-11/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The m68k bits/fenv.h is in sysdeps/m68k/fpu/, meaning that no-FPU ColdFire instead gets the generic (top-level) bits/fenv.h. That top-level bits/fenv.h defines no rounding mode constants. That no longer works for building glibc tests: some tests fail to build (at least with warnings) if no rounding mode macros are defined, so at least FE_TONEAREST must be defined in all cases (as various architectures without rounding mode support indeed do), while __FE_UNDEFINED must be defined in the case where not all the standard rounding modes are supported. On general principles of supporting multilib toolchains with a single set of headers shared between multilibs for a given architecture, it's also desirable for the same bits/fenv.h header to work for both FPU and no-FPU configurations. Thus, this patch moves the m68k bits/fenv.h to sysdeps/m68k/bits/fenv.h, and inserts appropriate conditionals to handle the no-FPU case. All the exception macros, and FE_NOMASK_ENV, are disabled in the no-FPU case; FE_ALL_EXCEPT is defined to 0 in that case. All rounding modes except FE_TONEAREST are disabled in that case, and __FE_UNDEFINED is defined accordingly. To avoid an unnecessary ABI change, fenv_t is defined in the no-FPU case to match the definition it would have got from the generic bits/fenv.h. This suffices to get a clean glibc and testsuite build for this configuration with build-many-glibcs.py (and keeps a clean build for the other m68k configurations); it has not been otherwise tested. * sysdeps/m68k/fpu/bits/fenv.h: Move to .... * sysdeps/m68k/bits/fenv.h: ... here. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_INEXACT): Do not define. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_DIVBYZERO): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_UNDERFLOW): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_OVERFLOW): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_INVALID): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_ALL_EXCEPT): Define to 0. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (__FE_UNDEFINED): New enum constant. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_TOWARDZERO): Do not define. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_DOWNWARD): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_UPWARD): Likewise. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (fenv_t): Define to match generic bits/fenv.h. [!__HAVE_68881__ && !__HAVE_FPU__ && !__mcffpu__] (FE_NOMASK_ENV): Do not define.
* Do not use packed structures in soft-fp.Joseph Myers2018-02-016-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building for soft-float ColdFire produces an error in soft-fp: In file included from ../sysdeps/ieee754/soft-fp/s_fmaf.c:42: ../soft-fp/single.h:85:3: error: 'packed' attribute ignored for field of type 'struct <anonymous>' [-Werror=attributes] } bits __attribute__ ((packed)); ^ While this error only appears in that particular case, this attribute is in fact never useful, on any architecture. If you have struct __attribute__ ((packed)) { ... } bits; or struct { ... } __attribute__ ((packed)) bits; then the attribute affects the layout of the structure type. But with the form used in this code struct { ... } bits __attribute__ ((packed)); the field bits is being declared packed, but the layout of its type has already been determined at that point. If on any platform the layout of the sequence of bit-fields were wrong without the use of a packed attribute, the attribute would need to be used via a definition of _FP_STRUCT_LAYOUT, not in its present position. So this patch removes the useless attribute to fix the build for ColdFire soft-float. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by the patch. * soft-fp/double.h (union _FP_UNION_D): Do not use attribute packed on bits. * soft-fp/extended.h (union _FP_UNION_E): Likewise. * soft-fp/half.h (union _FP_UNION_H): Likewise. * soft-fp/quad.h (union _FP_UNION_Q): Likewise. * soft-fp/single.h (union _FP_UNION_S): Likewise.
* Fix -Os log1p, log1pf build (bug 21314).Carlos O'Donell2018-02-013-3/+38
| | | | | | | | | | | | | | | | | | | | | | As reported in bug 21314, building log1p and log1pf fails with -Os because of a spurious -Wmaybe-uninitialized warning (reported there for GCC 5 for MIPS, I see it also with GCC 7 for x86_64). This patch, based on the patches in the bug, fixes this using the DIAG_* macros. Tested for x86_64 with -Os that this eliminates those warnings and so allows the build to progress further. 2018-02-01 Carlos O'Donell <carlos@redhat.com> Ramin Seyed-Moussavi <lordrasmus@gmail.com> Joseph Myers <joseph@codesourcery.com> [BZ #21314] * sysdeps/ieee754/dbl-64/s_log1p.c: Include <libc-diag.h>. (__log1p): Disable -Wmaybe-uninitialized for -Os around computation using c. * sysdeps/ieee754/flt-32/s_log1pf.c: Include <libc-diag.h>. (__log1pf): Disable -Wmaybe-uninitialized for -Os around computation using c.
* Open master branch for glibc 2.28 development glibc-2.27.9000Dmitry V. Levin2018-02-013-2/+30
|
* Update for 2.27 release glibc-2.27Dmitry V. Levin2018-02-013-3/+7
|
* Fix ChangeLog formattingDmitry V. Levin2018-02-011-23/+24
|
* NEWS: add the list of bugs fixed in 2.27Dmitry V. Levin2018-02-012-2/+316
|
* Record CVE-2018-6485 in ChangeLog and NEWS [BZ #22343]Florian Weimer2018-02-012-0/+5
|
* stdlib: Fixing test-*atexit*-race tests on ia64Adhemerval Zanella2018-02-012-1/+9
| | | | | | | | | | | These tests require a new thread stack size set to a value (0x20000) lower than the architecture minimum (0x30000). Set the stack size to PTHREAD_STACK_MIN in this case. Checked on ia64-linux-gnu. * stdlib/test-atexit-race-common.c (do_test): Check stack size against PTHREAD_STACK_MIN.
* Update contributions in the manualDmitry V. Levin2018-02-012-4/+20
| | | | | | * manual/contrib.texi (Palmer Dabbelt, Arjun Shankar, Florian Weimer): New entries. (Rafal Luzynski, Andreas Schwab): Update.
* NEWS: List the languages which use the alternative months.Rafal Luzynski2018-02-012-1/+15
| | | | | | | [BZ #10871] * NEWS: List the languages which actually use the alternative months feature in this release. Also explain that "alt_mon" and "ab_alt_mon" are optional.
* crypt: Fix badsalttest test (Bug 22765)Il'ya Malakhov2018-02-012-0/+8
| | | | | | | | The value of 'cd.initialized' is left uninitialized before the first invocation of 'crypt_r ()' in this test despite the fact that it should be set to zero according to the API. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix typo in the previous commitDmitry V. Levin2018-01-312-2/+2
| | | | The version of GCC was 7.3, not 7.3.1.
* Update information about the newest versions of tools used to build glibcDmitry V. Levin2018-01-313-12/+20
| | | | | | * manual/install.texi (Tools for Compilation): Update the newest versions of gcc, binutils, texinfo, gawk, bison, and sed. * INSTALL: Regenerated.
* allocalim.h: use __glibc_likely instead of __builtin_expectSamuel Thibault2018-01-302-2/+7
| | | | | * sysdeps/pthread/allocalim.h (__libc_use_alloca): Use __glibc_likely instead of __builtin_expect.
* hurd: Fix ChangeLog dateSamuel Thibault2018-01-301-2/+2
|
* nss: Adjust tests to use nss_files onlyFlorian Weimer2018-01-303-0/+12
|
* hr_HR: Add alternative month names (bug 10871).Rafal Luzynski2018-01-302-2/+22
| | | | | | | | [BZ #10871] * localedata/locales/hr_HR (mon): Rename to... (alt_mon): This. (mon): Import from CLDR (genitive case). (d_t_fmt): Update the comment.
* hurd: include generic's hp-timing.h instead of copying itSamuel Thibault2018-01-301-18/+1
| | | | | * sysdeps/mach/hurd/hp-timing.h: include <sysdeps/generic/hp-timing.h> instead of copying it.
* hurd: Add tlsdesc.symSamuel Thibault2018-01-302-0/+20
| | | | * sysdeps/mach/hurd/i386/tlsdesc.sym: New file.
* hurd: disable hp timingSamuel Thibault2018-01-302-0/+39
| | | | | | | | We don't have support for hp timing for now, even the i686 variant, which needs to know the CPU speed. Copied from sysdeps/generic/hp-timing.h * sysdeps/mach/hurd/hp-timing.h: New file.
* hurd: Fix comments for FREAD and FWRITESamuel Thibault2018-01-293-5/+4
| | | | | * bits/fcntl.h: Fix comment for FREAD and FWRITE. * sysdeps/mach/hurd/bits/fcntl.h: Likewise.
* malloc: Use assert.h's assert macroSamuel Thibault2018-01-292-7/+7
| | | | | | | | | | | This avoids assert definition conflicts if some of the headers used by malloc.c happens to include assert.h. Malloc still needs a malloc-avoiding implementation, which we get by redirecting __assert_fail to malloc's __malloc_assert. * malloc/malloc.c: Include <assert.h>. (assert): Do not define. [!defined NDEBUG] (__assert_fail): Define to __malloc_assert.
* libio: Rename _FWRITE to FWRITE_FUNCSamuel Thibault2018-01-293-6/+8
| | | | | | | _FWRITE would be in the reserved-namespace. * libio/tst-memstream3.c (_FWRITE): Rename to FWRITE_FUNC. (do_test_bz20181): Rename accordingly.
* allocalim.h: Fix codestyleSamuel Thibault2018-01-292-3/+5
| | | | | * sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of || to respect codestyle.
* hurd: Fix ChangeLog dateSamuel Thibault2018-01-291-1/+1
|
* hurd: Fix preprocessor indentationSamuel Thibault2018-01-295-35/+35
|
* Reject invalid definitions of _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC, ↵Andreas Schwab2018-01-293-24/+24
| | | | | | | | _POSIX_VDISABLE POSIX requires that the constants _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC, and _POSIX_VDISABLE are always defined to a value other than -1.
* hurd: Add expected ABI listsSamuel Thibault2018-01-2914-4/+3695
| | | | | | | | | | | | | | | | * hurd/Versions: Fix version when _hurd_exec_paths was added. * mach/Versions: Fix version when __mach_host_self_ was added. * sysdeps/mach/hurd/i386/ld.abilist: New file. * sysdeps/mach/hurd/i386/libBrokenLocale.abilist: New file. * sysdeps/mach/hurd/i386/libanl.abilist: New file. * sysdeps/mach/hurd/i386/libc.abilist: New file. * sysdeps/mach/hurd/i386/libcrypt.abilist: New file. * sysdeps/mach/hurd/i386/libdl.abilist: New file. * sysdeps/mach/hurd/i386/libm.abilist: New file. * sysdeps/mach/hurd/i386/libnsl.abilist: New file. * sysdeps/mach/hurd/i386/libresolv.abilist: New file. * sysdeps/mach/hurd/i386/librt.abilist: New file. * sysdeps/mach/hurd/i386/libutil.abilist: New file.
* RISC-V: Add ipc_priv.hPalmer Dabbelt2018-01-292-0/+25
| | | | | | | | | This contains a definition of __IPC_64 that matches the RISC-V Linux ABI. 2018-01-29 Darius Rad <darius@bluespec.com> * sysdeps/unix/sysv/linux/riscv/ipc_priv.h: New file.
* Add RISC-V to build-many-glibcs.pyPalmer Dabbelt2018-01-292-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For full disclosure, I've only run build-many-glibcs.py with the additional diff below. diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 1c7b85050b57..22cc7b427041 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -706,7 +706,7 @@ class Context(object): 'gcc': 'vcs-7', 'glibc': 'vcs-mainline', 'gmp': '6.1.2', - 'linux': '4.14', + 'linux': '4.15-rc8', 'mpc': '1.0.3', 'mpfr': '3.1.6'} use_versions = {} @@ -841,7 +841,7 @@ class Context(object): url_map = {'binutils': 'https://ftp.gnu.org/gnu/binutils/binutils-%(version)s.tar.bz2', 'gcc': 'https://ftp.gnu.org/gnu/gcc/gcc-%(version)s/gcc-%(version)s.tar.bz2', 'gmp': 'https://ftp.gnu.org/gnu/gmp/gmp-%(version)s.tar.xz', - 'linux': 'https://www.kernel.org/pub/linux/kernel/v4.x/linux-%(version)s.tar.xz', + 'linux': 'https://git.kernel.org/torvalds/t/linux-%(version)s.tar.gz', 'mpc': 'https://ftp.gnu.org/gnu/mpc/mpc-%(version)s.tar.gz', 'mpfr': 'https://ftp.gnu.org/gnu/mpfr/mpfr-%(version)s.tar.xz'} if component not in url_map: 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * scripts/build-many-glibcs.py (Context): Add RISC-V targets. (Config): Likewise.
* RISC-V: Build InfastructurePalmer Dabbelt2018-01-2919-0/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch lays out the top-level orginazition of the RISC-V port. It contains all the Implies files as well as various other fragments of build infastructure for the RISC-V port. This contains the only change to a shared file: config.h.in. RISC-V is a family of base ISAs with optional extensions. The base ISAs are RV32I and RV64I, which are 32-bit and 64-bit integer-only ISAs, but this port currently only supports RV64I based systems. Support for RISC-V lives in in sysdeps/riscv. In addition to these ISAs, our glibc port supports most of the currently-defined extensions: the A extension for atomics, the M extension for multiplication, the C extension for compressed instructions, and the F/D extensions for single/double precision IEEE floating-point. Most of these extensions are handled by GCC, but glibc defines various floating-point wrappers and emulation routines as well as some atomic wrappers. We support running glibc-based programs on Linux, the support for which lives in sysdeps/unix/sysv/linux/riscv. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/Implies: New file. * sysdeps/riscv/Makefile: Likewise. * sysdeps/riscv/configure: Likewise. * sysdeps/riscv/configure.ac: Likewise. * sysdeps/riscv/nptl/Makefile: Likewise. * sysdeps/riscv/preconfigure: Likewise. * sysdeps/riscv/rv64/Implies-after: Likewise. * sysdeps/riscv/rv64/rvd/Implies: Likewise. * sysdeps/riscv/rv64/rvf/Implies: Likewise. * sysdeps/unix/sysv/linux/riscv/Implies: Likewise. * sysdeps/unix/sysv/linux/riscv/Makefile: Likewise. * sysdeps/unix/sysv/linux/riscv/Versions: Likewise. * sysdeps/unix/sysv/linux/riscv/configure: Likewise. * sysdeps/unix/sysv/linux/riscv/configure.ac: Likewise. * sysdeps/unix/sysv/linux/riscv/ldd-rewrite.sed: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/Implies: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/Makefile: Likewise. * sysdeps/unix/sysv/linux/riscv/shlib-versions: Likewise.
* RISC-V: Add ABI ListsPalmer Dabbelt2018-01-2920-0/+8101
| | | | | | | | | | | | | | | | | | | | | | | I started with the aarch64 ABI lists and manually went through each difference, ensuring that the missing entries had been deprecated along the line. Darius generated the ulps files by running the test cases on QEMU. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/nofpu/libm-test-ulps: New file. * sysdeps/riscv/nofpu/libm-test-ulps-name: Likewise. * sysdeps/riscv/rv64/rvd/libm-test-ulps: Likewise. * sysdeps/riscv/rv64/rvd/libm-test-ulps-name: Likewise. * sysdeps/unix/sysv/linux/riscv/localplt.data: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/c++-types.data: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libanl.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libdl.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libnsl.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist: Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/libutil.abilist: Likewise.
* RISC-V: Linux Startup and Dynamic Loading CodePalmer Dabbelt2018-01-294-0/+155
| | | | | | | | | | This contains the Linux-specific code for loading programs on RISC-V. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/unix/sysv/linux/riscv/dl-static.c: New file. * sysdeps/unix/sysv/linux/riscv/ldconfig.h: Likewise. * sysdeps/unix/sysv/linux/riscv/ldsodefs.h: Likewise.
* RISC-V: Linux ABIPalmer Dabbelt2018-01-2924-0/+1445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux-specific code that is required for maintaining ABI compatibility. This doesn't contain the actual system call interface, that is split out in order to avoid having a patch that's too big. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/nptl/pthread-offsets.h: New file. * sysdeps/riscv/nptl/pthreaddef.h: Likewise. * sysdeps/unix/sysv/linux/riscv/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/riscv/bits/mman.h: Likewise. * sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/riscv/dl-cache.h: Likewise. * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Likewise. * sysdeps/unix/sysv/linux/riscv/getcontext.S: Likewise. * sysdeps/unix/sysv/linux/riscv/init-first.c: Likewise. * sysdeps/unix/sysv/linux/riscv/libc-vdso.h: Likewise. * sysdeps/unix/sysv/linux/riscv/makecontext.c: Likewise. * sysdeps/unix/sysv/linux/riscv/readelflib.c: Likewise. * sysdeps/unix/sysv/linux/riscv/register-dump.h: Likewise. * sysdeps/unix/sysv/linux/riscv/setcontext.S: Likewise. * sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/riscv/swapcontext.S: Likewise. * sysdeps/unix/sysv/linux/riscv/sys/cachectl.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/riscv/sys/user.h: Likewise. * sysdeps/unix/sysv/linux/riscv/ucontext-macros.h: Likewise. * sysdeps/unix/sysv/linux/riscv/ucontext_i.sym: Likewise.
* RISC-V: Linux Syscall InterfacePalmer Dabbelt2018-01-2910-0/+610
| | | | | | | | | | | | | | | | | Contains the Linux system call interface, as well as the definitions of a handful of system calls. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/nptl/nptl-sysdep.S: New file. * sysdeps/unix/sysv/linux/riscv/arch-fork.h: Likewise. * sysdeps/unix/sysv/linux/riscv/clone.S: Likewise. * sysdeps/unix/sysv/linux/riscv/profil-counter.h: Likewise. * sysdeps/unix/sysv/linux/riscv/pt-vfork.S: Likewise. * sysdeps/unix/sysv/linux/riscv/syscall.c: Likewise. * sysdeps/unix/sysv/linux/riscv/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/riscv/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/riscv/vfork.S: Likewise.
* RISC-V: Atomic and Locking RoutinesPalmer Dabbelt2018-01-295-0/+307
| | | | | | | | | | | | | This patch implements various atomic and locking routines on RISC-V. We mandate the A extension on Linux-capable RISC-V systems, so this can rely on always having the various atomic instructions availiable. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/nptl/bits/pthreadtypes-arch.h: New file. * sysdeps/riscv/nptl/bits/semaphore.h: Likewise. * sysdeps/riscv/nptl/libc-lowlevellock.c: Likewise. * sysdeps/unix/sysv/linux/riscv/atomic-machine.h: Likewise.
* RISC-V: Hard Float SupportPalmer Dabbelt2018-01-2959-0/+2219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains hardware floating-point support for the RISC-V ISA. While we currently only support hard-float systems with both the F and D extensions, I've left the F-specific code split out into seperate folders in order to ease adding support for F-only and RV32I-based systems in the future. I gave this a quick once-over and believe I've removed all the code that implements RV32IF, RV32IFD, and RV64IF targets. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/rv64/rvd/s_ceil.c: New file. * sysdeps/riscv/rv64/rvd/s_floor.c: Likewise. * sysdeps/riscv/rv64/rvd/s_llrint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_llround.c: Likewise. * sysdeps/riscv/rv64/rvd/s_lrint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_lround.c: Likewise. * sysdeps/riscv/rv64/rvd/s_nearbyint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_rint.c: Likewise. * sysdeps/riscv/rv64/rvd/s_round.c: Likewise. * sysdeps/riscv/rv64/rvd/s_roundeven.c: Likewise. * sysdeps/riscv/rv64/rvd/s_trunc.c: Likewise. * sysdeps/riscv/rv64/rvf/s_llrintf.c: Likewise. * sysdeps/riscv/rv64/rvf/s_llroundf.c: Likewise. * sysdeps/riscv/rv64/rvf/s_lrintf.c: Likewise. * sysdeps/riscv/rv64/rvf/s_lroundf.c: Likewise. * sysdeps/riscv/rvd/e_sqrt.c: Likewise. * sysdeps/riscv/rvd/s_copysign.c: Likewise. * sysdeps/riscv/rvd/s_finite.c: Likewise. * sysdeps/riscv/rvd/s_fma.c: Likewise. * sysdeps/riscv/rvd/s_fmax.c: Likewise. * sysdeps/riscv/rvd/s_fmin.c: Likewise. * sysdeps/riscv/rvd/s_fpclassify.c: Likewise. * sysdeps/riscv/rvd/s_isinf.c: Likewise. * sysdeps/riscv/rvd/s_isnan.c: Likewise. * sysdeps/riscv/rvd/s_issignaling.c: Likewise. * sysdeps/riscv/rvf/e_sqrtf.c: Likewise. * sysdeps/riscv/rvf/fclrexcpt.c: Likewise. * sysdeps/riscv/rvf/fegetenv.c: Likewise. * sysdeps/riscv/rvf/fegetmode.c: Likewise. * sysdeps/riscv/rvf/fegetround.c: Likewise. * sysdeps/riscv/rvf/feholdexcpt.c: Likewise. * sysdeps/riscv/rvf/fesetenv.c: Likewise. * sysdeps/riscv/rvf/fesetexcept.c: Likewise. * sysdeps/riscv/rvf/fesetmode.c: Likewise. * sysdeps/riscv/rvf/fesetround.c: Likewise. * sysdeps/riscv/rvf/feupdateenv.c: Likewise. * sysdeps/riscv/rvf/fgetexcptflg.c: Likewise. * sysdeps/riscv/rvf/fraiseexcpt.c: Likewise. * sysdeps/riscv/rvf/fsetexcptflg.c: Likewise. * sysdeps/riscv/rvf/ftestexcept.c: Likewise. * sysdeps/riscv/rvf/get-rounding-mode.h: Likewise. * sysdeps/riscv/rvf/math_private.h: Likewise. * sysdeps/riscv/rvf/s_ceilf.c: Likewise. * sysdeps/riscv/rvf/s_copysignf.c: Likewise. * sysdeps/riscv/rvf/s_finitef.c: Likewise. * sysdeps/riscv/rvf/s_floorf.c: Likewise. * sysdeps/riscv/rvf/s_fmaf.c: Likewise. * sysdeps/riscv/rvf/s_fmaxf.c: Likewise. * sysdeps/riscv/rvf/s_fminf.c: Likewise. * sysdeps/riscv/rvf/s_fpclassifyf.c: Likewise. * sysdeps/riscv/rvf/s_isinff.c: Likewise. * sysdeps/riscv/rvf/s_isnanf.c: Likewise. * sysdeps/riscv/rvf/s_issignalingf.c: Likewise. * sysdeps/riscv/rvf/s_nearbyintf.c: Likewise. * sysdeps/riscv/rvf/s_rintf.c: Likewise. * sysdeps/riscv/rvf/s_roundevenf.c: Likewise. * sysdeps/riscv/rvf/s_roundf.c: Likewise. * sysdeps/riscv/rvf/s_truncf.c: Likewise.
* RISC-V: Generic <math.h> and soft-fp RoutinesPalmer Dabbelt2018-01-298-0/+337
| | | | | | | | | | | | | | | | | This patch contains the miscellaneous math routines and headers we have implemented for RISC-V. This includes things from <math.h> that aren't completely ISA-generic, floating-point bit manipulation, and soft-fp hooks. 2018-01-29 Palmer Dabbelt <palmer@sifive.com> * sysdeps/riscv/bits/fenv.h: New file. * sysdeps/riscv/e_sqrtl.c: Likewise. * sysdeps/riscv/fpu_control.h: Likewise. * sysdeps/riscv/math-tests.h: Likewise. * sysdeps/riscv/nofpu/Implies: Likewise. * sysdeps/riscv/sfp-machine.h: Likewise. * sysdeps/riscv/tininess.h: Likewise.
* 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.