external/glibc.git
10 years agoFix strtold on 32-bit sparc (and probably others) (BZ #16965)
Aurelien Jarno [Tue, 20 May 2014 12:41:44 +0000 (14:41 +0200)]
Fix strtold on 32-bit sparc (and probably others) (BZ #16965)

This patch fixes an issue observed running the tst-strtod-round test on
32 bit sparc. In some conditions, strtold calls round_and_return, which in
turn calls __mpn_rshift with cnt = 0, while stdlib/rshift.c explicitly says
that cnts should satisfy 0 < CNT < BITS_PER_MP_LIMB. In this case, the code
end up doing a logical shift right of the same amount than the register,
which is undefined in the C standard.

Due to this bug, 32-bit sparc does not correctly convert the value
"0x1p-16446", but it is likely that other architectures are also
affected for other input values.

10 years agofix nl_langinfo with static linking (BZ #16915)
Aurelien Jarno [Thu, 15 May 2014 22:06:54 +0000 (00:06 +0200)]
fix nl_langinfo with static linking (BZ #16915)

For static linking the locale code avoids linking code and data for
unused categories. However for nl_langinfo we know only at runtime which
categories are used, so direct reference to every nl_current_CATEGORY
symbol should be done.

This was broken by commit bc3e1c127392da88d0c8bf2ae728147982a3d1bc where
nl_langinfo_l and nl_langinfo have been merged and some code has been
lost in the process.

In order to detect locales issues with static linking, compile a version
of tst-langinfo with static linking.

Note: this is Debian bug#747103 reported by Raphael <raphael.astier@eliot-sa.com>

10 years agoalpha: fix sa_flags type (BZ 16967)
Richard Henderson [Tue, 20 May 2014 14:15:46 +0000 (07:15 -0700)]
alpha: fix sa_flags type (BZ 16967)

10 years agoalpha: Remove bits/siginfo.h (BZ 16966)
Richard Henderson [Tue, 20 May 2014 13:59:52 +0000 (06:59 -0700)]
alpha: Remove bits/siginfo.h (BZ 16966)

Using the default header instead.  This matches the kernel, which also
uses the generic header.  Fixes the sys/wait.h conform issue, where
si_band had the wrong type.

10 years agoalpha: Define ELF_MACHINE_NO_RELA
Richard Henderson [Mon, 19 May 2014 05:09:30 +0000 (22:09 -0700)]
alpha: Define ELF_MACHINE_NO_RELA

10 years agoAArch64: Fix handling of nocancel syscall failures
Will Newton [Mon, 19 May 2014 13:38:30 +0000 (14:38 +0100)]
AArch64: Fix handling of nocancel syscall failures

The current code for nocancel syscalls does not do a comparison of
the system call return value. This leads to code being generated
where the b.cs follows the svc instruction directly without setting
the flags on which the branch depends.

ChangeLog:

2014-05-20  Will Newton  <will.newton@linaro.org>

* sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO):
Test the return value of the system call in the nocancel case.

10 years agoAArch64: Remove asm/ptrace.h inclusion in sys/user.h and sys/procfs.h
Yvan Roux [Tue, 20 May 2014 12:45:22 +0000 (13:45 +0100)]
AArch64: Remove asm/ptrace.h inclusion in sys/user.h and sys/procfs.h

This patch fixes an issue observed by the Xen project, where including
signal.h exposes various PSR_MODE #defines.  This is due to the usage
in sys/user.h and sys/procfs.h of the struct user_pt_regs and
user_fpsimd_state included via asm/ptrace.h.  The namespace pollution
this inclusion introduce is already partially fixed with some #undef
of the PTRACE_* symbols, but other symbols like the PSR_MODE ones are
still present, and undefining them is not safe since a user can
include ptrace.h before user.h.

My proposition is to define the 2 structures we need in user.h and get
rid of the asm/ptrace.h inclusion.

Build and make check are clean on AArch64.

2014-05-20  Will Newton  <will.newton@linaro.org>
    Yvan Roux  <yvan.roux@linaro.org>

* sysdeps/unix/sysv/linux/aarch64/sys/user.h: Remove unused
#include of asm/ptrace.h.
(PTRACE_GET_THREAD_AREA): Remove #undef.
(PTRACE_GETHBPREGS): Likewise.
(PTRACE_SETHBPREGS): Likewise.
(struct user_regs_struct): New structure.
(struct user_fpsimd_struct): New structure.
* sysdeps/unix/sysv/linux/aarch64/sys/procfs.h: Remove unused
#include of asm/ptrace.h and second #include of sys/user.h.
(PTRACE_GET_THREAD_AREA): Remove #undef.
(PTRACE_GETHBPREGS): Likewise.
(PTRACE_SETHBPREGS): Likewise.
(ELF_NGREG): Use new struct user_regs_struct.
(elf_fpregset_t): Use new struct user_fpsimd_struct.

10 years agoPowerPC: Fix multiarch hypotf PPC64 path
Adhemerval Zanella [Mon, 19 May 2014 22:56:55 +0000 (17:56 -0500)]
PowerPC: Fix multiarch hypotf PPC64 path

This patch moves the hypotf multiarch implementation to correct path.

10 years agoRevert "ARM: Improve fenv implementation"
Marcus Shawcroft [Mon, 19 May 2014 08:08:59 +0000 (09:08 +0100)]
Revert "ARM: Improve fenv implementation"

This reverts commit c0c08d02c82275353f5c556f935a1a01714d9d7f.

10 years agoFix sparc memcpy data corruption when using niagara2 optimized routines.
Jose E. Marchesi [Sat, 17 May 2014 18:20:27 +0000 (11:20 -0700)]
Fix sparc memcpy data corruption when using niagara2 optimized routines.

* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
membar to avoid block loads/stores to overlap previous stores.

10 years agoalpha: Create __syscall_nocancel entry points
Richard Henderson [Sat, 17 May 2014 18:25:19 +0000 (11:25 -0700)]
alpha: Create __syscall_nocancel entry points

10 years agoMerge remote-tracking branch 'origin/roland/nptl-alpha'
Richard Henderson [Sat, 17 May 2014 18:20:44 +0000 (11:20 -0700)]
Merge remote-tracking branch 'origin/roland/nptl-alpha'

10 years agoFix some termios.h conformtest failures on sparc.
David S. Miller [Sat, 17 May 2014 18:11:53 +0000 (11:11 -0700)]
Fix some termios.h conformtest failures on sparc.

* sysdeps/unix/sysv/linux/sparc/bits/termios.h (PAGEOUT, WRAP):
Protect with __USE_GNU.
(TIOCSET_TEMPT): Likewise.
(TIOCM_LE, TIOCM_DTR, TIOCM_RTS, TIOCM_ST, TIOCM_SR, TIOCM_CTS,
TIOCM_CAR, TIOCM_RNG, TIOCM_DSR, TIOCM_CD, TIOCM_RI): Remove as
these are already provided in bits/ioctl-types.h

10 years agoFix __waitpid_nocancel link error.
Roland McGrath [Fri, 16 May 2014 21:00:35 +0000 (14:00 -0700)]
Fix __waitpid_nocancel link error.

10 years agoARM: soft-fp NaN representation correction
Maciej W. Rozycki [Fri, 16 May 2014 21:46:53 +0000 (22:46 +0100)]
ARM: soft-fp NaN representation correction

Commit 7d92b78723848ae616709eb8f0191ea067025b18 [Fix ARM NAN fraction
bits.] removed all the bits set from NANFRAC macros and, when propagated
to libgcc, regressed gcc.dg/torture/builtin-math-7.c on soft-fp arm-eabi
targets, currently ARMv6-M (`-march=armv6-m -mthumb') only.  This is
because when used to construct a NaN in the semi-raw mode, they now
build an infinity instead.  Consequently operations such as (Inf - Inf)
now produce Inf rather than NaN.  The change worked for the original
test case, posted with PR libgcc/60166, because division is made in the
canonical mode, where the quiet bit is set separately, from the fp
class.

This change brings the quiet bit back to these macros, making semi-raw
mode calculations produce the expected results again.

10 years agoUse existing makefile variables for dependencies on glibc libraries.
Joseph Myers [Fri, 16 May 2014 21:38:08 +0000 (21:38 +0000)]
Use existing makefile variables for dependencies on glibc libraries.

glibc's Makeconfig defines some variables such as $(libm) and $(libdl)
for linking with libraries built by glibc, and nptl/Makeconfig
(included by the toplevel Makeconfig) defines others such as
$(shared-thread-library).

In some places glibc's Makefiles use those variables when linking
against the relevant libraries, but in other places they hardcode the
location of the libraries in the build tree.  This patch cleans up
various places to use the variables that already exist (in the case of
libm, replacing several duplicate definitions of a $(link-libm)
variable in subdirectory Makefiles).  (It's not necessarily exactly
equivalent to what the existing code does - in particular,
$(shared-thread-library) includes libpthread_nonshared, but is
replacing places that just referred to libpthread.so.  But I think
that change is desirable on the general principle of linking things as
close as possible to the way in which they would be linked with an
installed library, unless there is a clear reason not to do so.)

To support running tests with an installed copy of glibc without
needing the full build tree from when that copy was built, I think it
will be useful to use such variables more generally and systematically
- every time the rules for building a test refer to some file from the
build tree that's also installed by glibc, use a makefile variable so
that the installed-testing case can point those variables to installed
copies of the files.  This patch just deals with straightforward cases
where such variables already exist.

It's quite possible some uses of $(shared-thread-library) should
actually be a new $(thread-library) variable that's set appropriately
in the --disable-shared case, if those uses would in fact work without
shared libraries.  I didn't change the status quo that those cases
hardcode use of a shared library whether or not it's actually needed
(but other uses such as $(libm) and $(libdl) would now get the static
library if the shared library isn't built, when some previously
hardcoded use of the shared library - if they actually need shared
libraries, the test itself needs an enable-shared conditional anyway).

Tested x86_64.

* benchtests/Makefile
($(addprefix $(objpfx)bench-,$(bench-math))): Depend on $(libm),
not $(common-objpfx)math/libm.so.
($(addprefix $(objpfx)bench-,$(bench-pthread))): Depend on
$(shared-thread-library), not $(common-objpfx)nptl/libpthread.so.
* elf/Makefile ($(objpfx)noload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
($(objpfx)tst-audit8): Depend on $(libm), not
$(common-objpfx)math/libm.so.
* malloc/Makefile ($(objpfx)libmemusage.so): Depend on $(libdl),
not $(common-objpfx)dlfcn/libdl.so.
* math/Makefile
($(addprefix $(objpfx),$(filter-out $(tests-static),$(tests)))):
Depend on $(libm), not $(objpfx)libm.so.  Do not condition on
[$(build-shared) = yes].
($(objpfx)test-fenv-tls): Depend on $(shared-thread-library), not
$(common-objpfx)nptl/libpthread.so.
* misc/Makefile ($(objpfx)tst-tsearch): Depend on $(libm), not
$(common-objpfx)math/libm.so$(libm.so-version) or
$(common-objpfx)math/libm.a depending on [$(build-shared) = yes].
* nptl/Makefile ($(objpfx)tst-unload): Depend on $(libdl), not
$(common-objpfx)dlfcn/libdl.so.
* setjmp/Makefile (link-libm): Remove variable.
($(objpfx)tst-setjmp-fp): Depend on $(libm), not $(link-libm).
* stdio-common/Makefile (link-libm): Remove variable.
($(objpfx)tst-printf-round): Depend on $(libm), not $(link-libm).
* stdlib/Makefile (link-libm): Remove variable.
($(objpfx)bug-getcontext): Depend on $(libm), not $(link-libm).
($(objpfx)tst-strtod-round): Likewise.
($(objpfx)tst-tininess): Likewise.
($(objpfx)tst-strtod-underflow): Likewise.
($(objpfx)tst-strtod6): Likewise.
($(objpfx)tst-tls-atexit): Depend on $(shared-thread-library) and
$(libdl), not $(common-objpfx)nptl/libpthread.so and
$(common-objpfx)dlfcn/libdl.so.

10 years agoPowerPC: clean BSD Terminal Modes expectation in termios.h
Adhemerval Zanella [Wed, 7 May 2014 11:43:04 +0000 (06:43 -0500)]
PowerPC: clean BSD Terminal Modes expectation in termios.h

This patch guard the BSD definition for terminal modes in PowerPC
specific header fixing the following conformance failures:

FAIL: conform/POSIX/termios.h/conform
FAIL: conform/POSIX2008/termios.h/conform
FAIL: conform/UNIX98/termios.h/conform

10 years agoAlpha: Convert fork.c to arch-fork.h
Roland McGrath [Fri, 16 May 2014 20:03:08 +0000 (13:03 -0700)]
Alpha: Convert fork.c to arch-fork.h

10 years agoARM: Convert fork.c to arch-fork.h
Roland McGrath [Fri, 16 May 2014 19:51:39 +0000 (12:51 -0700)]
ARM: Convert fork.c to arch-fork.h

10 years agoAdd stub arch-fork.h header.
Roland McGrath [Fri, 16 May 2014 18:47:13 +0000 (11:47 -0700)]
Add stub arch-fork.h header.

10 years agoSplit arch-fork.h from fork.h
Roland McGrath [Fri, 16 May 2014 18:17:41 +0000 (11:17 -0700)]
Split arch-fork.h from fork.h

10 years agoUpdate Swedish translations
Allan McRae [Fri, 16 May 2014 04:21:12 +0000 (14:21 +1000)]
Update Swedish translations

10 years agoFix variable used in sed expression in timezone/Makefile
Allan McRae [Fri, 16 May 2014 03:43:47 +0000 (13:43 +1000)]
Fix variable used in sed expression in timezone/Makefile

10 years agoSPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)
Aurelien Jarno [Thu, 15 May 2014 22:04:41 +0000 (00:04 +0200)]
SPARC: add prlimit and prlimit64 in <bits/resource.h> (BZ #16943)

prlimit and prlimit64 have been added in the main <bits/resource.h>, but
not in the SPARC specific version. Fix that.

Note: this is Debian bug#703559, reported by Emilio Pozuelo Monfort
<pochu@debian.org>

10 years agoptsname_r: don't leak uninitialized memory (BZ #16917)
Aurelien Jarno [Thu, 15 May 2014 22:03:37 +0000 (00:03 +0200)]
ptsname_r: don't leak uninitialized memory (BZ #16917)

If the fd refers to a terminal device, but not a pty master, the
TIOCGPTN ioctl returns with ENOTTY. This error is not caught, and the
possibly undefined buffer passed to ptsname_r is sent directly to the
stat64 syscall.

Fix this by using a fallback to the old method only if the TIOCGPTN
ioctl fails with EINVAL. This also fix the return value in that specific
case (it return ENOENT without this patch).

Also add tests to the ptsname_r function (and ptsname at the same time).

Note: this is Debian bug#741482, reported by Jakub Wilk <jwilk@debian.org>

10 years agoARM: Improve fenv implementation
Wilco [Thu, 15 May 2014 14:21:55 +0000 (15:21 +0100)]
ARM: Improve fenv implementation

10 years agoARM: Improve fenv implementation
Wilco [Thu, 15 May 2014 14:18:40 +0000 (15:18 +0100)]
ARM: Improve fenv implementation

10 years agoReturn EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849)
Siddhesh Poyarekar [Thu, 15 May 2014 07:03:11 +0000 (12:33 +0530)]
Return EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849)

getaddrinfo correctly returns EAI_AGAIN for AF_INET and AF_INET6
queries.  For AF_UNSPEC however, an older change
(a682a1bf553b1efe4dbb03207fece5b719cec482) broke the check and due to
that the returned error was EAI_NONAME.

This patch fixes the check so that a non-authoritative not-found is
returned as EAI_AGAIN to the user instead of EAI_NONAME.

10 years agox86: Move abilist files out of nptl/ subdirectories.
Roland McGrath [Wed, 14 May 2014 22:45:23 +0000 (15:45 -0700)]
x86: Move abilist files out of nptl/ subdirectories.

10 years agoMove remaining files out of nptl/sysdeps/unix/sysv/linux/x86/.
Roland McGrath [Wed, 14 May 2014 22:32:18 +0000 (15:32 -0700)]
Move remaining files out of nptl/sysdeps/unix/sysv/linux/x86/.

10 years agoFix mips fork after i386 reorganization.
Roland McGrath [Wed, 14 May 2014 21:00:23 +0000 (14:00 -0700)]
Fix mips fork after i386 reorganization.

10 years agoMove remaining nptl/sysdeps/unix/sysv/linux/i386/ files.
Roland McGrath [Wed, 14 May 2014 20:37:40 +0000 (13:37 -0700)]
Move remaining nptl/sysdeps/unix/sysv/linux/i386/ files.

10 years agoFix powerpc fork after i386 reorganization.
Roland McGrath [Wed, 14 May 2014 20:28:40 +0000 (13:28 -0700)]
Fix powerpc fork after i386 reorganization.

10 years agoUpdate alpha and ia64 timer_*.c files for x86_64 file moves.
Roland McGrath [Wed, 14 May 2014 20:24:17 +0000 (13:24 -0700)]
Update alpha and ia64 timer_*.c files for x86_64 file moves.

10 years agoi386: Remove useless pthread_spin_{init,unlock} wrapper files.
Roland McGrath [Wed, 14 May 2014 19:57:21 +0000 (12:57 -0700)]
i386: Remove useless pthread_spin_{init,unlock} wrapper files.

10 years agoMove remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files.
Roland McGrath [Wed, 14 May 2014 19:33:43 +0000 (12:33 -0700)]
Move remaining nptl/sysdeps/unix/sysv/linux/x86_64/ files.

10 years agox86: Consolidate NPTL fork.
Roland McGrath [Wed, 14 May 2014 18:31:37 +0000 (11:31 -0700)]
x86: Consolidate NPTL fork.

10 years agoConsolidate not-cancel.h files.
Roland McGrath [Wed, 14 May 2014 18:06:36 +0000 (11:06 -0700)]
Consolidate not-cancel.h files.

10 years agoUpdate s390 timer_*.c files for x86_64 file moves.
Roland McGrath [Wed, 14 May 2014 17:57:40 +0000 (10:57 -0700)]
Update s390 timer_*.c files for x86_64 file moves.

10 years agox86_64: Remove useless pthread_spin_{init,unlock} wrapper files.
Roland McGrath [Wed, 14 May 2014 17:53:52 +0000 (10:53 -0700)]
x86_64: Remove useless pthread_spin_{init,unlock} wrapper files.

10 years agoMove x86_64 compat-timer.h out of nptl/
Roland McGrath [Wed, 14 May 2014 17:43:54 +0000 (10:43 -0700)]
Move x86_64 compat-timer.h out of nptl/

10 years agoMove x86_64 timer_*.c out of nptl/
Roland McGrath [Wed, 14 May 2014 17:35:39 +0000 (10:35 -0700)]
Move x86_64 timer_*.c out of nptl/

10 years agox86: Consolidate NPTL/non versions of clone
Roland McGrath [Wed, 14 May 2014 17:16:27 +0000 (10:16 -0700)]
x86: Consolidate NPTL/non versions of clone

10 years agoMove NPTL public ABI headers for x86 to sysdeps/x86/nptl/.
Roland McGrath [Wed, 14 May 2014 16:44:56 +0000 (09:44 -0700)]
Move NPTL public ABI headers for x86 to sysdeps/x86/nptl/.

10 years agox86: Consolidate NPTL/non versions of vfork
Roland McGrath [Wed, 14 May 2014 16:44:39 +0000 (09:44 -0700)]
x86: Consolidate NPTL/non versions of vfork

10 years agoARM: Consolidate NPTL/non versions of vfork
Roland McGrath [Wed, 14 May 2014 16:44:24 +0000 (09:44 -0700)]
ARM: Consolidate NPTL/non versions of vfork

10 years agostdlib/gmp-impl.h: Silence -Wundef warning for USE_STACK_ALLOC
Will Newton [Fri, 25 Apr 2014 14:48:48 +0000 (15:48 +0100)]
stdlib/gmp-impl.h: Silence -Wundef warning for USE_STACK_ALLOC

The upstream version of GMP has long removed this conditional
altogether in this commit:

changeset:   5254:88618a4694ac
user:        Kevin Ryde <user42@zip.com.au>
date:        Sun Jun 17 01:37:27 2001 +0200

So just turn the #if into an #ifdef to silence the warning.

ChangeLog:

2014-05-14  Will Newton  <will.newton@linaro.org>

* stdlib/gmp-impl.h: Test USE_STACK_ALLOC #ifdef
rather than #if.

10 years agoFix log1pl (LDBL_MAX) in FE_UPWARD mode (bug 16564).
Joseph Myers [Wed, 14 May 2014 12:38:56 +0000 (12:38 +0000)]
Fix log1pl (LDBL_MAX) in FE_UPWARD mode (bug 16564).

Bug 16564 is spurious overflow of log1pl (LDBL_MAX) in FE_UPWARD mode,
resulting from log1pl adding 1 to its argument (for arguments not
close to 0), which overflows in that mode.  This patch fixes this by
avoiding adding 1 to large arguments (precisely what counts as large
depends on the floating-point format).

Tested x86_64 and x86, and spot-checked log1pl tests on mips64 and
powerpc64.

[BZ #16564]
* sysdeps/i386/fpu/s_log1pl.S (__log1pl): Do not add 1 to positive
arguments with exponent 65 or above.
* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl): Do not add 1 to
arguments 0x1p113L or above.
* sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (__log1pl): Do not add 1
to arguments 0x1p107L or above.
* sysdeps/x86_64/fpu/s_log1pl.S (__log1pl): Do not add 1 to
positive arguments with exponent 65 or above.
* math/auto-libm-test-in: Add more tests of log1p.
* math/auto-libm-test-out: Regenerated.

10 years agoFix cacos (+Inf + finite*i) in round-downward mode (bug 16928).
Joseph Myers [Wed, 14 May 2014 12:37:24 +0000 (12:37 +0000)]
Fix cacos (+Inf + finite*i) in round-downward mode (bug 16928).

According to C99/C11 Annex G, cacos applied to a value with real part
+Inf and finite imaginary part should produce a result with real part
+0.  glibc wrongly produces a result with real part -0 in FE_DOWNWARD
mode.  This patch fixes this by checking for zero results in the
relevant case of non-finite arguments (where there should never be a
result with -0 real part), and converts the tests of cacos to
ALL_RM_TEST.

Tested x86_64 and x86 and ulps updated accordingly.

[BZ #16928]
* math/s_cacos.c (__cacos): Ensure zero real part of result from
non-finite arguments is +0.
* math/s_cacosf.c (__cacosf): Likewise.
* math/s_cacosl.c (__cacosl): Likewise.
* math/libm-test.inc (cacos_test): Use ALL_RM_TEST.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agoFix acosh (1) in round-downward mode (bug 16927).
Joseph Myers [Wed, 14 May 2014 12:35:40 +0000 (12:35 +0000)]
Fix acosh (1) in round-downward mode (bug 16927).

According to C99 and C11 Annex F, acosh (1) should be +0 in all
rounding modes.  However, some implementations in glibc wrongly return
-0 in round-downward mode (which is what you get if you end up
computing log1p (-0), via 1 - 1 being -0 in round-downward mode).
This patch fixes the problem implementations, by correcting the test
for an exact 1 value in the ldbl-96 implementation to allow for the
explicit high bit of the mantissa, and by inserting fabs instructions
in the i386 implementations; tests of acosh are duly converted to
ALL_RM_TEST.  I believe all the other sysdeps/ieee754 implementations
are already OK (I haven't checked the ia64 versions, but if buggy then
that will be obvious from the results of test runs after this patch is
in).

Tested x86_64 and x86 and ulps updated accordingly.

[BZ #16927]
* sysdeps/i386/fpu/e_acosh.S (__ieee754_acosh): Use fabs on x-1
value.
* sysdeps/i386/fpu/e_acoshf.S (__ieee754_acoshf): Likewise.
* sysdeps/i386/fpu/e_acoshl.S (__ieee754_acoshl): Likewise.
* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Correct
for explicit high bit of mantissa when testing for argument equal
to 1.
* math/libm-test.inc (acosh_test): Use ALL_RM_TEST.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agoFix erf underflow handling near 0 (bug 16516).
Joseph Myers [Wed, 14 May 2014 12:34:03 +0000 (12:34 +0000)]
Fix erf underflow handling near 0 (bug 16516).

Bug 16516 reports spurious underflows from erf (for all floating-point
types), when the result is close to underflowing but does not actually
underflow.

erf (x) is about (2/sqrt(pi))*x for x close to 0, so there are
subnormal arguments for which it does not underflow.  The various
implementations do (x + efx*x) (for efx = 2/sqrt(pi) - 1), for greater
accuracy than if just using a single multiplication by an
approximation to 2/sqrt(pi) (effectively, this way there are a few
more bits in the approximation to 2/sqrt(pi)).  This can introduce
underflows when efx*x underflows even though the final result does
not, so a scaled calculation with 8*efx is done in these cases - but 8
is not a big enough scale factor to avoid all such underflows.  16 is
(any underflows with a scale factor of 16 would only occur when the
final result underflows), so this patch changes the code to use that
factor.  Rather than recomputing all the values of the efx8 variable,
it is removed, leaving it to the compiler's constant folding to
compute 16*efx.  As such scaling can also lose underflows when the
final scaling down happens to be exact, appropriate checks are added
to ensure underflow exceptions occur when required in such cases.

Tested x86_64 and x86; no ulps updates needed.  Also spot-checked for
powerpc32 and mips64 to verify the changes to the ldbl-128ibm and
ldbl-128 implementations.

[BZ #16516]
* sysdeps/ieee754/dbl-64/s_erf.c (efx8): Remove variable.
(__erf): Scale by 16 instead of 8 in potentially underflowing
case.  Ensure exception if result actually underflows.
* sysdeps/ieee754/flt-32/s_erff.c (efx8): Remove variable.
(__erff): Scale by 16 instead of 8 in potentially underflowing
case.  Ensure exception if result actually underflows.
* sysdeps/ieee754/ldbl-128/s_erfl.c: Include <float.h>.
(efx8): Remove variable.
(__erfl): Scale by 16 instead of 8 in potentially underflowing
case.  Ensure exception if result actually underflows.
* sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Include <float.h>.
(efx8): Remove variable.
(__erfl): Scale by 16 instead of 8 in potentially underflowing
case.  Ensure exception if result actually underflows.
* sysdeps/ieee754/ldbl-96/s_erfl.c: Include <float.h>.
(efx8): Remove variable.
(__erfl): Scale by 16 instead of 8 in potentially underflowing
case.  Ensure exception if result actually underflows.
* math/auto-libm-test-in: Add more tests of erf.
* math/auto-libm-test-out: Regenerated.

10 years agoRemove last use of USE___THREAD
Andreas Schwab [Tue, 25 Mar 2014 10:55:52 +0000 (11:55 +0100)]
Remove last use of USE___THREAD

10 years agoFix macro warning on HAVE_PT_CHOWN
Andreas Schwab [Tue, 13 May 2014 15:04:27 +0000 (17:04 +0200)]
Fix macro warning on HAVE_PT_CHOWN

10 years agoReduce kernel-features.h duplication.
Joseph Myers [Wed, 14 May 2014 00:45:19 +0000 (00:45 +0000)]
Reduce kernel-features.h duplication.

This patch reduces duplication between different architectures'
kernel-features.h files by making the architecture-independent file
define various macros unconditionally (instead of only for a
particular list of architectures), with the architecture-specific
files then undefining the macros if necessary.

Specifically, __ASSUME_O_CLOEXEC (O_CLOEXEC flag to open) and
__ASSUME_SOCK_CLOEXEC (SOCK_NONBLOCK and SOCK_CLOEXEC flags to socket)
are supported on all architectures as of 2.6.32 or the minimum kernel
version for the architecture if later.  For __ASSUME_IN_NONBLOCK,
__ASSUME_PIPE2, __ASSUME_EVENTFD2, __ASSUME_SIGNALFD4 and
__ASSUME_DUP3, the relevant syscalls were added for alpha in 2.6.33
but otherwise the features are available as of 2.6.32.  For
__ASSUME_UTIMES, support is everywhere in 2.6.32 except for
asm-generic architectures and hppa.

Although those were the main cases of duplication among
kernel-features.h files, some other cases of unnecessary definitions
were also cleaned up: the hppa file defined various macros that were
either no longer used at all, or defined by the main file by default
anyway, the ia64 file had duplicative definitions of __ASSUME_PSELECT
and __ASSUME_PPOLL, while mips had such a definition of
__ASSUME_IPC64.

Really, rather than being defined in the main file then undefined for
asm-generic architectures, __ASSUME_UTIMES should become an
hppa-specific macro.  Given that __ASSUME_ATFCTS and
__ASSUME_UTIMENSAT are now always true, the only live __ASSUME_UTIMES
conditional is in sysdeps/unix/sysv/linux/utimes.c, which is not used
for asm-generic architectures.  I think the desired state would be an
hppa-specific file (that includes sysdeps/unix/sysv/linux/utimes.c if
__ASSUME_UTIMES, and otherwise has fallback code), with the fallback
code being removed from the main utimes.c.  But I think that's most
reasonably a separate cleanup once __ASSUME_ATFCTS and
__ASSUME_UTIMESAT have both had conditional code cleaned up.

Given this patch, I think it's straightforward to move non-ex-ports
architectures to having their own kernel-features.h files, like
ex-ports architectures, rather than conditionals in the main file
(i.e., such a move won't require the architecture-specific file to
contain anything that isn't genuinely architecture-specific), and
would encourage architecture maintainers to do so.

Tested x86_64 that the installed shared libraries are unchanged by
this patch.  Note that on some architectures this *will* cause
__ASSUME_* macros to be defined in cases where they weren't previously
but should have been (but this is just optimization, not a fix to a
user-visible bug, so doesn't need a bug report in Bugzilla).

* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES):
Define unconditionally.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_DUP3): Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Undefine if [__LINUX_KERNEL_VERSION <
0x020621] instead of defining if [__LINUX_KERNEL_VERSION >=
0x020621].
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
[__LINUX_KERNEL_VERSION < 0x020621] (__ASSUME_DUP3): Undefine.
* sysdeps/unix/sysv/linux/arm/kernel-features.h (__ASSUME_UTIMES):
Do not define.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_32BITUIDS): Likewise.
(__ASSUME_TRUNCATE64_SYSCALL): Likewise.
(__ASSUME_IPC64): Likewise.
(__ASSUME_ST_INO_64_BIT): Likewise.
(__ASSUME_GETDENTS64_SYSCALL): Likewise.
[__LINUX_KERNEL_VERSION < 0x030e00] (__ASSUME_UTIMES): Undefine.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_UTIMES): Do not define.
(__ASSUME_PSELECT): Likewise.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_UTIMES): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
(__ASSUME_UTIMES): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h (__ASSUME_IPC64):
Likewise.
(__ASSUME_UTIMES): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
(__ASSUME_UTIMES): Undefine.

10 years agoClean up ARM old-ABI symbol versioning relics.
Joseph Myers [Wed, 14 May 2014 00:41:20 +0000 (00:41 +0000)]
Clean up ARM old-ABI symbol versioning relics.

This patch cleans up some symbol versioning code in the ARM port that
exists only as relics of the old-ABI port, which was removed some time
ago.

The minimum symbol version in the ARM port is GLIBC_2.4 (the version
where the EABI port was introduced).  Thus, any SHLIB_COMPAT
conditionals where the later version is 2.4 or later are obsolete and
can be removed.  In addition, there is no need to set symbol versions
before 2.4 explicitly if the symbols would have a version of 2.4 by
default anyway.  This includes most of the entries in
sysdeps/unix/sysv/linux/arm/Versions: those for GLIBC_2.0 are for
libgcc unwind functions that aren't actually in ARM EABI glibc at all,
while those for GLIBC_2.2 and GLIBC_2.3.3 are for functions which for
the old-ABI port may have had versions different from the
architecture-independent default, but where for EABI the default
suffices (both the default and the version in that file map to 2.4, so
the entries in that file do nothing).  The GLIBC_2.1 entries are
needed (architecture-specific functions), but it seems less confusing
for those to say GLIBC_2.4, as the actual version those symbols in
fact have.

Various cases in the <fenv.h> functions where a function is defined as
__fe* with an fe* versioned alias are cleaned up just to define fe*
directly, as done e.g. on AArch64.  If in future we actually need an
__fe* name for use from C90 functions in libm as discussed recently,
of course we can add one on all architectures and make the fe* name
into a weak alias for that particular function, but for now the __fe*
names aren't needed.

In the case of posix_fadvise64, the __posix_fadvise64_l64 name and
posix_fadvise64 alias are kept as __posix_fadvise64_l64 is used in
posix_fadvise.  (For that to be a namespace-clean use, posix_fadvise64
needs to be a *weak* alias not a strong one as at present, but that's
an independent preexisting bug.)

(There remain references to GLIBC_2_2 in
sysdeps/unix/sysv/linux/arm/{msgctl.c,semctl.c,shmctl.c}.  As those
files are used by alpha which has a genuine 2.2 version for those
functions, I think those references need to stay as-is.)

Tested that the disassembly of installed shared libraries is unchanged
by this patch (though function names shown in disassembly change to no
longer have @@GLIBC_2.4, now those functions get versioned only by the
version map and not redundantly at assembler time) and that the ABI
tests pass.

* sysdeps/arm/fclrexcpt.c (__feclearexcept): Rename to
feclearexcept.  Remove symbol versioning code.
* sysdeps/arm/fegetenv.c (__fegetenv): Rename to fegetenv.  Remove
symbol versioning code.
* sysdeps/arm/fesetenv.c (__fesetenv): Rename to fesetenv.  Remove
symbol versioning code.
* sysdeps/arm/feupdateenv.c (__feupdateenv): Rename to
feupdateenv.  Remove symbol versioning code.
* sysdeps/arm/fgetexcptflg.c (__fegetexceptflag): Rename to
fegetexceptflag.  Remove symbol versioning code.
* sysdeps/arm/fsetexcptflg.c (__fesetexceptflag): Rename to
fesetexceptflag.  Remove symbol versioning code.
* sysdeps/unix/sysv/linux/arm/Versions (libc): Remove GLIBC_2.0,
GLIBC_2.2 and GLIBC_2.3.3 entries.  Change GLIBC_2.1 to GLIBC_2.4.
* sysdeps/unix/sysv/linux/arm/posix_fadvise64.c
(__posix_fadvise64_l32): Remove prototype.
[SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)]: Remove conditional
code.

10 years agoMove NPTL public ABI headers for ARM to sysdeps/arm/nptl/.
Roland McGrath [Tue, 13 May 2014 17:22:21 +0000 (10:22 -0700)]
Move NPTL public ABI headers for ARM to sysdeps/arm/nptl/.

10 years agofix changelog.
Ondřej Bílka [Tue, 13 May 2014 17:40:15 +0000 (19:40 +0200)]
fix changelog.

10 years agotzselect: use zonedir instead of current working directory
Sami Kerola [Tue, 13 May 2014 17:38:32 +0000 (19:38 +0200)]
tzselect: use zonedir instead of current working directory

10 years agoVerbatim NPTL file moves for ARM/Linux.
Roland McGrath [Tue, 13 May 2014 17:04:20 +0000 (10:04 -0700)]
Verbatim NPTL file moves for ARM/Linux.

10 years agoConsolidate NPTL configury for ARM/Linux.
Roland McGrath [Tue, 13 May 2014 17:04:05 +0000 (10:04 -0700)]
Consolidate NPTL configury for ARM/Linux.

10 years agoConsolidate NPTL vs non clone.S for ARM.
Roland McGrath [Tue, 13 May 2014 17:03:45 +0000 (10:03 -0700)]
Consolidate NPTL vs non clone.S for ARM.

10 years agoClean up __exit_thread.
Roland McGrath [Tue, 13 May 2014 16:49:20 +0000 (09:49 -0700)]
Clean up __exit_thread.

10 years agoFix typo in assertion
Andreas Schwab [Tue, 13 May 2014 15:06:58 +0000 (17:06 +0200)]
Fix typo in assertion

10 years agoClean up kernel version conditionals for pre-2.6.32 kernels.
Joseph Myers [Mon, 12 May 2014 22:48:25 +0000 (22:48 +0000)]
Clean up kernel version conditionals for pre-2.6.32 kernels.

This patch does some initial cleanup, following the move to 2.6.32
minimum kernel version, by removing __LINUX_KERNEL_VERSION
conditionals that are now always-true or always-false.  In the case of
__ASSUME_ARG_MAX_STACK_BASED, where the conditional used a kernel
version that was itself in a macro, the associated sysconf.c code is
also cleaned up and __ASSUME_ARG_MAX_STACK_BASED removed completely.

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

* sysdeps/unix/sysv/linux/kernel-features.h [__s390__]
(__ASSUME_UTIMES): Do not condition on kernel version.
(__ASSUME_PSELECT): Define unconditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_ATFCTS): Likewise.
(__ASSUME_SET_ROBUST_LIST): Do not condition on kernel version.
(__ASSUME_COMPLETE_READV_WRITEV): Define unconditionally.
(__ASSUME_FUTEX_LOCK_PI): Do not condition on kernel version.
(__ASSUME_UTIMENSAT): Define unconditionally.
(__ASSUME_PRIVATE_FUTEX): Likewise.
(__ASSUME_FALLOCATE): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__LINUX_ARG_MAX_STACK_BASED_MIN_KERNEL): Remove.
(__ASSUME_ARG_MAX_STACK_BASED): Likewise.
(__ASSUME_ADJ_OFFSET_SS_READ): Define unconditionally.
(__ASSUME_SOCK_CLOEXEC): Do not condition on kernel version.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
[__x86_64__ || __sparc__] (__ASSUME_ACCEPT4_SYSCALL): Likewise.
(__ASSUME_FUTEX_CLOCK_REALTIME): Define unconditionally.
(__ASSUME_AT_RANDOM): Likewise.
(__ASSUME_PREADV): Likewise.
(__ASSUME_PWRITEV): Likewise.
(__ASSUME_REQUEUE_PI): Do not condition on kernel version.
(__ASSUME_F_GETOWN_EX): Define unconditionally.
(__ASSUME_XFS_RESTRICTED_CHOWN): Likewise.
* sysdeps/unix/sysv/linux/sysconf.c (__sysconf)
[!__ASSUME_ARG_MAX_STACK_BASED]: Remove conditional code.
* sysdeps/unix/sysv/linux/alpha/kernel-features.h
(__ASSUME_O_CLOEXEC): Define unconditionally.
(__ASSUME_PSELECT): Do not undefine conditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_ATFCTS): Likewise.
(__ASSUME_SET_ROBUST_LIST): Likewise.
(__ASSUME_UTIMENSAT): Likewise.
(__ASSUME_FDATASYNC): Define unconditionally.
* sysdeps/unix/sysv/linux/arm/kernel-features.h
(__ASSUME_SIGFRAME_V2): Likewise.
)__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_PSELECT): Do not undefine conditionally.
(__ASSUME_PPOLL): Likewise.
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
(__ASSUME_PSELECT): Define unconditionally.
(__ASSUME_PPOLL): Likewise.
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h
(__ASSUME_O_CLOEXEC): Likewise.
(__ASSUME_SOCK_CLOEXEC): Likewise.
(__ASSUME_IN_NONBLOCK): Likewise.
(__ASSUME_PIPE2): Likewise.
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_DUP3): Likewise.
* sysdeps/unix/sysv/linux/mips/kernel-features.h
(__ASSUME_EVENTFD2): Likewise.
(__ASSUME_SIGNALFD4): Likewise.
(__ASSUME_ACCEPT4_SYSCALL): Likewise.

10 years agoFix unbound stack use in NIS NSS module
Andreas Schwab [Thu, 8 May 2014 14:53:01 +0000 (16:53 +0200)]
Fix unbound stack use in NIS NSS module

10 years agomalloc: Add mallopt test.
Will Newton [Mon, 19 Aug 2013 10:39:55 +0000 (11:39 +0100)]
malloc: Add mallopt test.

ChangeLog:

2014-05-12  Will Newton  <will.newton@linaro.org>

* malloc/Makefile (tests): Add tst-mallopt.
* malloc/tst-mallopt.c: New file.

10 years agoMake armv7 strcmp assembly compatible with ARM mode and SFI.
Roland McGrath [Fri, 9 May 2014 18:08:39 +0000 (11:08 -0700)]
Make armv7 strcmp assembly compatible with ARM mode and SFI.

10 years agoFix elf/tst-tls9-static build
Adhemerval Zanella [Fri, 9 May 2014 18:35:28 +0000 (15:35 -0300)]
Fix elf/tst-tls9-static build

This patch fixes the tst-tlsmod[5/6].so build in system that uses
-Wl,--as-needed as default in linker option.  Without this option
the testing shared library that does not have libc.so in DT_NEEDED
and the tst-tls9-static fails in architecture that use the
./sysdeps/unix/sysv/linux/<arch>/dl-static.c trick.

10 years agoSilence a missing-noreturn warning for _Unwind_Resume.
Roland McGrath [Fri, 9 May 2014 17:05:29 +0000 (10:05 -0700)]
Silence a missing-noreturn warning for _Unwind_Resume.

10 years agoInclude SSE state in i386 fenv_t (bug 16064).
Joseph Myers [Fri, 9 May 2014 16:59:56 +0000 (16:59 +0000)]
Include SSE state in i386 fenv_t (bug 16064).

This patch fixes bug 16064, i386 fenv_t not including SSE state, using
the technique suggested there of storing the state in the existing
__eip field of fenv_t to avoid needing to increase the size of fenv_t
and add new symbol versions.  The included testcase, which previously
failed for i386 (but passed for x86_64), illustrates how the previous
state was buggy.

This patch causes the SSE state to be included *to the extent it is on
x86_64*.  Where some state should logically be included but isn't for
x86_64 (see bug 16068), this patch does not cause it to be included
for i386 either.  The idea is that any patch fixing that bug should
fix it for both x86_64 and i386 at once.

Tested i386 and x86_64.  (I haven't tested the case of a CPU without
SSE2 disabling the test.)

[BZ #16064]
* sysdeps/i386/fpu/fegetenv.c: Include <unistd.h>, <ldsodefs.h>
and <dl-procinfo.h>.
(__fegetenv): Save SSE state in envp->__eip if supported.
* sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Save SSE state in
envp->__eip if supported.
* sysdeps/i386/fpu/fesetenv.c: Include <unistd.h>, <ldsodefs.h>
and <dl-procinfo.h>.
(__fesetenv): Always set __eip, __cs_selector, __opcode,
__data_offset and __data_selector in environment to 0.  Set SSE
state if supported.
* sysdeps/x86/fpu/Makefile [$(subdir) = math] (tests): Add
test-fenv-sse.
[$(subdir) = math] (CFLAGS-test-fenv-sse.c): Add -msse2
-mfpmath=sse.
* sysdeps/x86/fpu/test-fenv-sse.c: New file.

10 years agoARM: Allow auto-detection of linker relro feature
Will Newton [Fri, 9 May 2014 12:53:56 +0000 (13:53 +0100)]
ARM: Allow auto-detection of linker relro feature

Set values for libc_commonpagesize and libc_relro_required for the
ARM port to enable relro by default and suppress a warning at
configure time.

ChangeLog:

2014-05-09  Will Newton  <will.newton@linaro.org>

* sysdeps/arm/preconfigure.ac: Set libc_commonpagesize
and libc_relro_required for ARM.
* sysdeps/arm/preconfigure: Regenerate.

10 years agoS/390: Port of lock elision to System/z
Dominik Vogt [Fri, 9 May 2014 14:58:46 +0000 (16:58 +0200)]
S/390: Port of lock elision to System/z

Added support for TX lock elision of pthread mutexes on s390 and
s390x.  This may improve lock scaling of existing programs on TX
capable systems.  The lock elision code is only built with
--enable-lock-elision=yes and then requires a GCC version supporting
the TX builtins.  With lock elision default mutexes are elided via
__builtin_tbegin, if the cpu supports transactions. By default lock
elision is not enabled and the elision code is not built.

10 years agoARM: Add optimized ARMv7 strcmp implementation
Will Newton [Wed, 23 Apr 2014 12:21:47 +0000 (13:21 +0100)]
ARM: Add optimized ARMv7 strcmp implementation

Add an optimized implementation of strcmp for ARMv7-A cores. This
implementation is significantly faster than the current generic C
implementation, particularly for strings of 16 bytes and longer.

Tested with the glibc string tests for arm-linux-gnueabihf and
armeb-linux-gnueabihf.

The code was written by ARM, who have agreed to assign the copyright
to the FSF for integration into glibc.

ChangeLog:

2014-05-09  Will Newton  <will.newton@linaro.org>

* sysdeps/arm/armv7/strcmp.S: New file.
* NEWS: Mention addition of ARMv7 optimized strcmp.

10 years agoSome configure-related decrufting.
Roland McGrath [Thu, 8 May 2014 18:27:14 +0000 (11:27 -0700)]
Some configure-related decrufting.

10 years agoFix -Wundef for _UTSNAME_DOMAIN_LENGTH.
Roland McGrath [Thu, 8 May 2014 17:47:35 +0000 (10:47 -0700)]
Fix -Wundef for _UTSNAME_DOMAIN_LENGTH.

10 years agoAdd 16922 to list of bugs fixed.
Steve Ellcey [Wed, 7 May 2014 20:15:52 +0000 (13:15 -0700)]
Add 16922 to list of bugs fixed.

10 years ago2014-05-07 Steve Ellcey <sellcey@mips.com>
Steve Ellcey [Wed, 7 May 2014 20:10:48 +0000 (13:10 -0700)]
2014-05-07  Steve Ellcey  <sellcey@mips.com>

[BZ# 16922]
* sysdeps/mips/sys/asm.h (INT_SUB): Fix definition.
(LONG_SUB): Ditto.
(PTR_SUB): Ditto.

10 years agoFix parsing of getai result from nscd for IPv6-only request
Andreas Schwab [Wed, 7 May 2014 09:47:20 +0000 (11:47 +0200)]
Fix parsing of getai result from nscd for IPv6-only request

10 years agoFix typo in nscd/selinux.c
Ondřej Bílka [Wed, 7 May 2014 12:08:57 +0000 (14:08 +0200)]
Fix typo in nscd/selinux.c

10 years agoFix typo in nptl/sockperf.c
Ondřej Bílka [Wed, 7 May 2014 11:58:23 +0000 (13:58 +0200)]
Fix typo in nptl/sockperf.c

10 years agoMove ARM internal unwind.h header to the right sysdeps directory.
Roland McGrath [Tue, 6 May 2014 22:55:20 +0000 (15:55 -0700)]
Move ARM internal unwind.h header to the right sysdeps directory.

10 years agoSPARC: add EFD_SEMAPHORE in <bits/eventfd.h> (BZ #16916)
Aurelien Jarno [Tue, 6 May 2014 21:31:44 +0000 (23:31 +0200)]
SPARC: add EFD_SEMAPHORE in <bits/eventfd.h> (BZ #16916)

EFD_SEMAPHORE has been added in the main <bits/eventfd.h>, but not in
the SPARC specific version. Fix that.

10 years agoPowerPC: strncpy/stpncpy optimization for PPC64/POWER7
Vidya Ranganathan [Tue, 6 May 2014 00:10:45 +0000 (19:10 -0500)]
PowerPC: strncpy/stpncpy optimization for PPC64/POWER7

The optimization is achieved by following techniques:
  > data alignment [gain from aligned memory access on read/write]
  > POWER7 gains performance with loop unrolling/unwinding
    [gain by reduction of branch penalty].
  > zero padding done by calling optimized memset

10 years agoDon't use catomic functions in mcount (BZ #16912)
Andreas Schwab [Tue, 6 May 2014 09:55:24 +0000 (11:55 +0200)]
Don't use catomic functions in mcount (BZ #16912)

mcount cannot use catomic functions since it is called by
__libc_start_main before TLS is set up.  This reverts the change made by
commit 8099361.

10 years agoMove rules for Linux-specific pldd program to Linux-specific Makefile.
Roland McGrath [Mon, 5 May 2014 20:16:08 +0000 (13:16 -0700)]
Move rules for Linux-specific pldd program to Linux-specific Makefile.

10 years agoFix -Wundef issues in generated errlist.c.
Roland McGrath [Mon, 5 May 2014 20:06:18 +0000 (13:06 -0700)]
Fix -Wundef issues in generated errlist.c.

10 years agoPowerPC: ifunc improvement for internal calls
Adhemerval Zanella [Fri, 2 May 2014 17:00:36 +0000 (12:00 -0500)]
PowerPC: ifunc improvement for internal calls

This patch changes de default symbol redirection for internal call of
memcpy, memset, memchr, and strlen to the IFUNC resolved ones.  The
performance improvement is noticeable in algorithms that uses these
symbols extensible, like the regex functions.

10 years agoRevert incorrect removal of the XDR currency from locale/iso-4217.def
Adam Conrad [Sun, 4 May 2014 05:45:15 +0000 (23:45 -0600)]
Revert incorrect removal of the XDR currency from locale/iso-4217.def

In 7447ccd98ee3944a95247ae23284dfac1de6c2aa, the XDR currency was
removed from locale/iso-4217.def, despite the fact that it's both
still a part of the standard, according to the official table:

http://www.currency-iso.org/dam/downloads/table_a1.xml

... and, more importantly, is referenced from localedata/i18n, so
any quick-and-dirty locale definition that uses "copy i18n" for
LC_MONETARY wouldn't work anymore.

10 years agoUpdate Esperanto translations
Allan McRae [Sun, 4 May 2014 03:35:16 +0000 (13:35 +1000)]
Update Esperanto translations

10 years agoFix -Wundef warning for FEATURE_INDEX_1.
Carlos O'Donell [Sat, 3 May 2014 04:25:21 +0000 (00:25 -0400)]
Fix -Wundef warning for FEATURE_INDEX_1.

Define FEATURE_INDEX_1 and FEATURE_INDEX_MAX as macros
for use by both assembly and C code. This fixes the
-Wundef error for cases where FEATURE_INDEX_1 was not
defined but used the correct value of 0 for an undefined
macro.

10 years ago2014-05-01 Steve Ellcey <sellcey@mips.com>
Steve Ellcey [Thu, 1 May 2014 20:42:40 +0000 (13:42 -0700)]
2014-05-01  Steve Ellcey  <sellcey@mips.com>

* iconvdata/ansi_x3.110.c (ONE_DIRECTION): Define.
* iconvdata/armscii-8.c (ONE_DIRECTION): Define.
* iconvdata/big5.c (ONE_DIRECTION): Define.
* iconvdata/big5hkscs.c (ONE_DIRECTION): Define.
* iconvdata/cp1255.c (ONE_DIRECTION): Define.
* iconvdata/cp1258.c (ONE_DIRECTION): Define.
* iconvdata/cp932.c (ONE_DIRECTION): Define.
* iconvdata/euc-cn.c (ONE_DIRECTION): Define.
* iconvdata/euc-jisx0213.c (ONE_DIRECTION): Define.
* iconvdata/euc-jp-ms.c (ONE_DIRECTION): Define.
* iconvdata/euc-jp.c (ONE_DIRECTION): Define.
* iconvdata/euc-kr.c (ONE_DIRECTION): Define.
* iconvdata/euc-tw.c (ONE_DIRECTION): Define.
* iconvdata/gb18030.c (ONE_DIRECTION): Define.
* iconvdata/gbbig5.c (ONE_DIRECTION): Define.
* iconvdata/gbgbk.c (ONE_DIRECTION): Define.
* iconvdata/gbk.c (ONE_DIRECTION): Define.
* iconvdata/ibm1364.c (ONE_DIRECTION): Define.
* iconvdata/ibm930.c (ONE_DIRECTION): Define.
* iconvdata/ibm932.c (ONE_DIRECTION): Define.
* iconvdata/ibm933.c (ONE_DIRECTION): Define.
* iconvdata/ibm935.c (ONE_DIRECTION): Define.
* iconvdata/ibm937.c (ONE_DIRECTION): Define.
* iconvdata/ibm939.c (ONE_DIRECTION): Define.
* iconvdata/ibm943.c (ONE_DIRECTION): Define.
* iconvdata/iso-2022-cn-ext.c (ONE_DIRECTION): Define.
* iconvdata/iso-2022-cn.c (ONE_DIRECTION): Define.
* iconvdata/iso-2022-jp-3.c (ONE_DIRECTION): Define.
* iconvdata/iso-2022-jp.c (ONE_DIRECTION): Define.
* iconvdata/iso-2022-kr.c (ONE_DIRECTION): Define.
* iconvdata/iso646.c (ONE_DIRECTION): Define.
* iconvdata/iso8859-1.c (ONE_DIRECTION): Define.
* iconvdata/iso_11548-1.c (ONE_DIRECTION): Define.
* iconvdata/iso_6937-2.c (ONE_DIRECTION): Define.
* iconvdata/iso_6937.c (ONE_DIRECTION): Define.
* iconvdata/johab.c (ONE_DIRECTION): Define.
* iconvdata/shift_jisx0213.c (ONE_DIRECTION): Define.
* iconvdata/sjis.c (ONE_DIRECTION): Define.
* iconvdata/t.61.c (ONE_DIRECTION): Define.
* iconvdata/tcvn5712-1.c (ONE_DIRECTION): Define.
* iconvdata/tscii.c (ONE_DIRECTION): Define.
* iconvdata/uhc.c (ONE_DIRECTION): Define.
* iconvdata/unicode.c (ONE_DIRECTION): Define.
* iconvdata/utf-16.c (ONE_DIRECTION): Define.
* iconvdata/utf-32.c (ONE_DIRECTION): Define.
* iconvdata/utf-7.c (ONE_DIRECTION): Define.

10 years agoNEWS: Add 16885 to fixed bug list.
David S. Miller [Thu, 1 May 2014 20:35:59 +0000 (16:35 -0400)]
NEWS: Add 16885 to fixed bug list.

10 years agoFix -Wundef warnings for _IO_JUMPS_OFFSET.
Roland McGrath [Thu, 1 May 2014 20:33:13 +0000 (13:33 -0700)]
Fix -Wundef warnings for _IO_JUMPS_OFFSET.

10 years agoDeconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h.
Roland McGrath [Thu, 1 May 2014 20:08:30 +0000 (13:08 -0700)]
Deconditionalize use of LLL_LOCK_INITIALIZER in bits/libc-lock.h.

10 years agoFix implicit declaration
Andreas Schwab [Thu, 1 May 2014 20:00:34 +0000 (22:00 +0200)]
Fix implicit declaration

10 years agoFix v9/64-bit strcmp when string ends in multiple zero bytes.
David S. Miller [Wed, 30 Apr 2014 19:57:51 +0000 (12:57 -0700)]
Fix v9/64-bit strcmp when string ends in multiple zero bytes.

[BZ #16885]
* sysdeps/sparc/sparc64/strcmp.S: Fix end comparison handling when
multiple zero bytes exist at the end of a string.
Reported by Aurelien Jarno <aurelien@aurel32.net>

* string/test-strcmp.c (check): Add explicit test for situations where
there are multiple zero bytes after the first.

10 years agoCorrectly handle %p in wprintf (BZ #16890)
Andreas Schwab [Thu, 1 May 2014 13:50:27 +0000 (15:50 +0200)]
Correctly handle %p in wprintf (BZ #16890)

10 years ago2014-05-01 Steve Ellcey <sellcey@mips.com>
Steve Ellcey [Thu, 1 May 2014 17:22:35 +0000 (10:22 -0700)]
2014-05-01  Steve Ellcey  <sellcey@mips.com>

* intl/iconv/skeleton.c (ONE_DIRECTION): Remove define.
* iconv/gconv_simple.c (ONE_DIRECTION): Define.
* iconvdata/8bit-gap.c (ONE_DIRECTION): Ditto.
* iconvdata/8bit-generic.c (ONE_DIRECTION): Ditto.

10 years ago2014-05-01 Steve Ellcey <sellcey@mips.com>
Steve Ellcey [Thu, 1 May 2014 17:09:04 +0000 (10:09 -0700)]
2014-05-01  Steve Ellcey  <sellcey@mips.com>

* stdlib/longlong.h: Updated from GCC.

10 years agoNEWS: Add 15119 to fixed bug list
Will Newton [Thu, 1 May 2014 15:26:35 +0000 (16:26 +0100)]
NEWS: Add 15119 to fixed bug list