external/glibc.git
9 years agoAdjust timeouts for some tests, to accommodate slow processors,
Chung-Lin Tang [Sun, 22 Feb 2015 09:05:02 +0000 (01:05 -0800)]
Adjust timeouts for some tests, to accommodate slow processors,
often without FPUs.

9 years agoUnicode 7.0.0 update; added generator scripts.
Alexandre Oliva [Fri, 20 Feb 2015 22:14:59 +0000 (20:14 -0200)]
Unicode 7.0.0 update; added generator scripts.

for  localedata/ChangeLog

[BZ #17588]
[BZ #13064]
[BZ #14094]
[BZ #17998]
* unicode-gen/Makefile: New.
* unicode-gen/unicode-license.txt: New, from Unicode.
* unicode-gen/UnicodeData.txt: New, from Unicode.
* unicode-gen/DerivedCoreProperties.txt: New, from Unicode.
* unicode-gen/EastAsianWidth.txt: New, from Unicode.
* unicode-gen/gen_unicode_ctype.py: New generator, from Mike
FABIAN <mfabian@redhat.com>.
* unicode-gen/ctype_compatibility.py: New verifier, from
Pravin Satpute <psatpute@redhat.com> and Mike FABIAN.
* unicode-gen/ctype_compatibility_test_cases.py: New verifier
module, from Mike FABIAN.
* unicode-gen/utf8_gen.py: New generator, from Pravin Satpute
and Mike FABIAN.
* unicode-gen/utf8_compatibility.py: New verifier, from Pravin
Satpute and Mike FABIAN.
* charmaps/UTF-8: Update.
* locales/i18n: Update.
* gen-unicode-ctype.c: Remove.
* tst-ctype-de_DE.ISO-8859-1.in: Adjust, islower now returns
true for ordinal indicators.

9 years agosoft-fp: Adjust call to abort for kernel use.
Joseph Myers [Fri, 20 Feb 2015 18:07:03 +0000 (18:07 +0000)]
soft-fp: Adjust call to abort for kernel use.

soft-fp calls abort in various cases that the code doesn't handle, all
cases that should never actually occur for any supported choice of
types.

Calling an abort function is not appropriate for kernel use, so the
Linux kernel redefines abort as a macro in various ways in the ports
using this code, typically to "return 0" or similar.

One use of abort in soft-fp is inside a comma expression and doesn't
work with such a macro.  This patch changes it to use a statement
expression.

Tested for powerpc-nofpu that installed shared libraries are unchanged
by this patch.

(There are two classes of aborts: those to make control flow visible
to the compiler, in default cases of switches over _FP_CLS_COMBINE,
which could reasonably change to __builtin_unreachable for glibc but
would still need to handle pre-4.5 compilers for kernel use, and those
intended to detect any use of soft-fp for combinations of types the
code doesn't know how to handle, which could reasonably become link
failures if the calls should always be optimized away.  But those are
separate possible future enhancements.)

* soft-fp/op-common.h (_FP_FROM_INT): Wrap call to abort in
expression inside statement expression.

9 years agos390: Use generic lowlevellock-futex.h
Stefan Liebler [Fri, 20 Feb 2015 09:48:06 +0000 (10:48 +0100)]
s390: Use generic lowlevellock-futex.h

      * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include
      <sysdeps/nptl/lowlevellock.h> and remove macros and
      functions that are now defined there.
      (SYS_futex): Remove.
      (lll_compare_and_swap): Remove.
      * sysdeps/s390/bits/atomic.h (atomic_exchange_acq): Define.

9 years agoFix scandir scandirat namespace (bug 17999).
Joseph Myers [Thu, 19 Feb 2015 17:18:51 +0000 (17:18 +0000)]
Fix scandir scandirat namespace (bug 17999).

The POSIX function scandir calls scandirat, which is not a POSIX
function.  This patch fixes this by making it use __scandirat and
making scandirat a weak alias.  There are no changes for scandir64 /
scandirat64 because those are both _GNU_SOURCE-only functions so no
namespace issue arises for them.

Tested for x86_64 that the disassembly of installed shared libraries
is unchanged by this patch.

[BZ #17999]
* dirent/scandir.c [!SCANDIR] (SCANDIRAT): Define to __scandirat
instead of scandirat.
* dirent/scandirat.c [!SCANDIRAT] (SCANDIRAT): Likewise.
[!SCANDIRAT] (SCANDIRAT_WEAK_ALIAS): Define.
[SCANDIRAT_WEAK_ALIAS] (scandirat): Define as weak alias of
__scandirat.
* include/dirent.h (scandirat): Do not use libc_hidden_proto.
(__scandirat): Declare.  Use libc_hidden_proto.
* conform/Makefile (test-xfail-POSIX2008/dirent.h/linknamespace):
Remove variable.
(test-xfail-XOPEN2K8/dirent.h/linknamespace): Likewise.

9 years agoFix atan / atan2 missing underflows (bug 15319).
Joseph Myers [Wed, 18 Feb 2015 21:10:49 +0000 (21:10 +0000)]
Fix atan / atan2 missing underflows (bug 15319).

This patch fixes bug 15319, missing underflows from atan / atan2 when
the result of atan is very close to its small argument (or that of
atan2 is very close to the ratio of its arguments, which may be an
exact division).

The usual approach of doing an underflowing computation if the
computed result is subnormal is followed.  For 32-bit x86, there are
extra complications: the inline __ieee754_atan2 in bits/mathinline.h
needs to be disabled for float and double because other libm functions
using it generally rely on getting proper underflow exceptions from
it, while the out-of-line functions have to remove excess range and
precision from the underflowing result so as to return an exact 0 in
the case where errno should be set for underflow to 0.  (The failures
I saw without that are similar to those Carlos reported for other
functions, where I haven't seen a response to
<https://sourceware.org/ml/libc-alpha/2015-01/msg00485.html>
confirming if my diagnosis is correct.  Arguably all libm functions
with float and double returns should remove excess range and
precision, but that's a separate matter.)

The x86_64 long double case reported in a comment in bug 15319 is not
a bug (it's an argument of LDBL_MIN, and x86_64 is an after-rounding
architecture so the correct IEEE result is not to raise underflow in
the given rounding mode, in addition to treating the result as an
exact LDBL_MIN being within the newly clarified documentation of
accuracy goals).  I'm presuming that the fpatan instruction can be
trusted to raise appropriate exceptions when the (long double) result
underflows (after rounding) and so no changes are needed for x86 /
x86_64 long double functions here; empirically this is the case for
the cases covered in the testsuite, on my system.

Tested for x86_64, x86, powerpc and mips64.  Only 32-bit x86 needs
ulps updates (for the changes to inlines meaning some functions no
longer get excess precision from their __ieee754_atan2* calls).

[BZ #15319]
* sysdeps/i386/fpu/e_atan2.S (dbl_min): New object.
(MO): New macro.
(__ieee754_atan2): For results with small absolute value, force
underflow exception and remove excess range and precision from
return value.
* sysdeps/i386/fpu/e_atan2f.S (flt_min): New object.
(MO): New macro.
(__ieee754_atan2f): For results with small absolute value, force
underflow exception and remove excess range and precision from
return value.
* sysdeps/i386/fpu/s_atan.S (dbl_min): New object.
(MO): New macro.
(__atan): For results with small absolute value, force underflow
exception and remove excess range and precision from return value.
* sysdeps/i386/fpu/s_atanf.S (flt_min): New object.
(MO): New macro.
(__atanf): For results with small absolute value, force underflow
exception and remove excess range and precision from return value.
* sysdeps/ieee754/dbl-64/e_atan2.c: Include <float.h> and
<math.h>.
(__ieee754_atan2): Force underflow exception for results with
small absolute value.
* sysdeps/ieee754/dbl-64/s_atan.c: Include <float.h> and
<math_private.h>.
(atan): Force underflow exception for results with small absolute
value.
* sysdeps/ieee754/flt-32/s_atanf.c: Include <float.h>.
(__atanf): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/ldbl-128/s_atanl.c: Include <float.h> and
<math.h>.
(__atanl): Force underflow exception for results with small
absolute value.
* sysdeps/ieee754/ldbl-128ibm/s_atanl.c: Include <float.h>.
(__atanl): Force underflow exception for results with small
absolute value.
* sysdeps/x86/fpu/bits/mathinline.h
[!__SSE2_MATH__ && !__x86_64__ && __LIBC_INTERNAL_MATH_INLINES]
(__ieee754_atan2): Only define inline for long double.
* sysdeps/x86_64/fpu/multiarch/e_atan2.c
[HAVE_FMA4_SUPPORT || HAVE_AVX_SUPPORT]: Include <math.h>.
* math/auto-libm-test-in: Do not mark underflow exceptions as
possibly missing for bug 15319.  Add more tests of atan2.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (casin_test_data): Do not mark underflow
exceptions as possibly missing for bug 15319.
(casinh_test_data): Likewise.
* sysdeps/i386/fpu/libm-test-ulps: Update.

9 years ago2015-02-18 Steve Ellcey <sellcey@imgtec.com>
Steve Ellcey [Wed, 18 Feb 2015 18:51:37 +0000 (10:51 -0800)]
2015-02-18  Steve Ellcey  <sellcey@imgtec.com>

* sysdeps/unix/sysv/linux/mips/bits/endian.h: Remove.
* sysdeps/mips/bits/endian.h: Fix comments.

9 years agoFix search.h namespace (bug 17996).
Joseph Myers [Wed, 18 Feb 2015 18:47:34 +0000 (18:47 +0000)]
Fix search.h namespace (bug 17996).

The implementation of the (XSI POSIX) functions hsearch / hcreate /
hdestroy uses hsearch_r / hcreate_r / hdestroy_r, which are not POSIX
functions.  This patch makes those into weak aliases for __*_r and
uses those names for the calls within libc.

Tested for x86_64 that the disassembly of installed shared libraries
is unchanged by this patch.

[BZ #17996]
* include/search.h (hcreate_r): Don't use libc_hidden_proto.
(hdestroy_r): Likewise.
(hsearch_r): Likewise.
(__hcreate_r): Declare and use libc_hidden_proto.
(__hdestroy_r): Likewise.
(__hsearch_r): Likewise.
* misc/hsearch.c (hsearch): Call __hsearch_r instead of hsearch_r.
(hcreate): Call __hcreate_r instead of hcreate_r.
(__hdestroy): Call __hdestroy_r instead of hdestroy_r.
* misc/hsearch_r.c (hcreate_r): Rename to __hcreate_r and define
as weak alias of __hcreate_r.
(hdestroy_r): Rename to __hdestroy_r and define as weak alias of
__hdestroy_r.
(hsearch_r): Rename to __hsearch_r and define as weak alias of
__hsearch_r.
* conform/Makefile (test-xfail-XPG3/search.h/linknamespace):
Remove variable.
(test-xfail-XPG4/search.h/linknamespace): Likewise.
(test-xfail-UNIX98/search.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/search.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/search.h/linknamespace): Likewise.

9 years agoConsolidate arena_lookup and arena_lock into a single arena_get
Siddhesh Poyarekar [Wed, 18 Feb 2015 05:36:05 +0000 (11:06 +0530)]
Consolidate arena_lookup and arena_lock into a single arena_get

This seems to have been left behind as an artifact of some old changes
and can now be merged.  Verified that the only generated code change
on x86_64 is that of line numbers in asserts, like so:

@@ -27253,7 +27253,7 @@ Disassembly of section .text:
   416f09:      48 89 42 20             mov    %rax,0x20(%rdx)
   416f0d:      e9 7e f6 ff ff          jmpq   416590 <_int_free+0x230>
   416f12:      b9 3f 9f 4a 00          mov    $0x4a9f3f,%ecx
-  416f17:      ba d5 0f 00 00          mov    $0xfd5,%edx
+  416f17:      ba d6 0f 00 00          mov    $0xfd6,%edx
   416f1c:      be a8 9b 4a 00          mov    $0x4a9ba8,%esi
   416f21:      bf 6a 9c 4a 00          mov    $0x4a9c6a,%edi
   416f26:      e8 45 e8 ff ff          callq  415770 <__malloc_assert>

9 years agoUse alignment macros, pagesize and powerof2.
Carlos O'Donell [Wed, 18 Feb 2015 00:25:01 +0000 (19:25 -0500)]
Use alignment macros, pagesize and powerof2.

We are replacing all of the bespoke alignment code with
ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN.
This cleans up malloc/malloc.c, malloc/arena.c, and
elf/dl-reloc.c. It also makes all the code consistently
use pagesize, and powerof2 as required.

Code size is reduced with the removal of precomputed
pagemask, and use of pagesize instead. No measurable
difference in performance.

No regressions on x86_64.

9 years agoFix posix_spawn getrlimit64 namespace (bug 17991).
Joseph Myers [Wed, 18 Feb 2015 00:26:35 +0000 (00:26 +0000)]
Fix posix_spawn getrlimit64 namespace (bug 17991).

posix_spawn (a standard POSIX function) brings in a use of getrlimit64
(not a standard POSIX function).  This patch fixes this by using
__getrlimit64 and making getrlimit64 a weak alias.

This is more complicated than some such changes because of files that
define getrlimit64 in their own way using symbol versioning after
including the main sysdeps/unix/sysv/linux/getrlimit64.c with a
getrlimit macro defined.  There are various existing patterns for such
cases in glibc; the one I've used here is that a getrlimit64 macro
disables the weak_alias / libc_hidden_weak calls, leaving it to the
including file to define the getrlimit64 name in whatever way is
appropriate.

Tested for x86_64 and x86 that installed stripped shared libraries are
unchanged by this patch.

[BZ #17991]
* include/sys/resource.h (__getrlimit64): Declare.  Use
libc_hidden_proto.
* resource/getrlimit64.c (getrlimit64): Rename to __getrlimit64
and define as weak alias of __getrlimit64.  Use libc_hidden_weak.
* sysdeps/posix/spawni.c (__spawni): Call __getrlimit64 instead of
getrlimit64.
* sysdeps/unix/sysv/linux/getrlimit64.c (getrlimit64): Rename to
__getrlimit64.
[!getrlimit64] (getrlimit64): Define as weak alias of
__getrlimit64.  Use libc_hidden_weak.
* sysdeps/unix/sysv/linux/i386/getrlimit64.c (getrlimit64): Define
using __getrlimit64 not __new_getrlimit64.
(__GI_getrlimit64): Likewise.
* sysdeps/unix/sysv/linux/mips/getrlimit64.c (getrlimit64):
Likewise.
(__GI_getrlimit64): Likewise.
(__old_getrlimit64): Use __getrlimit64 not __new_getrlimit64.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
(getrlimit): Add __getrlimit64 alias.
* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list (getrlimit):
Likewise.
* conform/Makefile (test-xfail-XOPEN2K/spawn.h/linknamespace):
Remove variable.
(test-xfail-POSIX2008/spawn.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/spawn.h/linknamespace): Likewise.

9 years agoCleanup: add missing #include's
Paul Pluzhnikov [Wed, 18 Feb 2015 00:03:41 +0000 (16:03 -0800)]
Cleanup: add missing #include's

* libio/fileops.c: Add missing sys/mman.h
* libio/iopopen.c: Add missing fcntl.h, remove redundant unistd.h

9 years agoRefine documentation of libm exceptions goals.
Joseph Myers [Tue, 17 Feb 2015 23:41:27 +0000 (23:41 +0000)]
Refine documentation of libm exceptions goals.

This patch refines the math.texi documentation of the goals for when
libm function raise the inexact and underflow exceptions.  The
previous text was problematic in some cases around the underflow
threshold.

* Strictly, it would have meant that if the mathematical result of pow
  was very slightly below DBL_MIN, for example, it was required to
  raise the underflow exception; although normally a few ulps error
  would be OK, if that error meant the computed value was slightly
  above DBL_MIN it would fail the previously described underflow
  exception goal.

* Similarly, strict IEEE semantics would imply that sin (DBL_MIN), in
  round-to-nearest mode, underflows on before-rounding but not
  after-rounding architectures, while returning DBL_MIN; the previous
  wording would have required an underflow exception, so preventing
  checks for a result with absolute value below DBL_MIN from being
  sufficient checks to determine whether the exception is required.
  (Under the previous wording, checks for a result with absolute value
  <= DBL_MIN wouldn't have been sufficient either, because in
  FE_TOWARDZERO mode a result of DBL_MIN definitely does not result
  from an underflowing infinite-precision result.)

* The previous wording about rounding infinite-precision values could
  be taken to mean all exceptions including "inexact" must be
  consistent with some such value.  That would mean that a result of
  DBL_MIN in FE_UPWARD mode with "inexact" raised must also have
  "underflow" raised on before-rounding architectures.  Again, that
  would cause problems for computing a result (possibly with spurious
  "inexact" exceptions) and then using a rounding-mode-independent
  test for results with absolute value below DBL_MIN to determine
  whether an underflow exception must be forced in case the underflows
  from intermediate computations happened to be exact.

By refining the documentation, this patch avoids stating goals for
accuracy close to the underflow threshold that were stricter than
applied anywhere else, and allows the implementation strategy of:
compute a result within a few ulps, taking care to avoid underflows in
intermediate computations, then force an underflow exception if that
result was subnormal.  Only fully-defined functions such as fma need
to take greater care about the exact underflow threshold (including
its dependence on whether the architecture is before-rounding or
after-rounding, and on the rounding mode on after-rounding
architectures).

(If the rounding mode is changed as part of the computation, it's
still necessary to ensure that not just intermediate computations, but
the final computation of the result to be returned, do not raise
underflow if that result is the least normal value and underflow would
be inconsistent with the original rounding mode.  Since such code can
readily discard exceptions as part of saving and restoring the
rounding mode - SET_RESTORE_ROUND_NOEX etc. - I don't think that
should be a problem in practice.)

* manual/math.texi (Errors in Math Functions): Clarify goals
regarding inexact and underflow exceptions.

9 years ago2015-02-17 Steve Ellcey <sellcey@imgtec.com>
Steve Ellcey [Tue, 17 Feb 2015 21:38:49 +0000 (13:38 -0800)]
2015-02-17  Steve Ellcey  <sellcey@imgtec.com>

* sysdeps/mips/memcpy.S: Move R6 PREFETCH_STORE_HINT check.
* sysdeps/mips/memset.S: Ditto.

9 years ago2015-02-17 Steve Ellcey <sellcey@imgtec.com>
Steve Ellcey [Tue, 17 Feb 2015 18:04:33 +0000 (10:04 -0800)]
2015-02-17  Steve Ellcey  <sellcey@imgtec.com>

* sysdeps/mips/bits/endian.h (__MIPSEL): Use #ifdef instead of #if.

9 years agoS390: Build failure due to nptl/pt-longjmp.c changes.
Stefan Liebler [Tue, 17 Feb 2015 07:47:49 +0000 (08:47 +0100)]
S390: Build failure due to nptl/pt-longjmp.c changes.

9 years agoia64: Remove custom lowlevellock.h
Torvald Riegel [Wed, 17 Dec 2014 22:08:25 +0000 (23:08 +0100)]
ia64: Remove custom lowlevellock.h

ia64 seems to use the same implementation of low-level locks as the
generic Linux lowlevellock.h.  The futex syscalls are somewhat
different, but Roland thought it shouldn't matter.  Note that the futex
calls are on the slow path always (except for PI mutexes).

Removing the custom low-level lock implementation will make further
refactoring easier, for example adding proper error checking to futex
operations.

9 years agoia64: drop custom getpagesize
Mike Frysinger [Sun, 15 Feb 2015 05:57:48 +0000 (00:57 -0500)]
ia64: drop custom getpagesize

This is equivalent to the common linux version now, so we can drop it.

9 years agoFix sign of remquo zero remainder in round-downward mode (bug 17987).
Joseph Myers [Tue, 17 Feb 2015 00:41:50 +0000 (00:41 +0000)]
Fix sign of remquo zero remainder in round-downward mode (bug 17987).

Various remquo implementations produce a zero remainder with the wrong
sign (a zero remainder should always have the sign of the first
argument, as specified in IEEE 754) in round-downward mode, resulting
from the sign of 0 - 0.  This patch checks for zero results and fixes
their sign accordingly.

Tested for x86_64, x86, mips64 and powerpc.

[BZ #17987]
* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Ensure sign of
zero result does not depend on the sign resulting from
subtraction.
* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
Likewise.
* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
* math/libm-test.inc (remquo_test_data): Add more tests.

9 years ago* manual/time.texi (TZ Variable): glibc no longer comes with tzdata.
Paul Eggert [Mon, 16 Feb 2015 23:31:57 +0000 (15:31 -0800)]
* manual/time.texi (TZ Variable): glibc no longer comes with tzdata.

Problem reported by J William Piggott.

9 years agoFix remquo spurious overflows (bug 17978).
Joseph Myers [Mon, 16 Feb 2015 22:38:28 +0000 (22:38 +0000)]
Fix remquo spurious overflows (bug 17978).

Various remquo implementations, when computing the last three bits of
the quotient, have spurious overflows when 4 times the second argument
to remquo overflows.  These overflows can in turn cause bad results in
rounding modes where that overflow results in a finite value.  This
patch adds tests to avoid the problem multiplications in cases where
they would overflow, similar to those that control an earlier
multiplication by 8.

Tested for x86_64, x86, mips64 and powerpc.

[BZ #17978]
* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Do not form
products 4 * y and 2 * y where those would overflow.
* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
Likewise.
* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
* math/libm-test.inc (remquo_test_data): Add more tests.

9 years agoFix MIPS _ABIO64 -Werror=undef build.
Joseph Myers [Mon, 16 Feb 2015 22:25:02 +0000 (22:25 +0000)]
Fix MIPS _ABIO64 -Werror=undef build.

I see an error

../sysdeps/mips/memcpy.S:209:68: error: "_ABIO64" is not defined [-Werror=undef]
 #if defined(_MIPS_SIM) && ((_MIPS_SIM == _ABIO32) || (_MIPS_SIM == _ABIO64))
                                                                    ^
cc1: some warnings being treated as errors

in MIPS builds.  This patch arranges for _ABIO64 to be defined with
the same value as GCC uses when building for O64 (the ABI itself isn't
supported by glibc, but defining the macro seems the simplest way of
avoiding the error in code that may be shared with other C libraries).

* sysdeps/mips/sgidefs.h [!_ABIO64] (_ABIO64): New macro.

9 years agoFix MIPS _COMPILING_NEWLIB -Werror=undef build.
Joseph Myers [Mon, 16 Feb 2015 22:18:53 +0000 (22:18 +0000)]
Fix MIPS _COMPILING_NEWLIB -Werror=undef build.

I see an error

../sysdeps/mips/strcmp.S:25:7: error: "_COMPILING_NEWLIB" is not defined [-Werror=undef]
 #elif _COMPILING_NEWLIB
       ^
cc1: some warnings being treated as errors

in MIPS builds.  (This is with GCC 4.9; it's possible that the DR#412
change in GCC 5 - see
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60570> - means that
-Wundef diagnostics no longer occur for #elif conditions where a
previous group's condition was true, just as with other errors there.)
This patch duly adjusts the conditionals to test whether
_COMPILING_NEWLIB is defined.

* sysdeps/mips/memcpy.S [_COMPILING_NEWLIB]: Change condition to
[defined _COMPILING_NEWLIB].
* sysdeps/mips/memset.S [_COMPILING_NEWLIB]: Likewise.
* sysdeps/mips/strcmp.S [_COMPILING_NEWLIB]: Likewise.

9 years agoFix MIPS __mips_isa_rev -Werror=undef build.
Joseph Myers [Mon, 16 Feb 2015 22:12:15 +0000 (22:12 +0000)]
Fix MIPS __mips_isa_rev -Werror=undef build.

I see an error

In file included from ../sysdeps/mips/include/sys/asm.h:20:0,
                 from ../sysdeps/mips/start.S:39:
../sysdeps/mips/sys/asm.h:421:5: error: "__mips_isa_rev" is not defined [-Werror=undef]
 #if __mips_isa_rev < 6
     ^
cc1: some warnings being treated as errors

in MIPS builds.  As sys/asm.h is an installed header, it seems better
to test for !defined __mips_isa_rev here, instead of defining it to 0
as done in sysdeps/unix/mips/sysdep.h, to avoid perturbing any code
outside glibc that tests whether __mips_isa_rev is defined; this patch
does so.

* sysdeps/mips/sys/asm.h [__mips_isa_rev < 6]: Change condition to
[!defined __mips_isa_rev || __mips_isa_rev < 6].

9 years agoMake error checking effective in nptl/tst-cond25.c.
Torvald Riegel [Sun, 15 Feb 2015 16:33:31 +0000 (17:33 +0100)]
Make error checking effective in nptl/tst-cond25.c.

9 years agoia64: remove fixed page size macros and others [BZ #17792]
Matthew Fortune [Mon, 5 Jan 2015 15:07:50 +0000 (15:07 +0000)]
ia64: remove fixed page size macros and others [BZ #17792]

Remove IA64 PAGE_SIZE related macros as PAGE_SIZE is not defined.
Also remove macros that are only used for BFD's trad-core support
which is not relavant for IA64 according to the thread starting
here:

https://sourceware.org/ml/libc-ports/2013-11/msg00028.html

This patch is neither built nor tested but is equivalent to a MIPS
patch for the same fix.

9 years ago2015-02-13 Steve Ellcey <sellcey@imgtec.com>
Steve Ellcey [Sat, 14 Feb 2015 01:38:06 +0000 (17:38 -0800)]
2015-02-13  Steve Ellcey  <sellcey@imgtec.com>

* sysdeps/mips/bits/endian.h (__MIPSEB): Use #ifdef instead of #if.
* sysdeps/mips/memcpy.S (__MIPSEB): Ditto.
* sysdeps/mips/memset.S (__MIPSEB): Ditto.

9 years agoAdd placeholder c++-types.data and *.abilist files.
Roland McGrath [Fri, 13 Feb 2015 23:41:34 +0000 (15:41 -0800)]
Add placeholder c++-types.data and *.abilist files.

9 years agoFix dbl-64/wordsize-64 remquo (bug 17569).
Joseph Myers [Fri, 13 Feb 2015 21:54:44 +0000 (21:54 +0000)]
Fix dbl-64/wordsize-64 remquo (bug 17569).

The dbl-64/wordsize-64 remquo implementation follows similar logic to
various other implementations, but where that logic computes some
absolute values, it wrongly uses a previously computed bit-pattern for
the absolute value of the first argument, where actually it needs the
absolute value of the first argument mod 8 times the second.  This
patch fixes it to compute the correct absolute value.

The integer quotient result of remquo is only specified mod 8
(including its sign); architecture-specific versions may well vary in
what results they give for higher bits of that result (and indeed bug
17569 gives an example correct result from __builtin_remquo giving 9
for that result, where the particular glibc implementation used in
that bug report would give 1 after this fix).  Thus, this patch adapts
the tests of remquo to test that result only mod 8, to allow for such
variation when tests with higher quotient are included.

Tested for x86_64 and x86.

[BZ #17569]
* sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c (__remquo):
Compute absolute value of x as modified by fmod, not original
value of x.
* math/libm-test.inc (RUN_TEST_ffI_f1): Rename to
RUN_TEST_ffI_f1_mod8.  Check extra return value mod 8.
(RUN_TEST_LOOP_ffI_f1): Rename to RUN_TEST_LOOP_ffI_f1_mod8.  Call
RUN_TEST_ffI_f1_mod8.
(remquo_test_data): Add more tests.

9 years agoNPTL: Initializer for .init_array-only configurations.
Roland McGrath [Fri, 13 Feb 2015 21:19:11 +0000 (13:19 -0800)]
NPTL: Initializer for .init_array-only configurations.

9 years agoFix powerpc software sqrtf (bug 17967).
Joseph Myers [Fri, 13 Feb 2015 16:20:36 +0000 (16:20 +0000)]
Fix powerpc software sqrtf (bug 17967).

Similarly to sqrt in
<https://sourceware.org/ml/libc-alpha/2015-02/msg00353.html>, the
powerpc sqrtf implementation for when _ARCH_PPCSQ is not defined also
relies on a * b + c being contracted into a fused multiply-add.
Although this contraction is not explicitly disabled for e_sqrtf.c, it
still seems appropriate to make the file explicit about its
requirements by using __builtin_fmaf; this patch does so.
Furthermore, it turns out that doing so fixes the observed inaccuracy
and missing exceptions (that is, that without explicit __builtin_fmaf
usage, it was not being compiled as intended).

Tested for powerpc32 (hard float).

[BZ #17967]
* sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Use
__builtin_fmaf instead of relying on contraction of a * b + c.

9 years ago[BZ #17969]
J William Piggott [Fri, 13 Feb 2015 03:19:00 +0000 (22:19 -0500)]
[BZ #17969]

* manual/time.texi (TZ Variable): The zoneinfo path is
/usr/share/zoneinfo.

9 years agoFix powerpc software sqrt (bug 17964).
Joseph Myers [Thu, 12 Feb 2015 23:05:37 +0000 (23:05 +0000)]
Fix powerpc software sqrt (bug 17964).

As Adhemerval noted in
<https://sourceware.org/ml/libc-alpha/2015-01/msg00451.html>, the
powerpc sqrt implementation for when _ARCH_PPCSQ is not defined is
inaccurate in some cases.

The problem is that this code relies on fused multiply-add, and relies
on the compiler contracting a * b + c to get a fused operation.  But
sysdeps/ieee754/dbl-64/Makefile disables contraction for e_sqrt.c,
because the implementation in that directory relies on *not* having
contracted operations.

While it would be possible to arrange makefiles so that an earlier
sysdeps directory can disable the setting in
sysdeps/ieee754/dbl-64/Makefile, it seems a lot cleaner to make the
dependence on fused operations explicit in the .c file.  GCC 4.6
introduced support for __builtin_fma on powerpc and other
architectures with such instructions, so we can rely on that; this
patch duly makes the code use __builtin_fma for all such fused
operations.

Tested for powerpc32 (hard float).

2015-02-12  Joseph Myers  <joseph@codesourcery.com>

[BZ #17964]
* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Use
__builtin_fma instead of relying on contraction of a * b + c.

9 years agoUse -Werror=undef for assembly code.
Roland McGrath [Thu, 12 Feb 2015 21:57:32 +0000 (13:57 -0800)]
Use -Werror=undef for assembly code.

9 years agoSupport after-link variable to run a final step on binaries.
Roland McGrath [Thu, 12 Feb 2015 21:38:47 +0000 (13:38 -0800)]
Support after-link variable to run a final step on binaries.

9 years agoDocument tv_sec is of type time_t:
Rüdiger Sonderfeld [Thu, 12 Feb 2015 19:51:31 +0000 (14:51 -0500)]
Document tv_sec is of type time_t:

The tv_sec is of type time_t in both struct timeval and struct timespec.
This matches the implementation and also the relevant standard (checked
C11 for timespec and opengroup for timeval).

9 years agoFix exp2 spurious underflows (bug 16560).
Joseph Myers [Thu, 12 Feb 2015 19:02:45 +0000 (19:02 +0000)]
Fix exp2 spurious underflows (bug 16560).

This patch fixes the remaining part of bug 16560, spurious underflows
from exp2 of arguments close to 0 (when the result is close to 1, so
should not underflow), by just using 1+x instead of a more complicated
calculation when the argument is sufficiently small.

Tested for x86_64, x86 and mips64.

[BZ #16560]
* math/e_exp2l.c [LDBL_MANT_DIG == 106] (LDBL_EPSILON): Undefine
and redefine.
(__ieee754_exp2l): Do not multiply small fractional parts by
M_LN2l.
* sysdeps/i386/fpu/e_exp2l.S (__ieee754_exp2l): Just add 1 to
small argument.
* sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Likewise.
* sysdeps/ieee754/flt-32/e_exp2f.c (__ieee754_exp2f): Likewise.
* sysdeps/x86_64/fpu/e_exp2l.S (__ieee754_exp2l): Likewise.
* math/auto-libm-test-in: Add more tests of exp2.
* math/auto-libm-test-out: Regenerated.

9 years agopowerpc: POWER7 strncpy optimization for unaligned string
Rajalakshmi Srinivasaraghavan [Wed, 28 Jan 2015 13:43:29 +0000 (08:43 -0500)]
powerpc: POWER7 strncpy optimization for unaligned string

This patch optimizes strncpy for power7 for unaligned source or
destination address. The source or destination address is aligned
to doubleword and data is shifted based on the alignment and
added with the previous loaded data to be written as a doubleword.
For each load, cmpb instruction is used for faster null check.

The new optimization shows 10 to 70% of performance improvement
for longer string though it does not show big difference on string
size less than 16 due to additional checks.Hence this new algorithm
is restricted to string greater than 16.

9 years agopowerpc: Fix TABORT encoding for little endian
Adhemerval Zanella [Thu, 12 Feb 2015 11:34:16 +0000 (05:34 -0600)]
powerpc: Fix TABORT encoding for little endian

This patch fix the TABORT encoding for toolchains with no support for
HTM builtins.

9 years agoFilter out PTHREAD_MUTEX_NO_ELISION_NP bit in pthread_mutexattr_gettype (BZ #15790)
Andreas Schwab [Mon, 11 Aug 2014 09:18:26 +0000 (11:18 +0200)]
Filter out PTHREAD_MUTEX_NO_ELISION_NP bit in pthread_mutexattr_gettype (BZ #15790)

pthread_mutexattr_settype adds PTHREAD_MUTEX_NO_ELISION_NP to kind,
which is an internal flag that pthread_mutexattr_gettype shouldn't
expose, since pthread_mutexattr_settype wouldn't accept it.

9 years agoRevert "hurd: Fix abi-tag, following ba90e05"
Samuel Thibault [Wed, 11 Feb 2015 23:27:50 +0000 (23:27 +0000)]
Revert "hurd: Fix abi-tag, following ba90e05"

and revert the corresponding part of ba90e05 which was making the fix
necessary.

* abi-tags: Revert ae20c9a: rename back gnu into gnu-gnu.
* configure.ac, configure: Revert ba90e05: modify gnu-* host_os back
into gnu-gnu, and update comment to refer to abi-tags.

9 years agoFix sincos errno setting (bug 15467).
Joseph Myers [Wed, 11 Feb 2015 23:17:25 +0000 (23:17 +0000)]
Fix sincos errno setting (bug 15467).

This patch makes sincos set errno to EDOM when passed an infinity,
similarly to sin and cos.

Tested for x86_64, x86, powerpc and mips64.  I don't know if the
architecture-specific implementations for ia64 and m68k might need
corresponding fixes.

2015-02-11  Joseph Myers  <joseph@codesourcery.com>

[BZ #15467]
* sysdeps/ieee754/dbl-64/s_sincos.c: Include <errno.h>.
(__sincos): Set errno to EDOM for infinite argument.
* sysdeps/ieee754/flt-32/s_sincosf.c: Include <errno.h>.
(SINCOSF_FUNC): Set errno to EDOM for infinite argument.
* sysdeps/ieee754/ldbl-128/s_sincosl.c: Include <errno.h>.
(__sincosl): Set errno to EDOM for infinite argument.
* sysdeps/ieee754/ldbl-128ibm/s_sincosl.c: Include <errno.h>.
(__sincosl): Set errno to EDOM for infinite argument.
* sysdeps/ieee754/ldbl-96/s_sincosl.c: Include <errno.h>.
(__sincosl): Set errno to EDOM for infinite argument.
* math/libm-test.inc (sincos_test_data): Test errno setting.

9 years agoAnother pointless update in README.
Roland McGrath [Wed, 11 Feb 2015 22:39:30 +0000 (14:39 -0800)]
Another pointless update in README.

9 years agoPointless update in README.
Roland McGrath [Wed, 11 Feb 2015 21:42:15 +0000 (13:42 -0800)]
Pointless update in README.

9 years agoRemove unused definitions
Leonhard Holz [Wed, 11 Feb 2015 11:49:58 +0000 (12:49 +0100)]
Remove unused definitions

9 years agoRemove sysdeps/mips soft-fp subdirectories.
Joseph Myers [Tue, 10 Feb 2015 22:01:39 +0000 (22:01 +0000)]
Remove sysdeps/mips soft-fp subdirectories.

As noted in
<https://sourceware.org/ml/libc-alpha/2014-10/msg00369.html>, soft-fp
sysdeps subdirectories (and more generally, subdirectories where
sysdeps/foo/Implies contains foo/bar) are unnecessary and should be
eliminated.  This patch does so for MIPS.

Tested for MIPS64 (all three ABIs, soft-float) that installed stripped
shared libraries are unchanged by this patch.

* sysdeps/mips/soft-fp/sfp-machine.h: Move to ....
* sysdeps/mips/mips32/sfp-machine.h: ... here.
* sysdeps/mips/mips64/soft-fp/Makefile: Move to ....
* sysdeps/mips/mips64/Makefile: ... here.
* sysdeps/mips/mips64/soft-fp/e_sqrtl.c: Move to ....
* sysdeps/mips/mips64/e_sqrtl.c: ... here.
* sysdeps/mips/mips64/soft-fp/sfp-machine.h: Move to ....
* sysdeps/mips/mips64/sfp-machine.h: ... here.
* sysdeps/mips/mips32/Implies: Remove mips/soft-fp.
* sysdeps/mips/mips64/n32/Implies: Remove mips/mips64/soft-fp.
* sysdeps/mips/mips64/n64/Implies: Likewise.

9 years agoClean up math/test-snan.
Roland McGrath [Tue, 10 Feb 2015 21:55:29 +0000 (13:55 -0800)]
Clean up math/test-snan.

9 years agoFix __memcpy_chk on non-SSE2 CPUs
Evangelos Foutras [Tue, 10 Feb 2015 03:22:58 +0000 (03:22 +0000)]
Fix __memcpy_chk on non-SSE2 CPUs

In commit 8b4416d, the 1: jump label in __mempcpy_chk was accidentally
moved.  This resulted in failures of mempcpy on CPU without SSE2.

9 years agopowerpc: drop R_PPC_REL16 check
Adhemerval Zanella [Tue, 10 Feb 2015 11:09:22 +0000 (06:09 -0500)]
powerpc: drop R_PPC_REL16 check

Current minimum support binutils (2.22) supports R_PPC_REL16 as default,
so no need to extra configure checks.

9 years agopowerpc: sysdeps/powerpc configure cleanup
Adhemerval Zanella [Tue, 3 Feb 2015 11:48:24 +0000 (06:48 -0500)]
powerpc: sysdeps/powerpc configure cleanup

Current minimum binutils supported (2.22) has ".machine altivec" support
as default, so there is no need to add a configure check for such
functionality.  This patches removes the configure checks for it.

9 years agoAdd fixed bug numbers to NEWS
Samuel Thibault [Mon, 9 Feb 2015 16:25:42 +0000 (17:25 +0100)]
Add fixed bug numbers to NEWS

9 years agopowerpc: wordcopy/memmove cleanup for ppc32
Adhemerval Zanella [Wed, 21 Jan 2015 12:57:14 +0000 (07:57 -0500)]
powerpc: wordcopy/memmove cleanup for ppc32

This patch cleanup some multiarch code related to memmmove
optimization. Initial IFUNC support added specialized wordcopy
symbols which turned in local IFUNC calls used by memmove default
implementation.  The patch removes the internal IFUNC for wordcopy
symbols and uses local branches in the memmmove optimization instead.

9 years agopowerpc: multiarch Makefile cleanup for powerpc32
Adhemerval Zanella [Wed, 21 Jan 2015 12:38:28 +0000 (07:38 -0500)]
powerpc: multiarch Makefile cleanup for powerpc32

This patch cleanups the multiarch Makefile by putting the wide chars
implementation to correct wcsmbs rule.

9 years agopowerpc: wordcopy/memmove cleanup for ppc64
Adhemerval Zanella [Wed, 21 Jan 2015 12:41:46 +0000 (07:41 -0500)]
powerpc: wordcopy/memmove cleanup for ppc64

This patch cleanup some multiarch code related to memmmove
optimization. Initial IFUNC support added specialized wordcopy
symbols which turned in local IFUNC calls used by memmove default
implementation.

This change by removing then and used the optimized memmove instead
for supported chips.

9 years agopowerpc: Remove POWER7 wordcopy ifunc
Adhemerval Zanella [Wed, 21 Jan 2015 03:08:21 +0000 (22:08 -0500)]
powerpc: Remove POWER7 wordcopy ifunc

This patch remove the POWER7 ifunc wordcopy function
(_wordcopy_*_power7), since now GLIBC provides a optimized memmove/bcopy
for POWER7.

9 years agopowerpc: Simplify bcopy default implementation
Adhemerval Zanella [Wed, 21 Jan 2015 03:02:03 +0000 (22:02 -0500)]
powerpc: Simplify bcopy default implementation

This patch simplify the default bcopy symbol for powerpc64 by just using
memmove instead of implementing using the default bcopy.  Since the
symbol is deprecated, it trades speed by code size.

9 years agopowerpc: multiarch Makefile cleanup for powerpc64
Adhemerval Zanella [Tue, 20 Jan 2015 20:41:38 +0000 (15:41 -0500)]
powerpc: multiarch Makefile cleanup for powerpc64

This patch cleanups the multiarch Makefile by putting the wide chars
implementation to correct wcsmbs rule.

9 years agoFix value of O_TMPFILE for architectures with non-default O_DIRECTORY (bug 17912)
Andreas Schwab [Sun, 1 Feb 2015 13:04:15 +0000 (14:04 +0100)]
Fix value of O_TMPFILE for architectures with non-default O_DIRECTORY (bug 17912)

9 years agohurd: fix unwind-resume.c build
Samuel Thibault [Sun, 8 Feb 2015 17:46:00 +0000 (18:46 +0100)]
hurd: fix unwind-resume.c build

9 years agohurd: fix unwind-resume.c build
Samuel Thibault [Sun, 8 Feb 2015 17:35:54 +0000 (18:35 +0100)]
hurd: fix unwind-resume.c build

9 years agoadd hurd/hurdsocket.h file missing from a5eb23d
Samuel Thibault [Sun, 8 Feb 2015 16:49:16 +0000 (17:49 +0100)]
add hurd/hurdsocket.h file missing from a5eb23d

9 years agoFix time/getdate.c build.
Samuel Thibault [Sun, 8 Feb 2015 16:45:25 +0000 (17:45 +0100)]
Fix time/getdate.c build.

9 years agohurd: Fix abi-tag, following ba90e05
Samuel Thibault [Sun, 8 Feb 2015 04:38:03 +0000 (05:38 +0100)]
hurd: Fix abi-tag, following ba90e05

9 years agohurd: fix tls.h build
Samuel Thibault [Sun, 8 Feb 2015 04:06:17 +0000 (05:06 +0100)]
hurd: fix tls.h build

9 years agohurd: Ignore bytes beyond sockaddr length for AF_UNIX
Samuel Thibault [Sun, 8 Feb 2015 03:25:12 +0000 (04:25 +0100)]
hurd: Ignore bytes beyond sockaddr length for AF_UNIX

9 years agoAdd ersatz _Static_assert on older C hosts
Paul Eggert [Thu, 5 Feb 2015 23:52:20 +0000 (15:52 -0800)]
Add ersatz _Static_assert on older C hosts

* misc/sys/cdefs.h (_Static_assert): Define a substitute, if on a
pre-C11 C platform that is not known to support _Static_assert.

9 years agohurd: fix compilation of signal.h in C++
Samuel Thibault [Sat, 7 Feb 2015 21:39:38 +0000 (22:39 +0100)]
hurd: fix compilation of signal.h in C++

9 years agohurd: fix compilation of signal.h in C++
Samuel Thibault [Sat, 7 Feb 2015 21:35:35 +0000 (22:35 +0100)]
hurd: fix compilation of signal.h in C++

9 years agohurd: add basic types for ioctls
Samuel Thibault [Sat, 7 Feb 2015 21:26:09 +0000 (22:26 +0100)]
hurd: add basic types for ioctls

9 years agohurd: support mmap with PROT_NONE
Samuel Thibault [Sat, 7 Feb 2015 21:22:40 +0000 (22:22 +0100)]
hurd: support mmap with PROT_NONE

9 years agohurdselect: remove dead code.
Samuel Thibault [Sat, 7 Feb 2015 21:18:03 +0000 (22:18 +0100)]
hurdselect: remove dead code.

This removes code which actually never happens, and is already taken
care of in the function.

This is in the second part of select, when the __mach_msg() function
over the portset has returned something else than MACH_MSG_SUCCESS. I
guess in the past the value returned by __mach_msg() was stored in err,
so this code was necessary to set back err to 0, but now it is stored in
msgerr, so err is already still 0 by default. It can thus never contain
MACH_RCV_TIMED_OUT, i.e. the code is dead. The first case mentioned in
the comment is already handled: on time out with no message, err is
already still the default 0. On time out due to poll, err would still be
0, unless some of the io_select RPCs has returned EINTR, in which case
it contains EINTR. If any other io_select RPCs had returned a proper
answer, got!=0, and thus err is set to 0 just below. The code is thus
indeed not useful any more.

9 years agohurd: fix sigstate locking
Samuel Thibault [Sat, 7 Feb 2015 21:16:19 +0000 (22:16 +0100)]
hurd: fix sigstate locking

It looks like _hurd_thread_sigstate used to return with the sigstate
lock held long ago, but since that's no longer the case, don't unlock
something that isn't locked.

Note that it's unlikely this change fixes anything in practice since
its current implementation (on i386) makes this call a nop.

9 years agohurdselect: Let select get interrupted by signals
Samuel Thibault [Sat, 7 Feb 2015 21:13:46 +0000 (22:13 +0100)]
hurdselect: Let select get interrupted by signals

We need to set MACH_RCV_INTERRUPT to avoid __mach_msg just looping on signals,
and then we can handle the interruption.

9 years agohurd: map nice levels 1-to-1 with Mach prio levels
Samuel Thibault [Sat, 7 Feb 2015 21:09:09 +0000 (22:09 +0100)]
hurd: map nice levels 1-to-1 with Mach prio levels

9 years agohurd: allow poll() array bigger than FD_SETSIZE
Samuel Thibault [Sat, 7 Feb 2015 21:07:38 +0000 (22:07 +0100)]
hurd: allow poll() array bigger than FD_SETSIZE

9 years agohurd: fix f?chflags prototypes, declare them and their flags
Samuel Thibault [Sat, 7 Feb 2015 20:56:15 +0000 (21:56 +0100)]
hurd: fix f?chflags prototypes, declare them and their flags

9 years agohurd: fix build with pthread aio
Samuel Thibault [Sat, 7 Feb 2015 20:45:59 +0000 (21:45 +0100)]
hurd: fix build with pthread aio

9 years agoARM: Add missing sfi_breg in LDR_GLOBAL macro.
Roland McGrath [Fri, 6 Feb 2015 22:42:18 +0000 (14:42 -0800)]
ARM: Add missing sfi_breg in LDR_GLOBAL macro.

9 years agoNPTL: Conditionalize some sanity tests for SIGCANCEL/SIGSETXID.
Roland McGrath [Fri, 6 Feb 2015 20:31:11 +0000 (12:31 -0800)]
NPTL: Conditionalize some sanity tests for SIGCANCEL/SIGSETXID.

9 years agoConditionalize use of SIGRTMIN in nptl/tst-locale1.c.
Roland McGrath [Fri, 6 Feb 2015 20:30:58 +0000 (12:30 -0800)]
Conditionalize use of SIGRTMIN in nptl/tst-locale1.c.

9 years agoDon't set unused field in rt/tst-timer2.
Roland McGrath [Fri, 6 Feb 2015 20:30:38 +0000 (12:30 -0800)]
Don't set unused field in rt/tst-timer2.

9 years agoNPTL: Build tests using clone directly only for Linux.
Roland McGrath [Fri, 6 Feb 2015 20:30:23 +0000 (12:30 -0800)]
NPTL: Build tests using clone directly only for Linux.

9 years agoUse signal rather than sigaction in nptl/tst-cleanup2.
Roland McGrath [Fri, 6 Feb 2015 20:30:05 +0000 (12:30 -0800)]
Use signal rather than sigaction in nptl/tst-cleanup2.

9 years agoConditionalize some tests' use of SA_SIGINFO.
Roland McGrath [Fri, 6 Feb 2015 20:29:50 +0000 (12:29 -0800)]
Conditionalize some tests' use of SA_SIGINFO.

9 years agoDo not use SA_NOCLDWAIT in tst-pselect.
Roland McGrath [Fri, 6 Feb 2015 20:29:39 +0000 (12:29 -0800)]
Do not use SA_NOCLDWAIT in tst-pselect.

9 years agoMove tst-getlogin to login/ subdirectory.
Roland McGrath [Fri, 6 Feb 2015 20:29:27 +0000 (12:29 -0800)]
Move tst-getlogin to login/ subdirectory.

9 years agoFix libio/tst-atime not to presume ST_NOATIME exists.
Roland McGrath [Fri, 6 Feb 2015 20:24:16 +0000 (12:24 -0800)]
Fix libio/tst-atime not to presume ST_NOATIME exists.

9 years agoFix dirent/tst-fdopendir not to presume O_NOATIME exists.
Roland McGrath [Fri, 6 Feb 2015 20:23:35 +0000 (12:23 -0800)]
Fix dirent/tst-fdopendir not to presume O_NOATIME exists.

9 years agoFix nptl/tst-kill5 not to presume SIGRTMAX exists.
Roland McGrath [Fri, 6 Feb 2015 20:22:23 +0000 (12:22 -0800)]
Fix nptl/tst-kill5 not to presume SIGRTMAX exists.

9 years agoClean up nptl/tst-join5 use of nanosleep.
Roland McGrath [Fri, 6 Feb 2015 20:21:38 +0000 (12:21 -0800)]
Clean up nptl/tst-join5 use of nanosleep.

9 years agoClean up NPTL system to be compat-only.
Roland McGrath [Fri, 6 Feb 2015 18:53:38 +0000 (10:53 -0800)]
Clean up NPTL system to be compat-only.

9 years agoClean up NPTL longjmp to be compat-only.
Roland McGrath [Fri, 6 Feb 2015 18:53:27 +0000 (10:53 -0800)]
Clean up NPTL longjmp to be compat-only.

9 years agoClean up NPTL fork to be compat-only.
Roland McGrath [Fri, 6 Feb 2015 18:53:07 +0000 (10:53 -0800)]
Clean up NPTL fork to be compat-only.

9 years agox86: Clean up __vdso_clock_gettime variable.
Roland McGrath [Fri, 6 Feb 2015 18:44:11 +0000 (10:44 -0800)]
x86: Clean up __vdso_clock_gettime variable.

9 years agoExclude rpcent functions and NSS backends for rpc, key when excluding sunrpc.
Roland McGrath [Fri, 6 Feb 2015 18:43:19 +0000 (10:43 -0800)]
Exclude rpcent functions and NSS backends for rpc, key when excluding sunrpc.

9 years agoClean up sysdep-dl-routines variable.
Roland McGrath [Fri, 6 Feb 2015 18:42:08 +0000 (10:42 -0800)]
Clean up sysdep-dl-routines variable.

9 years agoNEWS: Fix spelling.
Carlos O'Donell [Fri, 6 Feb 2015 17:59:37 +0000 (12:59 -0500)]
NEWS: Fix spelling.

9 years agoNEWS: Also mention CVE-2015-1473
Florian Weimer [Fri, 6 Feb 2015 15:28:24 +0000 (16:28 +0100)]
NEWS: Also mention CVE-2015-1473

9 years agosoft-fp: Fix _FP_FMA when product is zero and third argument is finite (bug 17932).
Joseph Myers [Fri, 6 Feb 2015 15:44:07 +0000 (15:44 +0000)]
soft-fp: Fix _FP_FMA when product is zero and third argument is finite (bug 17932).

soft-fp's _FP_FMA fails to set the result's exponent for cases where
the result of the multiplication is 0, yielding incorrect (arbitrary,
depending on uninitialized values) results for those cases.  This
affects libm for architectures using soft-fp to implement fma.  This
patch adds the exponent setting and tests for this case.

Tested for ARM soft-float (which uses soft-fp fma), x86_64 and x86 (to
verify not introducing new libm test failures there).

(This bug showed up in testing my patch to move the Linux kernel to
current soft-fp.  math/Makefile has "override CFLAGS +=
-Wno-uninitialized" which would have stopped compiler warnings from
showing up this problem, although I wouldn't be surprised if removing
that shows spurious warnings from this code, if the compiler fails to
follow that various cases where the exponent is uninitialized don't
need it initialized because the class is set to a value meaning the
uninitialized exponent isn't used.)

[BZ #17932]
* soft-fp/op-common.h (_FP_FMA): Set exponent of result in case
where multiplication results in zero and third argument is finite
and nonzero.
* math/auto-libm-test-in: Add more tests of fma.
* math/auto-libm-test-out: Regenerated.

9 years agosoft-fp: Refine FP_EX_DENORM handling for comparisons.
Joseph Myers [Fri, 6 Feb 2015 15:41:49 +0000 (15:41 +0000)]
soft-fp: Refine FP_EX_DENORM handling for comparisons.

In <https://sourceware.org/ml/libc-alpha/2014-09/msg00488.html>, I
noted that comparisons in soft-fp did not set FP_EX_DENORM unless
denormal operands were flushed to zero.

This patch fixes soft-fp to check for denormal operands for
comparisons and set that exception whenever FP_EX_DENORM is not zero.
In particular, for the one architecture for which the Linux kernel
defines FP_EX_DENORM (alpha), this corresponds to the existing logic
for comparisons and so allows that logic to be replaced by a simple
call to FP_CMP_D when soft-fp is updated in the kernel.

Tested for powerpc (e500) that installed stripped shared libraries are
unchanged by this patch.

* soft-fp/op-common.h (_FP_CMP_CHECK_DENORM): New macro.
(_FP_CMP_CHECK_FLUSH_ZERO): Likewise.
(_FP_CMP): Use_FP_CMP_CHECK_DENORM and _FP_CMP_CHECK_FLUSH_ZERO.
(_FP_CMP_EQ): Likewise.
(_FP_CMP_UNORD): Use _FP_CMP_CHECK_DENORM.