Siddhesh Poyarekar [Wed, 2 Jul 2014 20:06:10 +0000 (01:36 +0530)]
Sync up loadmsgcat.c with gettext
Siddhesh Poyarekar [Wed, 2 Jul 2014 20:02:17 +0000 (01:32 +0530)]
Fix Wundef warning for __STDC_VERSION__
c4c4124473c187b5c4642611390897666c3d3970 added the _Noreturn macro for
pre-C11 compilers, but it now throws a new Wundef warning during `make
check` for __STDC_VERSION__ which gcc does not define by default. The
following patch fixes this in line with other uses of __STDC_VERSION__
in the file.
Siddhesh Poyarekar [Wed, 2 Jul 2014 20:00:02 +0000 (01:30 +0530)]
Don't use __glibc_unlikely in shared code
Siddhesh Poyarekar [Wed, 2 Jul 2014 19:58:45 +0000 (01:28 +0530)]
Fix -Wundef warning on PAGE_COPY_THRESHOLD
The PAGE_COPY_THRESHOLD macro is meant to be overridden by
architecture-specific pagecopy.h, but it is currently done only by
mach; all other architectures use the default. Check to see if the
macro is defined in addition to whether it is set to a non-zero value.
Vidya Ranganathan [Thu, 12 Jun 2014 03:21:20 +0000 (22:21 -0500)]
PowerPC: strcat optimization for PPC64/POWER7
This patch adds an ifunc power7 strcat symbol that uses the logic on
sysdeps/powerpc/strcat.c but call power7 strlen/strcpy symbols instead
of default ones.
Roland McGrath [Wed, 2 Jul 2014 18:10:08 +0000 (11:10 -0700)]
Add missing #include for MIN use in dl-sysdep.c.
Siddhesh Poyarekar [Wed, 2 Jul 2014 11:27:48 +0000 (16:57 +0530)]
Fix typo and formatting in loadmsgcat.c
This reduces the differences with gettext version of loadmsgcat.c
Siddhesh Poyarekar [Wed, 2 Jul 2014 09:39:39 +0000 (15:09 +0530)]
Fix typo in macro name
It is _POSIX_SIGNALS and not _POSUX_SIGNALS
Will Newton [Mon, 23 Jun 2014 15:53:30 +0000 (16:53 +0100)]
malloc/obstack: Merge from gnulib
Merge the latest version of the obstack.c and obstack.h files
from gnulib. The majority of this change is coding style and
cosmetic comment changes but it also fixes a -Wundef warning
in the build as a side effect.
2014-07-02 Will Newton <will.newton@linaro.org>
* malloc/obstack.c: Merge from gnulib master.
[HAVE_CONFIG_H]: Remove conditional code.
[!_LIBC]: Include config.h.
[!ELIDE_CODE]: Don't include inttypes.h, include
stdint.h unconditionally.
(print_and_abort): Mark as _Noreturn.
(_obstack_allocated_p): Mark as __attribute_pure__.
(obstack_free): Rename to __obstack_free.
[!__attribute__]: Remove conditional code.
* malloc/obstack.h: Merge from gnulib master.
[__cplusplus]: Move conditional down.
[!__attribute_pure__]: Define __attribute_pure__ here
if it is not already defined.
(_obstack_memory_used): Mark as __attribute_pure__.
[!__obstack_free]: Define as obstack_free.
[__GNUC__]: Remove check for ancient NeXT gcc.
Paul Eggert [Fri, 28 Mar 2014 18:59:41 +0000 (11:59 -0700)]
misc/sys/cdefs.h: Add _Noreturn macro for pre-C11 compilers
2014-07-02 Will Newton <will.newton@linaro.org>
Paul Eggert <eggert@cs.ucla.edu>
* misc/sys/cdefs.h (_Noreturn): New macro, for pre-C11 compilers.
Siddhesh Poyarekar [Wed, 2 Jul 2014 07:55:55 +0000 (13:25 +0530)]
Add comment to gethnamaddr.c to warn that the file is unmaintained
Carlos O'Donell [Wed, 2 Jul 2014 07:11:53 +0000 (03:11 -0400)]
hppa: Remove GLIBC_2.3 from librt.abilist.
This commit removes the aio_cancel and aio_cancel64 symbols at
GLIBC_2.3 from the ABI baseline. The ABI baseline is now complete
for hppa and considered stable.
Carlos O'Donell [Wed, 2 Jul 2014 03:52:09 +0000 (23:52 -0400)]
hppa: Add ABI baselines.
The following ABI baselines were tested against several old releases
of debian and gentoo. Several problems were discovered and fixed as
part of developing the ABI baselines.
Firstly, libBrokenLocale on gentoo exports __ctype_get_mb_cur_max
as @@GLIBC_2.0, but it should be @@GLIBC_2.2 since that's the minimum
version defined in shlib-versions for hppa. I don't know when this
broke, but master properly parses hppa's shlib-versions which clearly
lists libBrokenLocale as defaulting to GLIBC_2.2. Therefore I'm
accepting GLBIC_2.2 as the correct version for this symbol and setting
the baseline to that, despite the fact that the present distribution
is wrong. I don't expect that any new applications should be using
libBrokenLocale, so it should match the oldest behaviour which is to
export a GLIBC_2.2 symbol. For example in debian's 2.7 has it at
version GLIBC_2.2.
Secondly, aio_cancel and aio_cancel64 previously had a compat symbol
at version @GLIBC_2.1 with a new symbol at @@GLIBC_2.3[1]. During the
Linuxthreads to NPTL transition the file aio_cancel.c was lost for hppa
and that resulted in just @@GLIBC_2.1 versions of these symbols being
exported. The @@GLIBC_2.1 version works correctly and uses the right
value of ECANCELLED. Therefore if I were to fix this today it might
break correctly working applications using aio_cancel*@GLIBC_2.1 by
causing those to use the old aio_cancel that used the older value
of ECANCELLED. Thus the best option is to accept that the ABI changed
and ignore older applications in favour of newer applications. The
best thing to do is cleanup the version files (included in the patch).
The rest of the ABI was as expected (ignoring __p_type_syms size
change in 2008).
Roland McGrath [Tue, 1 Jul 2014 22:01:24 +0000 (15:01 -0700)]
Add missing #include for MIN/MAX users.
Richard Henderson [Tue, 1 Jul 2014 15:27:49 +0000 (08:27 -0700)]
alpha: Fix isnan
The isunordered formulation raises SIGFPE for SNaN.
Richard Henderson [Tue, 1 Jul 2014 15:15:32 +0000 (08:15 -0700)]
alpha: Update libm-test-ulps
Stefan Liebler [Tue, 1 Jul 2014 14:04:58 +0000 (11:04 -0300)]
S/390: Regenerate ULPs
Siddhesh Poyarekar [Tue, 1 Jul 2014 08:44:09 +0000 (14:14 +0530)]
Remove MULTI_PTRS_ARE_ALIASES in dns-hosts.c
The code in gethnamaddr.c for gethostbyaddr used and set this macro to
allow multiple PTR records to be added as aliases. This was useful
for gethostbyaddr since it returns a hostent structure, which can
return aliases.
The gethnamaddr.c source however is unused in glibc since pretty much
forever. Instead, the DNS lookup bits for gethostbyaddr (as well as
getnameinfo) are implemented in dns-hosts.c and in that implementation
all but one (the first one) of the multiple PTR records are ignored.
Since gethnamaddr.c is essentially dead code, ignore that
implementation and replace the MULTI_PTRS_ARE_ALIASES bit with a
comment mentioning that bind adds PTR records as aliases while we
don't.
Joseph Myers [Tue, 1 Jul 2014 01:57:46 +0000 (11:57 +1000)]
MicroBlaze: Update kernel-features.h for syscalls added in 3.15
Now that the MicroBlaze 3.15 kernel has the pselect6, preadv and
pwritev syscalls, this patch updates kernel-features.h so they are
assumed to be present for 3.15 and later kernels.
2014-06-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
[__LINUX_KERNEL_VERSION >= 0x030f00] (__ASSUME_PSELECT): Do not
undefine.
[__LINUX_KERNEL_VERSION >= 0x030f00] (__ASSUME_PREADV): Likewise.
[__LINUX_KERNEL_VERSION >= 0x030f00] (__ASSUME_PWRITEV): Likewise.
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Roland McGrath [Wed, 25 Jun 2014 21:40:40 +0000 (14:40 -0700)]
MicroBlaze: Consolidate nptl/ subdirectories under linux/...
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Roland McGrath [Wed, 25 Jun 2014 21:33:52 +0000 (14:33 -0700)]
MicroBlaze: Consolidate NPTL/non versions of vfork
Roland McGrath [Wed, 25 Jun 2014 18:18:27 +0000 (11:18 -0700)]
MicroBlaze: Move NPTL public headers to sysdeps/microblaze/nptl/.
Roland McGrath [Sat, 21 Jun 2014 00:34:56 +0000 (17:34 -0700)]
MicroBlaze: Define TLS_DEFINE_INIT_TP
Roland McGrath [Wed, 25 Jun 2014 18:17:28 +0000 (11:17 -0700)]
MicroBlaze: Convert fork.c to arch-fork.h
David Holsgrove [Mon, 30 Jun 2014 04:01:22 +0000 (14:01 +1000)]
MicroBlaze: Add missing sysdep-cancel.h implementation
And update socket.S, Makefile to use *_nocancel definitions.
Absence of sysdep-cancel.h was not apparent until Roland's
not-cancel.h unification.
2014-06-30 David Holsgrove <david.holsgrove@xilinx.com>
* sysdeps/unix/sysv/linux/microblaze/sysdep-cancel.h: New file
* sysdeps/unix/sysv/linux/microblaze/socket.S: Update SINGLE_THREAD_P
* sysdeps/unix/sysv/linux/microblaze/Makefile: Add to libpthread-routines
Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Adhemerval Zanella [Mon, 30 Jun 2014 21:38:43 +0000 (17:38 -0400)]
Update powerpc-fpu ULPs.
Joseph Myers [Mon, 30 Jun 2014 21:34:20 +0000 (21:34 +0000)]
Regenerate MIPS libm-test-ulps.
This patch regenerates libm-test-ulps for MIPS.
* sysdeps/mips/mips32/libm-test-ulps: Regenerated.
* sysdeps/mips/mips64/libm-test-ulps: Likewise.
Joseph Myers [Mon, 30 Jun 2014 21:26:49 +0000 (21:26 +0000)]
Regenerate powerpc-nofpu libm-test-ulps.
This patch regenerates libm-test-ulps for powerpc-nofpu.
* sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated.
Joseph Myers [Mon, 30 Jun 2014 21:20:35 +0000 (21:20 +0000)]
Regenerate ARM libm-test-ulps.
This patch regenerates libm-test-ulps for ARM. As before it may be
useful for someone building for a configuration with VFMA enabled to
do a followup regeneration for any additional ulps in that
configuration.
Committed.
* sysdeps/arm/libm-test-ulps: Regenerated.
Maciej W. Rozycki [Mon, 30 Jun 2014 19:05:34 +0000 (20:05 +0100)]
test-skeleton: Kill any child process's offspring
This makes sure any subprocesses created by the program being tested get
killed as well if their parent times out. Otherwise if they are really
stuck, they may remain there running forever after the test case and
then the whole test suite has completed, until killed by hand.
* test-skeleton.c (signal_handler): Kill the whole process group
before killing the child individually.
(main): Report any failure on `setpgid'.
Roland McGrath [Mon, 30 Jun 2014 18:19:22 +0000 (11:19 -0700)]
ARM: Split Linuxism out of sysdeps/arm/nptl/tls.h
Joseph Myers [Mon, 30 Jun 2014 17:38:16 +0000 (17:38 +0000)]
Fix ldbl-128 expm1l spurious underflow (bug 16539).
This patch fixes spurious underflows from ldbl-128 expm1l, as reported
in <https://sourceware.org/ml/libc-alpha/2014-06/msg00835.html> and
exposed by the tests added for such a bug in the x86 / x86-64
version. The bug and fix are essentially the same, so no separate bug
is filed in Bugzilla.
Tested for mips64.
[BZ #16539]
* sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <float.h>.
(__expm1l): Return argument unchanged when small but not
subnormal.
Joseph Myers [Mon, 30 Jun 2014 17:37:10 +0000 (17:37 +0000)]
Rename soft-fp op-[1248].h variables to avoid risk of shadowing.
Continuing the soft-fp variable renaming from
<https://sourceware.org/ml/libc-alpha/2014-06/msg00434.html> to avoid
shadowing if two macros happen to use the same variable name and that
variable is involved in an argument one of those macros passes to
another, this patch renames variables in op-[1248].h. (The two
patches are to different files and are independent of each other.)
Tested for powerpc32 (soft-float) and mips64 that this makes no change
to the disassembly of installed shared libraries.
* soft-fp/op-1.h (_FP_UNPACK_RAW_1): Rename local variables to
include macro name.
(_FP_UNPACK_RAW_1_P): Likewise.
(_FP_PACK_RAW_1): Likewise.
(_FP_PACK_RAW_1_P): Likewise.
(_FP_MUL_MEAT_1_wide): Likewise.
(_FP_MUL_MEAT_DW_1_hard): Likewise.
(_FP_MUL_MEAT_1_hard): Likewise.
(_FP_DIV_MEAT_1_imm): Likewise.
(_FP_DIV_MEAT_1_udiv_norm): Likewise.
(_FP_DIV_MEAT_1_udiv): Likewise.
* soft-fp/op-2.h (__FP_FRAC_DEC_2): Likewise.
(_FP_UNPACK_RAW_2): Likewise.
(_FP_UNPACK_RAW_2_P): Likewise.
(_FP_PACK_RAW_2): Likewise.
(_FP_PACK_RAW_2_P): Likewise.
(_FP_MUL_MEAT_DW_2_wide): Likewise.
(_FP_MUL_MEAT_2_wide): Likewise.
(_FP_MUL_MEAT_DW_2_wide_3mul): Likewise.
(_FP_MUL_MEAT_2_wide_3mul): Likewise.
(_FP_MUL_MEAT_DW_2_gmp): Likewise.
(_FP_MUL_MEAT_2_gmp): Likewise.
(_FP_DIV_MEAT_2_udiv): Likewise.
* soft-fp/op-4.h (_FP_FRAC_SLL_4): Likewise.
(_FP_FRAC_SRL_4): Likewise.
(_FP_FRAC_SRST_4): Likewise.
(_FP_FRAC_SRS_4): Likewise.
(_FP_UNPACK_RAW_4): Likewise.
(_FP_UNPACK_RAW_4_P): Likewise.
(_FP_PACK_RAW_4): Likewise.
(_FP_PACK_RAW_4_P): Likewise.
(_FP_MUL_MEAT_DW_4_wide): Likewise.
(_FP_MUL_MEAT_4_wide): Likewise.
(_FP_MUL_MEAT_4_gmp): Likewise.
(umul_ppppmnnn): Likewise.
(_FP_DIV_MEAT_4_udiv): Likewise.
(__FP_FRAC_ADD_4): Likewise.
(__FP_FRAC_SUB_3): Likewise.
(__FP_FRAC_SUB_4): Likewise.
(__FP_FRAC_DEC_3): Likewise.
(__FP_FRAC_DEC_4): Likewise.
(__FP_FRAC_ADDI_4): Likewise.
* soft-fp/op-8.h (_FP_FRAC_SLL_8): Likewise.
(_FP_FRAC_SRL_8): Likewise.
(_FP_FRAC_SRS_8): Likewise.
Joseph Myers [Mon, 30 Jun 2014 17:36:18 +0000 (17:36 +0000)]
Rename soft-fp extended.h, op-common.h variables to avoid risk of shadowing.
In <https://sourceware.org/ml/libc-alpha/2013-06/msg00851.html>, I
fixed a bug caused by multiple soft-fp macros using the same variable
names, resulting in shadowing when one macro called another that used
the same variable name, with an argument involving the variable in the
outer macro. The fix was to rename the local variables so their names
included the containing macro name, to ensure uniqueness.
I noted then that this would make sense more systematically for all
variables in any soft-fp macro. Since then, I've used such variable
names in new soft-fp macros. This patch now converts existing macros
in extended.h and op-common.h to use this convention. (op-[1248].h
are intended to be converted separately.)
(Name conflicts could arise for label names as well, but because those
are function-scope in C any such conflict will give an immediate
compile error rather than a subtle bug, so there's no need for
preemptive renaming in that case.)
Tested for powerpc32 (soft-float) and mips64 that this makes no change
to the disassembly of installed shared libraries.
* soft-fp/extended.h (FP_UNPACK_RAW_E): Rename local variables to
include macro name.
(FP_UNPACK_RAW_EP): Likewise.
(FP_PACK_RAW_E): Likewise.
(FP_PACK_RAW_EP): Likewise.
* soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Likewise.
(_FP_ISSIGNAN): Likewise.
(_FP_ADD_INTERNAL): Likewise.
(_FP_FMA): Likewise.
(_FP_CMP): Likewise.
(_FP_SQRT): Likewise.
(_FP_TO_INT): Likewise.
(_FP_FROM_INT): Likewise.
(FP_EXTEND): Likewise.
(_FP_DIV_MEAT_N_loop): Likewise.
Maciej W. Rozycki [Mon, 30 Jun 2014 09:38:49 +0000 (10:38 +0100)]
sysdeps/unix/sysv/linux/bits/socket.h: Correct formatting
* sysdeps/unix/sysv/linux/bits/socket.h: Adjust macro formatting
throughout.
Joseph Myers [Sun, 29 Jun 2014 11:49:08 +0000 (11:49 +0000)]
Fix ldbl-128 powl sign of result in overflow / underflow cases (bug 17097).
This patch fixes bug 17097, ldbl-128 powl producing overflowing /
underflowing results with positive sign when the result should have
been negative. This was shown up by the tests in non-default rounding
modes added by my patch for bug 16315, but isn't actually limited to
non-default rounding modes: rather, when rounding to nearest the
wrappers produced a result with the correct sign and so always hid the
bug unless -lieee was used to disable the wrappers. The problem is
that in the cases where Y is large enough that the result overflows or
underflows for X not very close to 1, but not large enough to overflow
or underflow for all X != +/- 1 (in the latter case Y is always an
even integer), a positive overflowing / underflowing result is always
returned, rather than one with the correct sign. This patch moves the
relevant part of computation of the sign earlier and returns a result
of the correct sign.
Tested for mips64.
[BZ #17097]
* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Return
result with correct sign in case of exponents that produce
overflow except for X very close to 1.
Paul Eggert [Sat, 28 Jun 2014 00:45:54 +0000 (06:15 +0530)]
Sync up mktime with gnulib
From the gnulib commit log:
commit
e2646b0c6b5acda25e9ffeb4c12a5513a1e3b5ac
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri Jun 27 11:35:44 2014 -0700
mktime: merge #if/#ifdef usage from glibc
* lib/mktime.c: Use "#if defined DEBUG && DEBUG", not "#if DEBUG",
as that works with both Glibc's and Gnulib's style.
See thread starting at Siddhesh Poyarekar's bug report at:
http://lists.gnu.org/archive/html/bug-gnulib/2014-06/msg00102.html
Siddhesh Poyarekar [Sat, 28 Jun 2014 00:35:24 +0000 (06:05 +0530)]
Fix Wundef warning for MEMCPY_OK_FOR_FWD_MEMMOVE
Define MEMCPY_OK_FOR_FWD_MEMMOVE in memcopy.h and let arch-specific
implementations of that file override the value if necessary. This
override is only useful for tile and moving this macro to memcopy.h
allows us to remove the tile-specific memmove.c.
Joseph Myers [Fri, 27 Jun 2014 20:24:23 +0000 (20:24 +0000)]
Remove shlib-versions ABI names support.
shlib-versions files can contain ABI lines that map triplets to a
canonical ABI name. This name was once used for various purposes
where test baseline files for different ABIs went in a single
directory; now these purposes use sysdeps files, generation of headers
which have per-ABI variants uses abi-variants and related Makefile
variables and the shlib-versions ABI names are unused. This patch
duly removes those lines and associated build system support for them.
Tested for x86_64 (both a full testsuite run and confirming the
installed shared libraries are unchanged by the patch).
* Makeconfig ($(common-objpfx)soversions.mk): Do not generate
abi-name definition.
* scripts/soversions.awk: Do not handle or generate ABI lines.
* shlib-versions: Remove ABI entries.
* sysdeps/powerpc/nofpu/shlib-versions: Remove file.
* sysdeps/x86_64/x32/shlib-versions: Remove ABI entry.
Roland McGrath [Fri, 27 Jun 2014 18:41:04 +0000 (11:41 -0700)]
MIPS: Consolidate nptl/ subdirectories under linux/...
Roland McGrath [Fri, 27 Jun 2014 16:58:51 +0000 (09:58 -0700)]
MIPS: Consolidate NPTL/non versions of vfork
Arjun Shankar [Fri, 27 Jun 2014 18:01:47 +0000 (23:31 +0530)]
Correctly report nscd child process status (BZ #17092)
The nscd parent process returns the result of a `wait' call rather
than the exit status of the child it waits for. These two aren't
exactly the same. In my case (and probably on most machines), the exit
status is in the 2nd LSB of the result of `wait', and so:
e.g. if the nscd child process returns 1, the parent returns 1 << 8,
which Bash happily reports as 0.
Joseph Myers [Fri, 27 Jun 2014 16:51:22 +0000 (16:51 +0000)]
Remove relro configure test.
This patch removes the configure test for working -z relro.
The use of -z relro in Makeconfig became unconditional with
commit
2e6ab1df44c412bb9d30b26a4d8a679150a7e375
Author: Ulrich Drepper <drepper@redhat.com>
Date: Sat Oct 28 06:44:04 2006 +0000
Remove conditional code which now is unnecessary.
(commit reference from git://repo.or.cz/glibc/history), so since then
the configure test has not controlled anything about how glibc is
built - simply about whether configure succeeds and allows a build to
be attempted. The test for whether the option did something useful
(as opposed to whether it exists - which we can certainly just assume
by now) was originally added in
<https://sourceware.org/ml/libc-hacker/2004-09/msg00069.html> to
disable the option in a case when it did nothing useful on ia64 (as a
result of something deliberate in the linker on ia64). Since 2006
that disabling has been of no effect, and given that the current test
does not set libc_relro_required for ia64, it does nothing whatever
useful for the original motivating case. Also at around the same time
in 2006 the test was made to give an error for missing or broken -z
relro support on various architectures.
So effectively all the test does now is verify that, on certain
architectures, the linker has not been changed deliberately to make
the option ineffective. I see no apparent reason why such a change
should be expected, or why the build should be stopped if it were to
be made (any more than we disallow build on ia64); I think we can
trust binutils patch review to point out the consequences of any
change to COMMONPAGESIZE setting. The only thing that might now make
sense would be disabling the -z relro use on an architecture-specific
basis if there were an architecture-specific reason to consider that
to make sense; it would be for the ia64 maintainer to decide if that
makes sense for ia64 at present, but I think that could be done
through sysdeps Makefiles - no special configure tests needed.
Tested for x86_64 that this patch makes no change to the installed
shared libraries.
Together with
<https://sourceware.org/ml/libc-alpha/2014-06/msg00788.html> (pending
review) this substantially eliminates architecture-specific cases from
architecture-independent configure.ac files. There remains an i386
case in sysdeps/mach/hurd/configure.ac that should properly move to
the i386 subdirectory. (There are also OS-specific cases outside
OS-specific directories; in principle I think should should also
move.)
* configure.ac (libc_commonpagesize): Remove variable.
(libc_relro_required): Likewise.
(libc_cv_z_relro): Remove configure test.
* configure: Regenerated.
* sysdeps/aarch64/preconfigure (libc_commonpagesize): Do not set
variable.
(libc_relro_required): Likewise.
* sysdeps/alpha/preconfigure (libc_commonpagesize): Likewise.
(libc_relro_required): Likewise.
* sysdeps/arm/preconfigure.ac (libc_commonpagesize): Likewise.
(libc_relro_required): Likewise.
* sysdeps/arm/preconfigure: Regenerated.
* sysdeps/ia64/preconfigure: Remove file.
* sysdeps/tile/preconfigure (libc_commonpagesize): Do not set
variable.
(libc_relro_required): Likewise.
Joseph Myers [Fri, 27 Jun 2014 14:52:13 +0000 (14:52 +0000)]
Fix yn overflow handling in non-default rounding modes (bug 16561, bug 16562).
This patch fixes bugs 16561 and 16562, bad results of yn in overflow
cases in non-default rounding modes, both because an intermediate
overflow in the recurrence does not get detected if the result is not
an infinity and because an overflowing result may occur in the wrong
sign. The fix is to set FE_TONEAREST mode internally for the parts of
the function where such overflows can occur (which includes the call
to y1 - where yn is used to compute a Bessel function of order -1,
negating the result of y1 isn't correct for overflowing results in
directed rounding modes) and then compute an overflowing value in the
original rounding mode if the to-nearest result was an infinity.
Tested x86_64 and x86 and ulps updated accordingly. Also tested for
mips64 and powerpc32 to test the ldbl-128 and ldbl-128ibm changes.
(The tests for these bugs were added in my previous y1 patch, so the
only thing this patch has to do with the testsuite is enable yn
testing in all rounding modes.)
[BZ #16561]
[BZ #16562]
* sysdeps/ieee754/dbl-64/e_jn.c: Include <float.h>.
(__ieee754_yn): Set FE_TONEAREST mode internally and then
recompute overflowing results in original rounding mode.
* sysdeps/ieee754/flt-32/e_jnf.c: Include <float.h>.
(__ieee754_ynf): Set FE_TONEAREST mode internally and then
recompute overflowing results in original rounding mode.
* sysdeps/ieee754/ldbl-128/e_jnl.c: Include <float.h>.
(__ieee754_ynl): Set FE_TONEAREST mode internally and then
recompute overflowing results in original rounding mode.
* sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Include <float.h>.
(__ieee754_ynl): Set FE_TONEAREST mode internally and then
recompute overflowing results in original rounding mode.
* sysdeps/ieee754/ldbl-96/e_jnl.c: Include <float.h>.
(__ieee754_ynl): Set FE_TONEAREST mode internally and then
recompute overflowing results in original rounding mode.
* sysdeps/i386/fpu/fenv_private.h [!__SSE2_MATH__]
(libc_feholdsetround_ctx): New macro.
* math/libm-test.inc (yn_test): Use ALL_RM_TEST.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps : Likewise.
Joseph Myers [Thu, 26 Jun 2014 23:55:46 +0000 (23:55 +0000)]
Fix MIPS64 *_nocancel gp setup.
The 64-bit MIPS ABIs involve the caller setting up t9 ($25) to the
address of the called function, and the called function then using
this in a .cpsetup directive to compute gp. The .cpsetup directive
needs to name the function to which t9 points for this purpose. In
the definition of *_nocancel functions, the directive pointed to the
normal entry point rather than the _nocancel one, resulting in
segfaults when the _nocancel functions were used. This patch corrects
the function name used in the directive. (It seems the bug was latent
until Roland's not-cancel.h unification, with the _nocancel entry
points not previously being used - so not user-visible in a release,
so no Bugzilla entry required.)
Tested mips64 sufficiently to confirm the previously seen segfaults
are fixed.
* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h
[__PIC__] (PSEUDO): Use name of _nocancel entry point in
corresponding .cpsetup call.
Roland McGrath [Thu, 26 Jun 2014 22:08:29 +0000 (15:08 -0700)]
ARM: Move more aeabi routine magic out of Linux-specific directories
Joseph Myers [Thu, 26 Jun 2014 21:30:07 +0000 (21:30 +0000)]
Update scripts/list-sources.sh for ports repository merge.
scripts/list-sources.sh includes handling of ports that has been
obsolete ever since the ports repository was merged into the libc
repository. This patch removes that handling.
Tested by regenerating libc.pot and examining the resulting changes.
* scripts/list-sources.sh: Do not handle ports specially.
Roland McGrath [Thu, 26 Jun 2014 20:35:31 +0000 (13:35 -0700)]
Add missing #include <fpu_control.h> to ARM fesetenv/feupdateenv.
Roland McGrath [Thu, 26 Jun 2014 20:21:58 +0000 (13:21 -0700)]
Add missing #include in spawn_faction_addopen.c
Joseph Myers [Thu, 26 Jun 2014 20:13:44 +0000 (20:13 +0000)]
Update miscellaneous files from upstream sources.
This patch updates miscellaneous files from their upstream sources:
texinfo.tex from Texinfo, config.guess and config.sub from config.git,
install-sh from automake and move-if-change from gnulib.
Tested x86_64 that installed shared libraries are unchanged by the
patch; also looked at the generated libc.pdf manual.
* manual/texinfo.tex: Update to version 2014-05-05.10 with
trailing whitespace removed.
* scripts/config.guess: Update to version 2014-03-23.
* scripts/config.sub: Update to version 2014-05-01
* scripts/install-sh: Update to version 2013-12-25.23.
* scripts/move-if-change: Update from gnulib.
Siddhesh Poyarekar [Thu, 26 Jun 2014 18:37:20 +0000 (00:07 +0530)]
Correctly attribute the mktime.c change to Paul Eggert
I mentioned it on the list, but forgot to put that in the changelog.
Siddhesh Poyarekar [Thu, 26 Jun 2014 18:31:37 +0000 (00:01 +0530)]
Remove unnecessary include in memmove_chk
This also has the side-effect of fixing a couple of Wundef warnings
raised from pagecopy.h. The generated code is identical before and
after this patch.
Siddhesh Poyarekar [Thu, 26 Jun 2014 18:30:06 +0000 (00:00 +0530)]
Remove inline keyword from leapyear function
This syncs up the code with gnulib.
Joseph Myers [Thu, 26 Jun 2014 17:34:27 +0000 (17:34 +0000)]
Remove powerpc special cases in configure.ac.
This patch removes two powerpc special cases in the main configure.ac.
The test for rs6000 is irrelevant to currently supported
configurations (config.guess reports rs6000 for some OSes, of which
the only one currently supported by GCC is AIX, but not for Linux).
There's no need either for a special case for powerpc*-*soft;
--without-fp suffices, and GCC doesn't have any special handling of
such a triplet.
Not tested.
* configure.ac: Do not test for machine being rs6000. Do not test
for powerpc*-*soft.
* configure: Regenerated.
Joseph Myers [Thu, 26 Jun 2014 17:33:32 +0000 (17:33 +0000)]
Remove configure tests for assembler CFI support.
This patch removes configure tests for assembler CFI support (and
thereby eliminates an architecture-specific case in the main
configure.ac), instead assuming that support is present
unconditionally.
The main test was added in 2003 around the time CFI support was added
to the assembler. cfi_personality and cfi_lsda support were added to
the assembler in 2006. cfi_sections support was added in 2009, a few
weeks before binutils 2.20 was released; it's in 2.20, the minimum
supported version, so even that configure test is obsolete.
Tested x86_64 that the installed shared libraries are unchanged by
this patch.
* configure.ac (libc_cv_asm_cfi_directives): Remove configure
test.
* configure: Regenerated.
* config.h.in (HAVE_ASM_CFI_DIRECTIVES): Remove macro undefine.
* sysdeps/arm/configure.ac (libc_cv_asm_cfi_directive_sections):
Remove configure test.
* sysdeps/arm/configure: Regenerated.
* sysdeps/nptl/configure.ac: Do not check
libc_cv_asm_cfi_directives.
* sysdeps/nptl/configure: Regenerated.
* sysdeps/x86_64/nptl/configure.ac: Remove file.
* sysdeps/x86_64/nptl/configure: Remove generated file.
* b/sysdeps/generic/sysdep.h [HAVE_ASM_CFI_DIRECTIVES]: Make code
unconditional.
[!HAVE_ASM_CFI_DIRECTIVES]: Remove conditional code.
Siddhesh Poyarekar [Thu, 26 Jun 2014 15:10:46 +0000 (20:40 +0530)]
Fix Wundef warning for WIDE_CHAR_VERSION
fnmatch.c defines WIDE_CHAR_VERSION as 1 for wide chars, but does not
define it for the non-wide char bits. Define it and also undef it in
fnmatch_loop.c like all other macros.
Siddhesh Poyarekar [Thu, 26 Jun 2014 09:47:40 +0000 (15:17 +0530)]
Fix Wundef warning for ELF_MACHINE_NO_RELA
This patch defines ELF_MACHINE_NO_RELA on all architectures. Tested
only on x86_64 to verify that the sources before and after are
identical except for two instructions that pass the current line
number in dl-machine.h to assert_fail.
Siddhesh Poyarekar [Thu, 26 Jun 2014 08:40:07 +0000 (14:10 +0530)]
Fix Wundef warning for SEPARATE_KEY
The SEPARATE_KEY macro is never defined in any condition or
architecture. It is effectively dead code, so remove it.
Roland McGrath [Thu, 26 Jun 2014 16:34:34 +0000 (09:34 -0700)]
S390: Consolidate nptl/ subdirectories under linux/...
Roland McGrath [Thu, 26 Jun 2014 16:31:11 +0000 (09:31 -0700)]
Move remaining S390 code out of nptl/.
Roland McGrath [Thu, 26 Jun 2014 16:30:52 +0000 (09:30 -0700)]
S390: Consolidate NPTL/non versions of vfork
Roland McGrath [Thu, 26 Jun 2014 16:30:33 +0000 (09:30 -0700)]
S390: Consolidate NPTL/non versions of clone
Roland McGrath [Thu, 26 Jun 2014 16:29:24 +0000 (09:29 -0700)]
AArch64: Consolidate nptl/ subdirectories under linux/...
Roland McGrath [Wed, 25 Jun 2014 21:50:58 +0000 (14:50 -0700)]
MIPS: Consolidate NPTL/non versions of clone
Joseph Myers [Wed, 25 Jun 2014 20:29:45 +0000 (20:29 +0000)]
Remove __ASSUME_O_CLOEXEC / O_CLOEXEC conditionals in sysdeps/unix/sysv/linux/.
This patch removes conditionals on __ASSUME_O_CLOEXEC, and on
O_CLOEXEC being defined, in sysdeps/unix/sysv/linux/, now that
O_CLOEXEC support can be unconditionally assumed.
The patch is conservative in what it changes and further followup
cleanups may be possible. It may be possible to remove dl-opendir.c,
but the patch does not do so, just removing a redundant undefine and
redefine of __ASSUME_O_CLOEXEC. Also, __ASSUME_O_CLOEXEC is defined
unconditionally for Hurd as well as Linux. Thus, if we decide that
O_CLOEXEC support is a required feature of any glibc port, we could
remove __ASSUME_O_CLOEXEC and all conditionals on it throughout glibc,
rather than just cleaning up sysdeps/unix/sysv/linux/.
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by this patch.
* sysdeps/unix/sysv/linux/dl-opendir.c (__ASSUME_O_CLOEXEC): Do
not undefine and redefine.
* sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs)
[O_CLOEXEC]: Make code unconditional.
(__get_nprocs) [!O_CLOEXEC]: Remove conditional code.
* sysdeps/unix/sysv/linux/shm_open.c: Do not include
<kernel-features.h>.
[O_CLOEXEC && !__ASSUME_O_CLOEXEC] (have_o_cloexec): Remove
conditional variable definition.
(shm_open) [O_CLOEXEC]: Make code unconditional.
(shm_open) [!O_CLOEXEC || !__ASSUME_O_CLOEXEC]: Remove conditional
code.
Joseph Myers [Wed, 25 Jun 2014 20:26:14 +0000 (20:26 +0000)]
Move USE_REGPARMS define to sysdeps/i386/configure.ac.
This patch moves the USE_REGPARMS define from the toplevel
configure.ac to sysdeps/i386/configure.ac.
Tested x86 that the disassembly of installed shared libraries is
unchanged by this patch.
* configure.ac (USE_REGPARMS): Don't define here.
* configure: Regenerated.
* sysdeps/i386/configure.ac (USE_REGPARMS): Define here.
* sysdeps/i386/configure: Regenerated.
Joseph Myers [Wed, 25 Jun 2014 18:09:01 +0000 (18:09 +0000)]
Remove stray includes of kernel-features.h.
Now that files using __ASSUME_* macros have been made by
<https://sourceware.org/ml/libc-alpha/2014-06/msg00543.html> to
include <kernel-features.h> directly, any include from a file not
using __ASSUME_* macros can safely be removed (as there will no longer
be some other file relying on indirect inclusion via a header from
which the include is being removed).
This patch removes such unnecessary kernel-features.h includes.
Tested x86_64 that disassembly of installed shared libraries is
unchanged by this patch, except for line numbers in calls to
__assert_fail from libc.so and ld.so.
2014-06-23 Joseph Myers <joseph@codesourcery.com>
* nptl/createthread.c: Don't include kernel-features.h.
* nptl/pthread_cancel.c: Likewise.
* nptl/pthread_condattr_setclock.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/raise.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Likewise.
* nptl/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Likewise.
* nptl/sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Likewise.
* nptl/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_create.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_delete.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_getoverr.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_gettime.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_routines.c: Likewise.
* nptl/sysdeps/unix/sysv/linux/timer_settime.c: Likewise.
* nscd/gai.c: Likewise.
* nss/nss_db/db-open.c: Likewise.
* sysdeps/generic/ldsodefs.h: Likewise.
* sysdeps/sh/nptl/tls.h: Likewise.
* sysdeps/unix/sysv/linux/aarch64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h: Likewise.
* sysdeps/unix/sysv/linux/aarch64/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/adjtime.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xstatconv.h: Likewise.
* sysdeps/unix/sysv/linux/arm/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise.
* sysdeps/unix/sysv/linux/check_pf.c: Likewise.
* sysdeps/unix/sysv/linux/clock_getcpuclockid.c: Likewise.
* sysdeps/unix/sysv/linux/clock_getres.c: Likewise.
* sysdeps/unix/sysv/linux/clock_gettime.c: Likewise.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: Likewise.
* sysdeps/unix/sysv/linux/clock_settime.c: Likewise.
* sysdeps/unix/sysv/linux/dl-execstack.c: Likewise.
* sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise.
* sysdeps/unix/sysv/linux/dl-sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/generic/futimesat.c: Likewise.
* sysdeps/unix/sysv/linux/generic/poll.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/fxstatat.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/preadv.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/preadv64.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev.c: Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwritev64.c: Likewise.
* sysdeps/unix/sysv/linux/getcwd.c: Likewise.
* sysdeps/unix/sysv/linux/getpagesize.c: Likewise.
* sysdeps/unix/sysv/linux/getsysstats.c: Likewise.
* sysdeps/unix/sysv/linux/i386/fxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/lxstat.c: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap.S: Likewise.
* sysdeps/unix/sysv/linux/i386/mmap64.S: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/i386/xstat.c: Likewise.
* sysdeps/unix/sysv/linux/ia64/system.c: Likewise.
* sysdeps/unix/sysv/linux/if_index.c: Likewise.
* sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
* sysdeps/unix/sysv/linux/ifreq.c: Likewise.
* sysdeps/unix/sysv/linux/ldsodefs.h: Likewise.
* sysdeps/unix/sysv/linux/lutimes.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/microblaze/nptl/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/accept4.c: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/recvmmsg.c: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/sendmmsg.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/mmap64.c: Likewise.
* sysdeps/unix/sysv/linux/netlinkaccess.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/chown.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
* sysdeps/unix/sysv/linux/pread.c: Likewise.
* sysdeps/unix/sysv/linux/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/prof-freq.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise.
* sysdeps/unix/sysv/linux/s390/system.c: Likewise.
* sysdeps/unix/sysv/linux/sh/pread.c: Likewise.
* sysdeps/unix/sysv/linux/sh/pread64.c: Likewise.
* sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise.
* sysdeps/unix/sysv/linux/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/sigpending.c: Likewise.
* sysdeps/unix/sysv/linux/sigprocmask.c: Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/xstatconv.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/system.c: Likewise.
* sysdeps/unix/sysv/linux/syslog.c: Likewise.
* sysdeps/unix/sysv/linux/system.c: Likewise.
* sysdeps/unix/sysv/linux/testrtsig.h: Likewise.
* sysdeps/unix/sysv/linux/timespec_get.c: Likewise.
* sysdeps/unix/sysv/linux/ttyname.c: Likewise.
* sysdeps/unix/sysv/linux/ttyname_r.c: Likewise.
* sysdeps/unix/sysv/linux/utimensat.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/xstatconv.h: Likewise.
Joseph Myers [Wed, 25 Jun 2014 17:54:44 +0000 (17:54 +0000)]
Remove BROKEN_PPC_ASM_CR0 configure test.
One piece of architecture-specific code in the main configure.ac is
the powerpc test that can define BROKEN_PPC_ASM_CR0. There's no need
to move this to a sysdeps configure script, or to work out what bug it
was testing in May 1998 to see if it's still relevant, since nothing
in the source tree now uses the results of this test. Thus, this
patch just removes the test in question.
Not tested.
* configure.ac (libc_cv_c_asmcr0_bug): Remove configure test.
* configure: Regenerated.
* config.h.in (BROKEN_PPC_ASM_CR0): Remove macro.
Joseph Myers [Wed, 25 Jun 2014 17:52:56 +0000 (17:52 +0000)]
Move base_machine and machine settings from configure.ac to sysdeps preconfigure fragments.
This patch makes non-ex-ports architectures set base_machine and
machine based on the original configured machine value in preconfigure
fragments, like ex-ports architectures, rather than in the toplevel
configure.ac.
Tested x86 that the disassembly of installed shared libraries is
unchanged by the patch.
* configure.ac (base_machine): Do not set specially for particular
machines here.
* configure: Regenerated.
* sysdeps/powerpc/preconfigure: Move machine and base_machine
settings from configure.ac.
* sysdeps/i386/preconfigure: New file.
* sysdeps/s390/preconfigure: Likewise.
* sysdeps/sh/preconfigure: Likewise.
* sysdeps/sparc/preconfigure: Likewise.
Roland McGrath [Wed, 25 Jun 2014 17:04:14 +0000 (10:04 -0700)]
SPARC: Consolidate unnecessary nptl/ subdirectories.
Roland McGrath [Wed, 25 Jun 2014 17:03:52 +0000 (10:03 -0700)]
SPARC: Consolidate nptl/ subdirectories under linux/...
Joseph Myers [Wed, 25 Jun 2014 16:51:17 +0000 (16:51 +0000)]
Update timezone code from tzcode 2014e.
This patch updates the timezone code from tzcode 2014e (the previous
version used was 2013i).
Tested x86_64.
* timezone/checktab.awk: Update from tzcode 2014e.
* timezone/private.h: Likewise.
* timezone/tzfile.h: Likewise.
* timezone/zdump.c: Likewise.
* timezone/zic.c: Likewise.
Joseph Myers [Wed, 25 Jun 2014 16:39:33 +0000 (16:39 +0000)]
Remove __ASSUME_XFS_RESTRICTED_CHOWN.
This patch removes the __ASSUME_XFS_RESTRICTED_CHOWN macro, now it can
be presumed to be defined unconditionally. I'm not sure if what's
left of __statfs_chown_restricted is actually useful (if not, a
followup could remove it), but I left it there to keep the patch
conservative and avoid changing the code generated for glibc.
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by the patch.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_XFS_RESTRICTED_CHOWN): Remove macro.
* sysdeps/unix/sysv/linux/pathconf.c (__statfs_chown_restricted)
[__ASSUME_XFS_RESTRICTED_CHOWN]: Make code unconditional.
(__statfs_chown_restricted) [!__ASSUME_XFS_RESTRICTED_CHOWN]:
Remove conditional code.
Will Newton [Wed, 25 Jun 2014 11:21:17 +0000 (12:21 +0100)]
ARM: Add support for AT_HWCAP2 in _dl_procinfo
Add support for the new HWCAP2 values for ARMv8 added in the
3.15 kernel. Tested using QEMU which supports these extensions.
ChangeLog:
2014-06-25 Will Newton <will.newton@linaro.org>
* sysdeps/unix/sysv/linux/arm/dl-procinfo.c
(_dl_arm_cap_flags): Add HWCAP2 values.
* sysdeps/unix/sysv/linux/arm/dl-procinfo.h
(_DL_HWCAP_COUNT): Increase to 37.
(_DL_HWCAP_LAST): New define.
(_DL_HWCAP2_LAST): New define.
(_dl_procinfo): Add support for printing
AT_HWCAP2 entries.
(_dl_string_hwcap): Use _dl_hwcap_string.
Adhemerval Zanella [Wed, 25 Jun 2014 14:57:39 +0000 (09:57 -0500)]
Update powerpc-fpu ULPs.
Joseph Myers [Wed, 25 Jun 2014 12:55:21 +0000 (12:55 +0000)]
Update README and NEWS for ports directory removal.
This patch updates README to remove a mention of the ports directory.
It also adds a NEWS item for the merge of ports into the main sysdeps
tree (I think it's NEWS-worthy, although not strictly a user-visible
feature).
Other remaining ports references to resolve: a comment in
manual/signal.texi (not giving a literal path, but maybe should change
anyway); a comment in config.h.in (path should be updated);
scripts/list-sources.sh (appears to date back to ports being a
separate repository).
* README: Do not mention ports directory.
Joseph Myers [Wed, 25 Jun 2014 11:36:10 +0000 (11:36 +0000)]
Remove __ASSUME_UTIMENSAT.
This patch removes the __ASSUME_UTIMENSAT macro, now it can be
unconditionally assumed to be true.
This shows that the only live uses of __ASSUME_UTIMES are in utimes.c
and they are only live for hppa. I intend a followup patch to make
__ASSUME_UTIMES into an hppa-specific macro (not used or defined
outside sysdeps/unix/sysv/linux/hppa/).
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by this patch.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMENSAT):
Remove macro.
* sysdeps/unix/sysv/linux/futimes.c: Do not include
<kernel-features.h>.
[__NR_utimensat && !__ASSUME_UTIMENSAT] (miss_utimensat): Remove
conditional variable definition.
(__futimes): Update comment.
(__futimes) [__ASSUME_UTIMENSAT]: Make code unconditional.
(__futimes) [!__ASSUME_UTIMENSAT]: Remove conditional code.
Joseph Myers [Wed, 25 Jun 2014 11:33:22 +0000 (11:33 +0000)]
Fix exp10 spurious underflows (bug 16560).
This patch fixes spurious underflows from exp10 for arguments near 0
(part of bug 16560; that bug also includes spurious underflows from
exp2, which are not fixed by this patch). The problem is underflows
in the internal computation converting the exp10 argument to arguments
for exp (with extra precision), and the fix is simply to return 1
early for arguments near enough to 0 (just as arguments with large
enough magnitude have their own overflow / underflow logic at the
start of the function).
Tested x86_64 and x86 and ulps updated accordingly; also tested for
powerpc32 and mips64 to validate the ldbl-128ibm and ldbl-128 changes.
[BZ #16560]
* sysdeps/ieee754/dbl-64/e_exp10.c (__ieee754_exp10): Return 1 for
arguments close to 0.
* sysdeps/ieee754/ldbl-128/e_exp10l.c (__ieee754_exp10l):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_exp10l.c (__ieee754_exp10l):
Likewise.
* math/auto-libm-test-in: Add more tests of exp10.
* math/auto-libm-test-out: Regenerated.
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
Joseph Myers [Wed, 25 Jun 2014 11:31:51 +0000 (11:31 +0000)]
Remove __ASSUME_COMPLETE_READV_WRITEV.
This patch removes the __ASSUME_COMPLETE_READV_WRITEV
kernel-features.h macro, now that it can be unconditionally assumed to
be true. (The relevant kernel feature was added some time between 2.0
and 2.2, and this macro is only used in sysdeps/unix/sysv/linux/.)
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by this patch.
* sysdeps/unix/sysv/linux/kernel-features.h
(__ASSUME_COMPLETE_READV_WRITEV): Remove macro.
* sysdeps/unix/sysv/linux/readv.c: Do not include
<kernel-features.h>.
[!__ASSUME_COMPLETE_READV_WRITEV]: Remove conditional code.
[!UIO_FASTIOV] (UIO_FASTIOV): Remove macro.
(__libc_readv) [__ASSUME_COMPLETE_READV_WRITEV]: Make code
unconditional.
(__libc_readv) [!__ASSUME_COMPLETE_READV_WRITEV]: Remove
conditional code.
* sysdeps/unix/sysv/linux/writev.c: Do not include
<kernel-features.h>.
[!__ASSUME_COMPLETE_READV_WRITEV]: Remove conditional code.
[!UIO_FASTIOV] (UIO_FASTIOV): Remove macro.
(__libc_writev) [__ASSUME_COMPLETE_READV_WRITEV]: Make code
unconditional.
(__libc_writev) [!__ASSUME_COMPLETE_READV_WRITEV]: Remove
conditional code.
Will Newton [Tue, 24 Jun 2014 13:19:36 +0000 (14:19 +0100)]
sysdeps/posix/tempname.c: Merge from gnulib
Partial merge from gnulib which fixes a number of -Wundef warnings.
The parts that differ from gnulib are the header comment, use of
__glibc_unlikely, a #define of __secure_getenv and the use of tabs.
The majority of the patch is cosmetic comment changes, the only runtime
change is an abort if an unknown kind is passed to __gen_tempname.
ChangeLog:
2014-06-25 Will Newton <will.newton@linaro.org>
* sysdeps/posix/tempname.c: Merge from gnulib, cosmetic
comment changes throughout the file. Remove checks
for HAVE_*_H definitions that are not required.
(__gen_tempname): Call abort if an unknown kind value is
passed.
Andreas Schwab [Tue, 24 Jun 2014 07:41:02 +0000 (09:41 +0200)]
m68k: Add compat symbols for scalbln*
Siddhesh Poyarekar [Wed, 25 Jun 2014 03:17:13 +0000 (08:47 +0530)]
Add compat symbols for scalb* in i386
Bring back symbols into libc.so for scalb* functions. They are no
longer used but unfortunately they're now part of the ABI.
Roland McGrath [Wed, 25 Jun 2014 02:17:43 +0000 (19:17 -0700)]
x86: Consolidate unnecessary nptl/ subdirectories.
Joseph Myers [Tue, 24 Jun 2014 21:00:08 +0000 (21:00 +0000)]
Fix x86/x86_64 expm1l spurious underflow exceptions (bug 16539).
This patch fixes bug 16539, spurious underflow exceptions from x86 /
x86-64 expm1l. The problem is that the computation of a base-2
exponent with extra precision involves spurious underflows for
arguments that are small but not subnormal, so a check is added to
just return the argument in those cases. (If the argument *is*
subnormal, underflowing is correct and the existing code will always
underflow, so it suffices to keep using the existing code in that
case; some expm1 implementations have a bug (bug 16353) with missing
underflow exceptions, but I don't think there's such a bug in this
particular version.)
Tested x86_64 and x86; no ulps updates needed.
(auto-libm-test-out diffs omitted below.)
[BZ #16539]
* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Just
return the argument for normal arguments with exponent below -64.
* sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]:
Likewise.
* math/auto-libm-test-in: Add another test of expm1.
* math/auto-libm-test-out: Regenerated.
Joseph Myers [Tue, 24 Jun 2014 20:56:56 +0000 (20:56 +0000)]
Fix ldbl-128 erfl spurious underflows (bug 16287).
This patch fixes bug 16287, spurious underflows from ldbl-128 erfl
arising from it calling erfcl for arguments with absolute value at
least 1.0, although for large positive arguments erfcl correctly
underflows but erfl shouldn't. The fix is simply to avoid calling
erfcl, and just return 1, for arguments above a cut-off large enough
that erfl correctly rounds to-nearest as 1 but not so large that erfcl
underflows.
Tested mips64. Also tested x86_64 and x86 to confirm the new tests
(taken from the tests of erfc) don't cause any problems there; no ulps
updates needed.
[BZ #16287]
* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfl): Return 1 without
calling __erfcl for arguments at least 16.
* math/auto-libm-test-in: Add more tests of erf.
* math/auto-libm-test-out: Regenerated.
Joseph Myers [Tue, 24 Jun 2014 20:53:03 +0000 (20:53 +0000)]
Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac.
Continuing the process of making non-ex-ports architectures follow the
preferred sysdeps practices followed by ex-ports architectures - that
is, putting things in architecture-specific sysdeps files rather than
having architecture-specific cases in architecture-independent files -
this patch moves architecture cases out of
sysdeps/unix/sysv/linux/configure.ac into (new or existing) configure
fragments for each architecture. (In the case of the
arch_minimum_kernel setting for x32,
sysdeps/unix/sysv/linux/x86_64/x32/configure already has such a
setting so the setting in sysdeps/unix/sysv/linux/configure.ac was a
duplicate that could just be removed - though I haven't tested for
x32.)
Tested for x86_64 and x86 that the patch causes no changes to the
installed shared libraries or ldd (or any part of the installation
except for the parts that always change because the files contain
timestamps - nscd and static libraries).
* sysdeps/unix/sysv/linux/configure.ac: Remove cases for
individual architectures.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/i386/configure.ac: New file.
* sysdeps/unix/sysv/linux/i386/configure: New generated file.
* sysdeps/unix/sysv/linux/powerpc/configure.ac
(ldd_rewrite_script): Define variable.
* sysdeps/unix/sysv/linux/powerpc/configure: Regenerated.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/configure.ac: New
file.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/configure: New
generated file.
* sysdeps/unix/sysv/linux/s390/configure.ac: New file.
* sysdeps/unix/sysv/linux/s390/configure: New generated file.
* sysdeps/unix/sysv/linux/sh/configure.ac: New file.
* sysdeps/unix/sysv/linux/sh/configure: New generated file.
* sysdeps/unix/sysv/linux/sparc/configure.ac: New file.
* sysdeps/unix/sysv/linux/sparc/configure: New generated file.
* sysdeps/unix/sysv/linux/x86_64/configure.ac: New file.
* sysdeps/unix/sysv/linux/x86_64/configure: New generated file.
Siddhesh Poyarekar [Tue, 24 Jun 2014 17:10:07 +0000 (22:40 +0530)]
Fix namespace violation in pthreadtypes.h (BZ #17084)
This was causing conformtest failures on i386.
Wilco [Tue, 24 Jun 2014 15:40:29 +0000 (15:40 +0000)]
Add bug 16918 to NEWS.
Marcus Shawcroft [Tue, 24 Jun 2014 15:28:06 +0000 (16:28 +0100)]
Revert "Add bug 16918 to NEWS."
This reverts commit
222b787a6fd36601f5c5d22378176798327fcf31.
Wilco [Tue, 24 Jun 2014 15:05:23 +0000 (15:05 +0000)]
Optimize fesetenv
Improve fesetenv to use an optimized implementation similar to
feupdateenv.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/fesetenv.c (fesetenv): Optimize implementation.
Wilco [Tue, 24 Jun 2014 15:02:51 +0000 (15:02 +0000)]
Add _FPU_MASK_RM and use it instead of FE_TOWARDZERO.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/fpu_control.h (_FPU_MASK_RM): Define.
* sysdeps/arm/fenv_private.h (libc_fesetround_vfp)
(libc_feholdexcept_setround_vfp) (libc_feholdsetround_vfp)
(libc_feresetround_vfp) (libc_feholdsetround_vfp_ctx)
(libc_feresetround_vfp_ctx): Use _FPU_MASK_RM.
* sysdeps/arm/fesetround.c (fesetround): Use _FPU_MASK_RM.
* sysdeps/arm/get-rounding-mode.h (get_rounding_mode):
Use _FPU_MASK_RM.
Wilco [Tue, 24 Jun 2014 15:00:01 +0000 (15:00 +0000)]
Remove an unused include.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Remove unused include.
Wilco [Tue, 24 Jun 2014 14:57:32 +0000 (14:57 +0000)]
Cleanup fenv implementation
Remove some spaces before libm_hidden_def.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/feholdexcpt.c (feholdexcept): Remove space.
* sysdeps/arm/fesetenv.c (fesetenv): Remove space.
* sysdeps/arm/fesetround.c (fesetround): Remove space.
* sysdeps/arm/fraiseexcpt.c (feraiseexcept): Remove space.
Wilco [Tue, 24 Jun 2014 14:48:05 +0000 (14:48 +0000)]
Add bug 16918 to NEWS.
Wilco [Tue, 24 Jun 2014 13:53:04 +0000 (13:53 +0000)]
Rewrite feupdateenv
This patch rewrites feupdateenv to improve performance by avoiding
unnecessary FPSCR reads/writes. It fixes bug 16918 by passing the
correct return value.
2014-06-24 Wilco <wdijkstr@arm.com>
[BZ #16918]
* sysdeps/arm/feupdateenv.c (feupdateenv):
Rewrite to reduce FPSCR accesses and fix return value.
Wilco [Tue, 24 Jun 2014 12:04:27 +0000 (12:04 +0000)]
Speed up the ARM fenv implementation by avoiding unnecessary FPSCR
writes if the FPSCR remains unchanged.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/fclrexcpt.c (feclearexcept):
Optimize to avoid unnecessary FPSCR writes.
* sysdeps/arm/fedisblxcpt.c (fedisableexcept): Likewise.
* sysdeps/arm/feenablxcpt.c (feenableexcept): Likewise.
* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Likewise.
* sysdeps/arm/setfpucw.c (__setfpucw): Likewise.
Wilco [Tue, 24 Jun 2014 11:04:31 +0000 (11:04 +0000)]
Use libc calls defined by fenv_private.h to implement several fenv functions
rather than duplicating functionality. To make this work for softfp builds,
ensure functions in fenv_private are not conditionally compiled.
2014-06-24 Wilco <wdijkstr@arm.com>
* sysdeps/arm/fegetround.c (fegetround): Call get_rounding_mode.
* sysdeps/arm/feholdexcpt.c (feholdexcept): Call libc_feholdexcept_vfp.
* sysdeps/arm/fesetround.c (fesetround): Call libc_fesetround_vfp.
* sysdeps/arm/fgetexcptflg.c (fegetexceptflag):
Call libc_fetestexcept_vfp.
* sysdeps/arm/ftestexcept.c (fetestexcept): Call libc_fetestexcept_vfp.
* sysdeps/arm/fenv_private.h: Move libc_*_vfp functions outside of
__SOFTFP__ ifdef so that they can be built for softfp.
Siddhesh Poyarekar [Tue, 24 Jun 2014 10:42:43 +0000 (16:12 +0530)]
Fix build warning in pthread_rwlock_*
The first argument of elision_adapt and that of ELISION_*LOCK have
different signs since __elision_rwcount is signed char * and the
argument of elision_adapt is uint8_t *. Modified elision_adapt to
accept signed char * instead of uint8_t *.
Siddhesh Poyarekar [Tue, 24 Jun 2014 07:51:20 +0000 (13:21 +0530)]
Print offending diff when check-abi fails
The earlier version of check-abi would print a diff of the expected
ABI vs the built ABI when there was a difference. Bring back this
behaviour.
Roland McGrath [Mon, 23 Jun 2014 21:07:59 +0000 (14:07 -0700)]
Add missing #include in get-rounding-mode.h