aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-21mach: Add more allowed external headersSamuel Thibault
* scripts/check-local-headers.sh (exclude): Add mach_debug/.
2016-08-19Convert _Complex tangent functions to generated codePaul E. Murphy
This converts s_c{,a}tan{,h}{f,,l} into a single templated file c{,a}tan{,h}_template.c with the exception of alpha.
2016-08-19Prepare to convert _Complex tangent functionsPaul E. Murphy
This patch has no function changes, except to ensure the git history correctly tracks the changes to convert the double version of these functions into a templated version.
2016-08-19Convert _Complex sine functions to generated codePaul E. Murphy
Refactor s_c{,a}sin{,h}{f,,l} into a single templated macro.
2016-08-19Prepare to convert _Complex sine functionsPaul E. Murphy
This patch has no function changes, except to ensure the git history correctly tracks the changes to convert the double version of these functions into a templated version.
2016-08-19X86: Change bit_YMM_state to (1 << 2)H.J. Lu
All other state bits, except for bit_YMM_state, are defined as (1 << N). This patch changes bit_YMM_state from (2 << 1) to (1 << 2). * sysdeps/x86/cpu-features.h (bit_YMM_state): Set to (1 << 2).
2016-08-19Merge common usage of mul_split functionPaul E. Murphy
A number of files share identical code for the mul_split function. This moves the duplicated function mul_split into its own header, and refactors the fma usage into a single selection macro. Likewise, mul_split when used by a long double implementation is renamed mul_splitl for clarity.
2016-08-19Convert _Complex cosine functions to generated codePaul E. Murphy
This is fairly straight fowards. m68k overrides are updated to use the framework, and thus are simplified a bit.
2016-08-19Prepare to convert _Complex cosine functionsPaul E. Murphy
This patch has no function changes, except to ensure the git history correctly tracks the changes to convert the double version of these functions into a templated version.
2016-08-19Add tst-wcstod-roundPaul E. Murphy
This extends tst-strtod-round with a few trivial changes to also test the wide character variants of strto* using similar macros to other shared tests.
2016-08-19Add tests for fortification of bcopy and bzero.Zack Weinberg
* debug/tst-chk1.c: Add tests for fortification of bcopy and bzero.
2016-08-18Fix incorrect double-checked locking related to _res_hconf.initialized.Torvald Riegel
_res_hconf.initialized was not suitable for use in a multi-threaded environment due to the lack of atomics and memory barriers. Use of it was also unnecessary because _res_hconf_init did the right thing by using __libc_once. This patch fixes the glibc-internal uses by just calling _res_hconf_init unconditionally, and switches to a release MO atomic store for _res_hconf.initialized to fix the glibc side of the synchronization problem (which will maintain backward compatibility, but cannot fix the lack of acquire MO on any glibc-external loads). [BZ #20477] * resolv/res_hconf.c (do_init): Use atomic access. * resolv/res_hconf.h: Add comments. * nscd/aicache.c (addhstaiX): Call _res_hconf_init unconditionally. * nss/getXXbyYY_r.c (REENTRANT_NAME): Likewise. * sysdeps/posix/getaddrinfo.c (gaih_inet): Likewise.
2016-08-18Get rid of array-bounds warning in __kernel_rem_pio2[f] with gcc 6.1 -O3.Stefan Liebler
On s390x I get the following werror when build with gcc 6.1 (or current gcc head) and -O3: ../sysdeps/ieee754/dbl-64/k_rem_pio2.c: In function ‘__kernel_rem_pio2’: ../sysdeps/ieee754/dbl-64/k_rem_pio2.c:254:18: error: array subscript is below array bounds [-Werror=array-bounds] for (k = 1; iq[jk - k] == 0; k++) ~~^~~~~~~~ I get the same error with sysdeps/ieee754/flt-32/k_rem_pio2f.c. This patch adds DIAG_* macros around it. ChangeLog: * sysdeps/ieee754/dbl-64/k_rem_pio2.c (__kernel_rem_pio2): Use DIAG_*_NEEDS_COMMENT macro to get rid of array-bounds warning. * sysdeps/ieee754/flt-32/k_rem_pio2f.c (__kernel_rem_pio2f): Likewise.
2016-08-18argp: Do not override GCC keywords with macros [BZ #16907]Florian Weimer
glibc provides fallback definitions already. It is not necessary to suppress warnings for unknown attributes because GCC does this automatically for system headers. This commit does not sync with gnulib because gnulib has started to use _GL_* macros in the header file, which are arguably in the gnulib implementation space and not suitable for an installed glibc header file.
2016-08-17ldbl-128: Remove unused sqrtl declaration in e_asinl.cPaul E. Murphy
This did not alter compilation for s390x and aarch64 targets.
2016-08-17Support for type-generic libm function implementations libmPaul E. Murphy
This defines a new classes of libm objects. The <func>_template.c file which is used in conjunction with the new makefile hooks to derive variants for each type supported by the target machine. The headers math-type-macros-TYPE.h are used to supply macros to a common implementation of a function in a file named FUNC_template.c and glued togethor via a generated file matching existing naming in the build directory. This has the properties of preserving the existing override mechanism and not requiring any arcane build system twiddling. Likewise, it enables machines to override these files without any additional work. I have verified the built objects for ppc64, x86_64, alpha, arm, and m68k do not change in any meaningful way with these changes using the Fedora cross toolchains. I have verified the x86_64 and ppc64 changes still run.
2016-08-17nptl/tst-once5: Reduce time to expected failureFlorian Weimer
2016-08-17Do not override objects in libc.a in other static libraries [BZ #20452]Florian Weimer
With this change, we no longer add sysdep.o and similar objects which are present in libc.a to other static libraries.
2016-08-16Fix soft-fp extended.h unpacking (GCC bug 77265).Joseph Myers
soft-fp unpacking for x86 "extended" fails to clear the implicit mantissa high bit that is explicit in that format, resulting in problems for operations that expect this bit to be clear in raw unpacked values. Specifically, the code for this format is used only for conversions to and from TFmode (__float128) in libgcc, where this issue results in GCC bug 77265, extension of long double infinity to __float128 wrongly produces a NaN. This patch fixes this by always masking out the implicit bit on unpacking, so that the results of unpacking meet the expectations of the rest of the soft-fp code for a normal IEEE format. Tested for x86_64 in libgcc in conjunction with a GCC testcase for this issue (this code isn't used in glibc, only in libgcc). * soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_E): Mask implicit bit out of unpacked value. [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_EP): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_E): Likewise. [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_EP): Likewise.
2016-08-16Add fesetexcept: sparc.Joseph Myers
This patch adds a SPARC version of fesetexcept. Untested. * sysdeps/sparc/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: sh.Joseph Myers
This patch adds an SH version of fesetexcept. Untested. * sysdeps/sh/sh4/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: s390.Joseph Myers
This patch adds an S/390 version of fesetexcept. Tested and corrected by Stefan Liebler. * sysdeps/s390/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: powerpc.Joseph Myers
This patch adds PowerPC versions of fesetexcept. * sysdeps/powerpc/fpu/fesetexcept.c: New file. * sysdeps/powerpc/nofpu/fesetexcept.c: Likewise. * sysdeps/powerpc/powerpc32/e500/nofpu/fesetexcept.c: Likewise.
2016-08-16Add fesetexcept: mips.Joseph Myers
This patch adds a MIPS version of fesetexcept. * sysdeps/mips/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: m68k.Joseph Myers
This patch adds an M68K version of fesetexcept. Untested. * sysdeps/m68k/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: ia64.Joseph Myers
This patch adds an IA64 version of fesetexcept. Untested. * sysdeps/ia64/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: hppa.Joseph Myers
This patch adds an HPPA version of fesetexcept. Untested. * sysdeps/hppa/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: arm.Joseph Myers
This patch adds an ARM version of fesetexcept. * sysdeps/arm/fesetexcept.c: New file.
2016-08-16Add fesetexcept: alpha.Joseph Myers
This patch adds an Alpha version of fesetexcept. Untested. * sysdeps/alpha/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept: aarch64.Joseph Myers
This patch adds an AArch64 version of fesetexcept. Untested. * sysdeps/aarch64/fpu/fesetexcept.c: New file.
2016-08-16Add fesetexcept.Joseph Myers
TS 18661-1 defines an fesetexcept function for setting floating-point exception flags without the side-effect of causing enabled traps to be taken. This patch series implements this function for glibc. The present patch adds the fallback stub implementation, x86 and x86_64 implementations, documentation, tests and ABI baseline updates. The remaining patches, some of them untested, add implementations for other architectures. The implementations generally follow those of the fesetexceptflag function. As for fesetexceptflag, the approach taken for architectures where setting flags causes enabled traps to be taken is to set the flags (and potentially cause traps) rather than refusing to set the flags and returning an error. Since ISO C and TS 18661 provide no way to enable traps, this is formally in accordance with the standards. The NEWS entry should be considered a placeholder, since this patch series is intended to be followed by further such series adding other TS 18661-1 features, so that the NEWS entry would end up looking more like * New <fenv.h> features from TS 18661-1:2014 are added to libm: the fesetexcept, fetestexceptflag, fegetmode and fesetmode functions, the femode_t type and the FE_DFL_MODE macro. with hopefully more such entries for other features, rather than having an entry for a single function in the end. I believe we have consensus for adding TS 18661-1 interfaces as per <https://sourceware.org/ml/libc-alpha/2016-06/msg00421.html>. Tested for x86_64, x86, mips64 (hard float, and soft float to test the fallback version), arm (hard float) and powerpc (hard float, soft float and e500). * math/fesetexcept.c: New file. * sysdeps/i386/fpu/fesetexcept.c: Likewise. * sysdeps/x86_64/fpu/fesetexcept.c: Likewise. * math/fenv.h: Define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION and include <bits/libc-header-start.h> instead of including <features.h>. [__GLIBC_USE (IEC_60559_BFP_EXT)] (fesetexcept): New function declaration. * manual/arith.texi (fesetexcept): Document function. * math/Versions (fesetexcept): New libm symbol at version GLIBC_2.25. * math/Makefile (libm-support): Add fesetexcept. (tests): Add test-fesetexcept and test-fesetexcept-traps. * math/test-fesetexcept.c: New file. * math/test-fesetexcept-traps.c: Likewise. * sysdeps/nacl/libm.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise.
2016-08-16Add CVE-2016-6323 missing from NEWS entryFlorian Weimer
2016-08-16Add NEWS entry for CVE-2016-6323Florian Weimer
2016-08-16nptl/tst-tls3-malloc: Force freeing of thread stacksFlorian Weimer
It turns out that due to the reduced stack size in tst-tls3 and the (fixed) default stack cache size, allocated TLS variables are never freed, so the test coverage for tst-tls3-malloc is less than complete. This change increases the thread stack size for tst-tls3-malloc only, to make sure thread stacks and TLS variables are freed.
2016-08-15arm: mark __startcontext as .cantunwind (bug 20435)Andreas Schwab
__startcontext marks the bottom of the call stack of the contexts created by makecontext.
2016-08-15locales: et_EE: locale has wrong {p,n}_cs_precedes value [BZ #20459]Märt Põder
According to "Requirements of information technology in Estonian language and cultural environment" the monetary symbol should be written after the amount number: https://www.evs.ee/products/evs-8-2008
2016-08-12Add comment from sysdeps/powerpc/fpu/fraiseexcpt.c to fsetexcptflg.c.Joseph Myers
* sysdeps/powerpc/fpu/fsetexcptflg.c (__fesetexceptflag): Add comment from fraiseexcpt.c.
2016-08-12Fix test-fexcept when "inexact" implicitly raised.Joseph Myers
ISO C allows feraiseexcept to raise "inexact", in addition to the requested exceptions, when requested to raise "overflow" or "underflow". Testing on ARM and PowerPC e500 (where glibc's feraiseexcept has this property) showed that the new test-fexcept test failed to allow for this; this patch fixes it, by wrapping feraiseexcept to clear FE_INEXACT if implicitly raised and not raised before the call. (It would also be possible to do this with fesetexcept, which always affects exactly the requested flags, but this patch avoids making this fix depend on the fesetexcept changes.) Tested for x86_64, x86, arm and e500. * math/test-fexcept.c (feraiseexcept_exact): New function. (test_set): Call feraiseexcept_exact instead of feraiseexcept. (test_except): Likewise.
2016-08-11Add missing reference to bug 20452Florian Weimer
2016-08-10Fix powerpc fesetexceptflag clearing FE_INVALID (bug 20455).Joseph Myers
As shown by the test math/test-fexcept, the powerpc fesetexceptflag implementation fails to clear a previously set FE_INVALID flag, when that flag is clear in the saved exceptions and FE_INVALID is included in the mask of flags to restore, because it fails to mask out the sub-exceptions of FE_INVALID from the FPSCR state. This patch fixes the masking logic accordingly. Tested for powerpc. [BZ #20455] * sysdeps/powerpc/fpu/fsetexcptflg.c (__fesetexceptflag): Mask out all FE_INVALID sub-exceptions from FPSCR when FE_INVALID specified to be restored.
2016-08-10Add tests for fegetexceptflag, fesetexceptflag.Joseph Myers
I noticed that there was no meaningful test coverage for fegetexceptflag and fesetexceptflag (one test ensures that calls to them compile and link, but nothing to verify they work correctly). This patch adds tests for these functions. fesetexceptflag is meant to set the relevant exception flag bits to the saved state without causing enabled traps to be taken. On some architectures, it is not possible to set exception flag bits without causing enabled traps to occur. Such architectures need to define EXCEPTION_SET_FORCES_TRAP to 1 in their math-tests.h, as is done in this patch for powerpc. x86 avoids needing to define this because the traps resulting from setting exception bits don't occur until the next floating-point operation or fwait instruction. Tested for x86_64, x86 and powerpc. Note that test-fexcept fails for powerpc because of a pre-existing bug in fesetexceptflag for powerpc, which I'll fix separately. * math/test-fexcept-traps.c: New file. * math/test-fexcept.c: Likewise. * math/Makefile (tests): Add test-fexcept and test-fexcept-traps. * sysdeps/generic/math-tests.h (EXCEPTION_SET_FORCES_TRAP): New macro. * sysdeps/powerpc/math-tests.h [!__NO_FPRS__] (EXCEPTION_SET_FORCES_TRAP): Likewise.
2016-08-10locales: en_CA: update d_fmt [BZ #9842]Martin Pitt
The date format in en_CA/LC_TIME specifies the date format as "%d/%m/%y". However, it should be "%Y-%m-%d". This is the standard date format in Canada as specified by the Canadian Standards Association in CSA Z234.5:1989, which adopts the ISO 8601 standard. Here's the web page from the National Research Council of Canada citing ISO 8601 as the standard date/time format in Canada: http://www.nrc-cnrc.gc.ca/eng/services/time/faq/#Q8 International Standard ISO 8601 specifies numeric representations of date and time. The recommended full format is of the form 2001-12-31 23:59:28.73 UTC. The intent of this standard is to avoid confusion in international communications which can arise with the many different national notations. This format has the advantage that it permits dates to be readily sorted in chronological order by computer systems. Windows 8+ and OS X also switched to this format.
2016-08-10ChangeLog: change Winblowz to WindowsMike Frysinger
2016-08-10localedata: change M$ to MicrosoftMike Frysinger
2016-08-09Add atomic operations required by the new condition variable.Torvald Riegel
* include/atomic.h (atomic_fetch_and_relaxed, atomic_fetch_and_release, atomic_fetch_or_release, atomic_fetch_xor_release): New.
2016-08-09Fix recvmsg returning SIGLOST on PF_LOCAL socketsSamuel Thibault
when msg_name is not NULL. * sysdeps/mach/hurd/recvmsg.c (__libc_recvmsg): Cope with aport being MACH_PORT_NULL.
2016-08-05sparc32/sparcv9: add a VIS3 version of fdimAurelien Jarno
sparc32 passes floating point values in the integer registers. VIS3 instructions gives access to the movwtos instruction to directly transfer a value from an integer register to a floating point register. Therefore it makes sense to provide a VIS3 version consisting in the generic version compiled with -mvis3. Changelog: * math/s_fdim.c: Avoid alias renamed. * math/s_fdimf.c: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile [$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines): Add s_fdimf-vis3, s_fdim-vis3. (CFLAGS-s_fdimf-vis3.c): New. Set to -Wa,-Av9d -mvis3. (CFLAGS-s_fdim-vis3.c): Likewise. sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.c: New file. sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.c: Likewise.
2016-08-05sparc: remove fdim sparc specific implementationsAurelien Jarno
The fdim and fdimf functions on sparc do not fully follow the standard and do not set errno to ERANGE when the result overflows. Since glibc 2.24 this causes the two following tests to fail: Failure: fdim (max_value, -max_value): errno set to 0, expected 34 (ERANGE) Failure: fdim_upward (max_value, -max_value): errno set to 0, expected 34 (ERANGE) It happens that using GCC with the generic C code generates very similar code to the sparc specific implementations. Therefore this patches remove them. Note it might still worth adding a vis3 specific version of fdim on sparc32/sparcv9, this is done in a following patch to ease backporting. Changelog: * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/Makefile [$(subdir) = math && $(have-as-vis3) = yes] (libm-sysdep_routines): Remove s_fdimf-vis3, s_fdim-vis3. * sysdeps/sparc/sparc32/fpu/s_fdim.S: Delete file. * sysdeps/sparc/sparc32/fpu/s_fdimf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdim.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf-vis3.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/multiarch/s_fdimf.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdim.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/fpu/s_fdimf.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fdim.S: Likewise. * sysdeps/sparc/sparc64/fpu/s_fdimf.S: Likewise.
2016-08-05sparc: build with -mvis on sparc32/sparcv9 and sparc64Aurelien Jarno
When building for sparc32/sparcv9 or sparc64, we assume that VIS instructions are available and use them in the sparc specific assembly code. However we do not tell GCC to use such instructions, resulting in slightly suboptimal code. Fix that by passing -Wa,-Av9a -mvis to GCC. Changelog: * sysdeps/sparc/sparc32/sparcv9/Makefile (sysdep-CFLAGS): Add -mvis. * sysdeps/sparc/sparc64/Makefile (sysdep-CFLAGS): New. Define to -Wa,-Av9a -mvis.
2016-08-05Improve gen-libm-test.pl LIT() applicationPaul E. Murphy
When bootstrapping float128, this exposed a number of areas where the L suffix is incorrectly applied to simple expressions when it should be applied to each constant in the expression. In order to stave off more macros in libm-test.inc, apply_lit is made slightly more intelligent. It will now split expressions based on space characters, and attempt to apply LIT() to each token. Having done this, there are numerous spacing issues within libm-test.inc which have been fixed. The above is problematic when the L real suffix is not the most expressive modifier, and the compiler complains (i.e ppc64) or silently truncates a value (i.e ppc64).