about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* RFC: powerpc64le: Enable support for IEEE long double gabriel/powerpc-ieee128-printscanGabriel F. T. Gomes2019-12-1318-43/+365
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not for glibc-2.31 - Do not commit! No changes since v3. Changes since v2: - Added definition of LDBL_IBM128_COMPAT_VERSION and LDBL_IBM128_VERSION (moved from a previous commit). Changes since v1: - Use __LONG_DOUBLE_USES_FLOAT128 directly. -- 8< -- On platforms where long double may have two different formats, i.e.: the same format as double (64-bits) or something else (128-bits), building with -mlong-double-128 is the default and function calls in the user program match the name of the function in Glibc. When building with -mlong-double-64, Glibc installed headers redirect such calls to the appropriate function. This patch adds similar redirections to be used by user code builds in IEEE long double mode (-mabi=ieeelongdouble). It also skips some uses of libc_hidden_proto in internal headers, because they also produce redirections, causing a redirection conflict. PS: Missing NEWS entry.
* powerpc64le: Require a compiler with -mno-gnu-attributeGabriel F. T. Gomes2019-12-135-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not for glibc-2.31 - Do not commit! No changes since v3. No changes since v2. Changes since v1: - Added mentions to the build requirement in manual/install.texi, INSTALL (regenerated) and NEWS. -- 8< -- On powerpc64le, a few files are built on IEEE long double mode (-mabi=ieeelongdouble), whereas most are built on IBM long double mode (-mabi=ibmlongdouble, the default for -mlong-double-128). Since binutils 2.31, linking object files with different long double modes causes errors similar to: ld: libc_pic.a(s_isinfl.os) uses IBM long double, libc_pic.a(ieee128-qefgcvt.os) uses IEEE long double. collect2: error: ld returned 1 exit status make[2]: *** [../Makerules:649: libc_pic.os] Error 1 The warnings are fair and correct, but in order for glibc to have support for both long double modes on powerpc64le, they have to be ignored. This can be accomplished with the use of -mno-gnu-attribute option when building the few files that require IEEE long double mode. However, -mno-gnu-attribute is not available in GCC 6, the minimum version required to build glibc, so this patch adds a test for this feature in powerpc64le builds, and fails early if it's not available. Tested, on powerpc64le, that the build fails early with GCC 6 and that it succeeds with GCC 7 or greater. Reviewed-by: Joseph Myers <joseph@codesourcery.com>
* ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128Gabriel F. T. Gomes2019-12-131-0/+14
| | | | | | | | | | | | | | | | | | | | | | | No changes since v3. No changes since v2. Changes since v1: - Do not try to remove -mabi=ieeelongdouble, since it hasn't been added. The removal is a residue from our initial development. -- 8< -- Some compiler versions, e.g. GCC 7, complain when -mlong-double-128 is used together with -mabi=ibmlongdouble or -mabi=ieeelongdouble, producing the following error message: cc1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ This patch removes -mlong-double-128 from the compilation lines that explicitly request -mabi=*longdouble. Tested for powerpc64le.
* Avoid compat symbols for totalorder in powerpc64le IEEE long doubleGabriel F. T. Gomes2019-12-132-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No changes since v3. No changes since v2. Changes since v1: - Added comment on the redefinition of libm_alias_float128_other_r_ldbl. -- 8< -- On powerpc64le, the libm_alias_float128_other_r_ldbl macro is used to create an alias between totalorderf128 and __totalorderlieee128, as well as between the totalordermagf128 and __totalordermaglieee128. However, the totalorder* and totalordermag* functions changed their parameter type since commit ID 42760d764649 and got compat symbols for their old versions. With this change, the aforementioned macro would create two conflicting aliases for __totalorderlieee128 and __totalordermaglieee128. This patch avoids the creation of the alias between the IEEE long double symbols (__totalorderl*ieee128) and the compat symbols, because the IEEE long double functions have never been exported thus don't need such compat symbol. Tested for powerpc64le. Reviewed-by: Joseph Myers <joseph@codesourcery.com>
* ldbl-128ibm-compat: Compiler flags for stdio functionsTulio Magno Quites Machado Filho2019-12-131-0/+6
| | | | | | | | | | | | | | | | | | | No changes since v3. No changes since v2. No changes since v1. -- 8< -- Some of the files that provide stdio.h and wchar.h functions have a filename prefixed with 'io', such as 'iovsprintf.c'. On platforms that imply ldbl-128ibm-compat, these files must be compiled with the flag -mabi=ibmlongdouble. This patch adds this flag to their compilation. Notice that this is not required for the other files that provide similar functions, because filenames that are not prefixed with 'io' have ldbl-128ibm-compat counterparts in the Makefile, which already adds -mabi=ibmlongdouble to them.
* Do not redirect calls to __GI_* symbols, when redirecting to *ieee128Tulio Magno Quites Machado Filho2019-12-1310-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No changes since v3. No changes since v2. Changes since v1: - Reduced the number of changes to the minimum required to build *cvt files in -mabi=ieeelongdouble mode. - Added __LONG_DOUBLE_USES_FLOAT128 to all long-double.h files. -- 8< -- On platforms where long double has IEEE binary128 format as a third option (initially, only powerpc64le), many exported functions are redirected to their __*ieee128 equivalents. This redirection is provided by installed headers such as stdio-ldbl.h, and is supposed to work correctly with user code. However, during the build of glibc, similar redirections are employed, in internal headers, such as include/stdio.h, in order to avoid extra PLT entries. These redirections conflict with the redirections to __*ieee128, and must be avoided during the build. This patch protects the second redirections with a test for __LONG_DOUBLE_USES_FLOAT128, a new macro that is defined to 1 when functions that deal with long double typed values reuses the _Float128 implementation (this is currently only true for powerpc64le). Tested for powerpc64le, x86_64, and with build-many-glibcs.py. Co-authored-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* ldbl-128ibm-compat: Add *cvt functionsGabriel F. T. Gomes2019-12-136-3/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No changes since v3. - Reviewed-by Paul Murphy. Waiting for the preceding patches. Changes since v2: - Fix http URLs. No changes since v1. -- 8< -- This patch adds IEEE long double versions of q*cvt* functions for powerpc64le. Unlike all other long double to/from string conversion functions, these do not rely on internal functions that can take floating-point numbers with different formats and act on them accordingly, instead, the related files are rebuilt with the -mabi=ieeelongdouble compiler flag set. Having -mabi=ieeelongdouble passed to the compiler causes the object files to be marked with a .gnu_attribute that is incompatible with the .gnu_attribute in files built with -mabi=ibmlongdouble (the default). The difference causes error messages similar to the following: ld: libc_pic.a(s_isinfl.os) uses IBM long double, libc_pic.a(ieee128-qefgcvt_r.os) uses IEEE long double. collect2: error: ld returned 1 exit status make[2]: *** [../Makerules:649: libc_pic.os] Error 1 Although this warning is useful in other situations, the library actually needs to have functions with different long double formats, so .gnu_attribute generation is explicitly disabled for these files with the use of -mno-gnu-attribute. Tested for powerpc64le on the branch that actually enables the sysdeps/ieee754/ldbl-128ibm-compat for powerpc64le. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* Refactor *cvt functions implementation (2/2)Gabriel F. T. Gomes2019-12-136-59/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes since v3: - Converted into a standalone patch not to be squashed with the preceding patch (1/2). - Updated commit message. - Tested that installed stripped binaries for powerpc64le and x86_64 remain identical before and after this patch. Changes since v2: - Moved the removal of unused macros to a previous patch Changes since v1: - Adapted after patch v1 19/31 (remove hidden_* uses) was dropped. - Fixed unintended removal of cvt* symbols on alpha and s390x (now tested with build-many-glibcs.py). -- 8< -- This patch refactors the *cvt functions implementation in a way that makes it easier to re-use them for implementing the IEEE long double on powerpc64le. By removing the macros that generate the function names (APPEND combined with FUNC_PREFIX), the new code makes it easier to define new function names, such as __qecvtieee128. Tested that installed stripped binaries for powerpc64le and x86_64 remain identical before and after this patch. Also tested for powerpc64le, x86_64, as well as with the following build-many-glibcs targets: alpha-linux-gnu, mips-linux-gnu, powerpc-linux-gnu-soft, s390x-linux-gnu, and sparc64-linux-gnu. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* Refactor *cvt functions implementation (1/2)Gabriel F. T. Gomes2019-12-138-385/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes since v3: - Converted into a standalone patch not to be squashed with the subsequent patch (2/2). - Updated commit message. - Tested that installed stripped binaries for powerpc64le and x86_64 remain identical before and after this patch. Changes since v2: - Squashed patches 1-4 and trivial bits of patch 5. - Replaced http with https (like the rest of glibc). - Updated copyright years. - Removed refactoring noise reported by Paul Murphy. No changes since v1. -- 8< -- This patch refactors the *cvt functions implementation in a way that makes it easier to re-use them for implementing the IEEE long double on powerpc64le. By splitting the implementation per se in one file (efgcvt-template.c) and the alias definitions in others (e.g. efgcvt.c), the new code makes it easier to define new function names, such as __qecvtieee128. Tested that installed stripped binaries for powerpc64le and x86_64 remain identical before and after this patch. Also tested for powerpc64le, x86_64, as well as with the following build-many-glibcs targets: alpha-linux-gnu, mips-linux-gnu, powerpc-linux-gnu-soft, s390x-linux-gnu, and sparc64-linux-gnu. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* ldbl-128ibm-compat: Add ISO C99 versions of scanf functionsGabriel F. T. Gomes2019-12-1322-39/+522
| | | | | | | | | | | | | | | In the format string for *scanf functions, the '%as', '%aS', and '%a[]' modifiers behave differently depending on ISO C99 compatibility. When _GNU_SOURCE is defined and -std=c89 is passed to the compiler, these functions behave like ascanf, and the modifiers allocate memory for the output. Otherwise, the ISO C99 compliant version of these functions is used, and the modifiers consume a floating-point argument. This patch adds the IEEE binary128 variant of ISO C99 compliant functions for the third long double format on powerpc64le. Tested for powerpc64le. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanfGabriel F. T. Gomes2019-12-133-4/+12
| | | | | | | | | | | | | | | | | | | | | Since commit commit 03992356e6fedc5a5e9d32df96c1a2c79ea28a8f Author: Zack Weinberg <zackw@panix.com> Date: Sat Feb 10 11:58:35 2018 -0500 Use C99-compliant scanf under _GNU_SOURCE with modern compilers. the selection of the GNU versions of scanf functions requires both _GNU_SOURCE and -std=c89. This patch changes the tests in ldbl-128ibm-compat so that they actually test the GNU versions (without this change, the redirection to the ISO C99 version always happens, so GNU versions of the new implementation (e.g. __scanfieee128) were left untested). Tested for powerpc64le. Reviewed-by: Paul E. Murphy <murphyp@linux.ibm.com>
* hurd: Fix local PLTSamuel Thibault2019-12-135-6/+23
| | | | | | | | | | * include/sys/random.h (__getrandom): Add hidden prototype. * stdlib/getrandom.c (getrandom): Rename to hidden definition __getrandom. Add weak alias. * sysdeps/mach/hurd/getrandom.c (getrandom): Likewise. * sysdeps/unix/sysv/linux/getrandom.c (getrandom): Likewise. * sysdeps/mach/hurd/getentropy.c (getentropy): Use __getrandom instead of getrandom.
* dlopen: Do not block signalsFlorian Weimer2019-12-131-26/+11
| | | | | | | | | | | | | | | | | | Blocking signals causes issues with certain anti-malware solutions which rely on an unblocked SIGSYS signal for system calls they intercept. This reverts commit a2e8aa0d9ea648068d8be52dd7b15f1b6a008e23 ("Block signals during the initial part of dlopen") and adds comments related to async signal safety to active_nodelete and its caller. Note that this does not make lazy binding async-signal-safe with regards to dlopen. It merely avoids introducing new async-signal-safety hazards as part of the NODELETE changes. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* dlopen: Rework handling of pending NODELETE statusFlorian Weimer2019-12-135-58/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a2e8aa0d9ea648068d8be52dd7b15f1b6a008e23 ("Block signals during the initial part of dlopen") was deemed necessary because of read-modify-write operations like the one in add_dependency in elf/dl-lookup.c. In the old code, we check for any kind of NODELETE status and bail out: /* Redo the NODELETE check, as when dl_load_lock wasn't held yet this could have changed. */ if (map->l_nodelete != link_map_nodelete_inactive) goto out; And then set pending status (during relocation): if (flags & DL_LOOKUP_FOR_RELOCATE) map->l_nodelete = link_map_nodelete_pending; else map->l_nodelete = link_map_nodelete_active; If a signal arrives during relocation and the signal handler, through lazy binding, adds a global scope dependency on the same map, it will set map->l_nodelete to link_map_nodelete_active. This will be overwritten with link_map_nodelete_pending by the dlopen relocation code. To avoid such problems in relation to the l_nodelete member, this commit introduces two flags for active NODELETE status (irrevocable) and pending NODELETE status (revocable until activate_nodelete is invoked). As a result, NODELETE processing in dlopen does not introduce further reasons why lazy binding from signal handlers is unsafe during dlopen, and a subsequent commit can remove signal blocking from dlopen. This does not address pre-existing issues (unrelated to the NODELETE changes) which make lazy binding in a signal handler during dlopen unsafe, such as the use of malloc in both cases. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* dlopen: Fix issues related to NODELETE handling and relocationsFlorian Weimer2019-12-1323-32/+992
| | | | | | | | | | | | | | | | | | | | | | | | | The assumption behind the assert in activate_nodelete was wrong: Inconsistency detected by ld.so: dl-open.c: 459: activate_nodelete: Assertion `!imap->l_init_called || imap->l_type != lt_loaded' failed! (edit) It can happen that an already-loaded object that is in the local scope is promoted to NODELETE status, via binding to a unique symbol. Similarly, it is possible that such NODELETE promotion occurs to an already-loaded object from the global scope. This is why the loop in activate_nodelete has to cover all objects in the namespace of the new object. In do_lookup_unique, it could happen that the NODELETE status of an already-loaded object was overwritten with a pending NODELETE status. As a result, if dlopen fails, this could cause a loss of the NODELETE status of the affected object, eventually resulting in an incorrect unload. Fixes commit f63b73814f74032c0e5d0a83300e3d864ef905e5 ("Remove all loaded objects if dlopen fails, ignoring NODELETE [BZ #20839]").
* hurd: Fix __close_nocancel_nostatus availabilitySamuel Thibault2019-12-134-6/+37
| | | | | | | | | | | | | | Not only libc/rtld use __close_nocancel_nostatus. * sysdeps/mach/hurd/Makefile [$(subdir) == io] (sysdep_routines): Add close_nocancel_nostatus. * sysdeps/mach/hurd/Versions (libc): Add __close_nocancel_nostatus to GLIBC_PRIVATE. * sysdeps/mach/hurd/not-cancel.h (__close_nocancel_nostatus): Declare function instead of defining inline. [IS_IN (libc) || IS_IN (rtld)] (__close_nocancel_nostatus): Make function hidden. * sysdeps/mach/hurd/close_nocancel_nostatus.c: New file.
* hurd: add getrandom and getentropy implementationsAndrew Eggenberger2019-12-132-0/+107
| | | | | * sysdeps/mach/hurd/getentropy.c: New file. * sysdeps/mach/hurd/getrandom.c: Likewise.
* hurd: Implement __close_nocancel_nostatusSamuel Thibault2019-12-131-0/+62
| | | | * sysdeps/mach/hurd/not-cancel.h: New file.
* manual: clarify fopen with the x flagPaul Eggert2019-12-111-1/+3
| | | | | * manual/stdio.texi (Opening Streams): Say how glibc's implementation of fopen with "x" follows ISO C11.
* S390: Use sysdeps/ieee754/dbl-64/wordsize-64 on s390x.Stefan Liebler2019-12-111-0/+1
| | | | | This patch enables the usage of implementations in sysdeps/ieee754/dbl-64/wordsize-64 on 64bit s390x.
* S390: Implement roundtoint and converttoint and define TOINT_INTRINSICS.Stefan Liebler2019-12-111-0/+53
| | | | | | | This patch implements roundtoint and convertoint for s390 by using the load-fp-integer and convert-to-fixed instructions. Both functions are using "round to nearest with ties away from zero" rounding mode and do not raise inexact exceptions.
* S390: Implement math-barriers math_opt_barrier and math_force_eval.Stefan Liebler2019-12-111-0/+46
| | | | | This patch implements the s390 specific math barriers in order to omit the store and load from stack if possible.
* S390: Use libc_fe* macros in fe* functions.Stefan Liebler2019-12-119-124/+27
| | | | | | | | | | | This patch updates the s390 specific functions fegetround, fesetround, feholdexcept, fesetenv, feupdateenv, fegetexceptflag, fetestexcept, fesetexceptflag, fetestexceptflag. Now those functions are using the libc_fe* macros if possible. Furthermore fegetexceptflag is now returning the exception from dxc field shifted to the usual exception-flags. Thus a special fetestexceptflag implementation is not needed anymore.
* S390: Implement libc_fe* macros.Stefan Liebler2019-12-111-0/+250
| | | | | | | | This patch provides the s390 specific implementation for libc_feholdexcept, libc_fesetround, libc_feholdexcept_setround, libc_fetestexcept, libc_fesetenv, libc_feupdateenv_test, libc_feupdateenv, libc_feholdsetround_ctx, libc_feresetround_ctx, libc_feholdsetround_noex_ctx and libc_feresetround_noex_ctx.
* S390: Use convert-to-fixed instruction for llround functions.Stefan Liebler2019-12-113-0/+127
| | | | | | If compiled with z196 zarch support, the convert-to-fixed instruction is used to implement llround, llroundf, llroundl. Otherwise the common-code implementation is used.
* S390: Use convert-to-fixed instruction for lround functions.Stefan Liebler2019-12-113-0/+142
| | | | | | If compiled with z196 zarch support, the convert-to-fixed instruction is used to implement lround, lroundf, lroundl. Otherwise the common-code implementation is used.
* S390: Use convert-to-fixed instruction for llrint functions.Stefan Liebler2019-12-113-0/+151
| | | | | | If compiled with z196 zarch support, the convert-to-fixed instruction is used to implement llrint, llrintf, llrintl. Otherwise the common-code implementation is used.
* S390: Use convert-to-fixed instruction for lrint functions.Stefan Liebler2019-12-113-0/+166
| | | | | | If compiled with z196 zarch support, the convert-to-fixed instruction is used to implement lrint, lrintf, lrintl. Otherwise the common-code implementation is used.
* S390: Use load-fp-integer instruction for roundeven functions.Stefan Liebler2019-12-113-0/+116
| | | | | | If compiled with z196 zarch support, the load-fp-integer instruction is used to implement roundeven, roundevenf, roundevenl. Otherwise the common-code implementation is used.
* Adjust s_copysignl.c regarding code style.Stefan Liebler2019-12-111-8/+9
| | | | | | | This patch just adjusts the generic implementation regarding code style. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Adjust s_ceilf.c and s_ceill.c regarding code style.Stefan Liebler2019-12-112-53/+92
| | | | | | | This patch just adjusts the generic implementation regarding code style. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Adjust s_floorf.c and s_floorl.c regarding code style.Stefan Liebler2019-12-112-54/+90
| | | | | | | This patch just adjusts the generic implementation regarding code style. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Adjust s_rintf.c and s_rintl.c regarding code style.Stefan Liebler2019-12-112-40/+53
| | | | | | | This patch just adjusts the generic implementation regarding code style. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Adjust s_nearbyintf.c and s_nearbyintl.c regarding code style.Stefan Liebler2019-12-112-55/+68
| | | | | | | This patch just adjusts the generic implementation regarding code style. No functional change. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for copysign functions if desired.Stefan Liebler2019-12-116-15/+31
| | | | | | | | | | | | This patch is always using the corresponding GCC builtin for copysignf, copysign, and is using the builtin for copysignl, copysignf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. Altough the long double version is enabled by default we still need the macro and the alternative implementation as the _Float128 version of the builtin is not available with all supported GCC versions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for round functions if desired.Stefan Liebler2019-12-116-0/+37
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for roundf, round, roundl and roundf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for trunc functions if desired.Stefan Liebler2019-12-116-0/+37
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for truncf, trunc, truncl and truncf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for ceil functions if desired.Stefan Liebler2019-12-116-1/+37
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for ceilf, ceil, ceill and ceilf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for floor functions if desired.Stefan Liebler2019-12-116-0/+37
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for floorf, floor, floorl and floorf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for rint functions if desired.Stefan Liebler2019-12-116-18/+52
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for rintf, rint, rintl and rintf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Use GCC builtins for nearbyint functions if desired.Stefan Liebler2019-12-116-18/+115
| | | | | | | | | | | | This patch is using the corresponding GCC builtin for nearbyintf, nearbyint, nearbintl and nearbyintf128 if the USE_FUNCTION_BUILTIN macros are defined to one in math-use-builtins.h. This is the case for s390 if build with at least --march=z196 --mzarch. Otherwise the generic implementation is used. The code of the generic implementation is not changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_round.c.Stefan Liebler2019-12-112-93/+12
| | | | | | | This patch replaces s_round.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_trunc.c.Stefan Liebler2019-12-115-73/+13
| | | | | | | | | | This patch replaces s_trunc.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 and sparc64 files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_ceil.c.Stefan Liebler2019-12-115-96/+21
| | | | | | | | | | This patch replaces s_ceil.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 and sparc64 files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_floor.c.Stefan Liebler2019-12-115-125/+46
| | | | | | | | | | This patch replaces s_floor.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 and sparc64 files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_rint.c.Stefan Liebler2019-12-113-75/+17
| | | | | | | | | | This patch replaces s_rint.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 file. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Always use wordsize-64 version of s_nearbyint.c.Stefan Liebler2019-12-113-88/+17
| | | | | | | | | | This patch replaces s_nearbyint.c in sysdeps/dbl-64 with the one in sysdeps/dbl-64/wordsize-64 and removes the latter one. The code is not changed except changes in code style. Also adjusted the include path in x86_64 file. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ldconfig: Do not print a warning for a missing ld.so.conf fileFlorian Weimer2019-12-111-2/+3
| | | | | | | The configuration file is not needed for working system, so printing a warning is not helpful. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* hurd: Fix using altstack while in an RPC call to be abortedSamuel Thibault2019-12-111-13/+14
| | | | | | | * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Always check for interrupted code being with esp pointing at mach_msg arguments, even when using an altstack. If we need to abort the RPC we will need this.
* Fix failure when CFLAGS contains -DNDEBUG (Bug 25251)Carlos O'Donell2019-12-101-0/+3
| | | | | | | | | | | | | | | | | | | Building tests with -DNDEBUG in CFLAGS, gcc 9.2.1 issues the following error: tst-assert-c++.cc: In function ‘int do_test()’: tst-assert-c++.cc:66:12: error: unused variable ‘value’ [-Werror=unused-variable] 66 | no_int value; | ^~~~~ tst-assert-c++.cc:71:18: error: unused variable ‘value’ [-Werror=unused-variable] 71 | bool_and_int value; | ^~~~~ The assert has been disabled by building glibc with CFLAGS, CXXFLAGS, and CPPFLAGS with -DNDEBUG which removes the assert and leaves the value unused. We never want the assert disabled because that's the point of the test, so we undefine NDEBUG before including assert.h to ensure that we get assert correctly defined.