Roland McGrath [Thu, 8 Jan 2015 22:29:45 +0000 (14:29 -0800)]
Fix copyright year on new stub sys/procfs.h file.
Roland McGrath [Thu, 8 Jan 2015 22:26:51 +0000 (14:26 -0800)]
NPTL: Fix generic pthread_sigmask.
Roland McGrath [Thu, 8 Jan 2015 21:41:14 +0000 (13:41 -0800)]
NPTL: Fixed missed conditionalization of setxid hooey.
Roland McGrath [Thu, 8 Jan 2015 21:24:56 +0000 (13:24 -0800)]
Add stub sys/procfs.h file
Roland McGrath [Thu, 8 Jan 2015 18:49:40 +0000 (10:49 -0800)]
NPTL: Refactor cpu_set_t validation to be sysdeps-controlled
This removes Linuxisms related to cpu_set_t validation from the
generic NPTL code and puts them into a new sysdeps header file.
Richard Henderson [Thu, 8 Jan 2015 16:32:06 +0000 (08:32 -0800)]
Add -Wno-trampolines as needed
Chung-Lin Tang [Thu, 8 Jan 2015 16:02:43 +0000 (08:02 -0800)]
Add Nios II definitions to elf/elf.h.
Adhemerval Zanella [Tue, 6 Jan 2015 12:59:04 +0000 (07:59 -0500)]
powerpc: Fix compiler warning on some syscalls
GCC 5.0 emits an warning when using sizeof on array function parameters
and powerpc internal syscall macros add a check for such cases. More
specifically, on powerpc64 and powerpc32 sysdep.h:
if (__builtin_classify_type (__arg3) != 5 && sizeof (__arg3) > 8) \
__illegally_sized_syscall_arg3 (); \
And for sysdeps/unix/sysv/linux/utimensat.c build GCC emits:
error: ‘sizeof’ on array function parameter ‘tsp’ will return size of
‘const struct timespec *’
This patch uses the address of first struct member instead of the struct
itself in syscall macro.
Matthew Fortune [Tue, 6 Jan 2015 15:06:14 +0000 (15:06 +0000)]
NEWS for MIPS ABIs
* NEWS: Announce support for new MIPS ABI extensions.
Joseph Myers [Wed, 7 Jan 2015 19:01:20 +0000 (19:01 +0000)]
Fix libm feupdateenv namespace (bug 17748).
Concluding the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of feupdateenv by making it a weak alias for
__feupdateenv and making the affected code call __feupdateenv.
Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch). Also tested for ARM
(soft-float) that the math.h linknamespace tests now pass.
[BZ #17748]
* include/fenv.h (__feupdateenv): Use libm_hidden_proto.
* math/feupdateenv.c (__feupdateenv): Use libm_hidden_def.
* sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Rename to
__feupdateenv and define as weak alias of __feupdateenv. Use
libm_hidden_weak.
* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/arm/feupdateenv.c (feupdateenv): Rename to __feupdateenv
and define as weak alias of __feupdateenv. Use libm_hidden_weak.
* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Rename to
__feupdateenv and define as weak alias of __feupdateenv. Use
libm_hidden_weak.
* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Rename to
__feupdateenv and define as weak alias of __feupdateenv. Use
libm_hidden_weak.
* sysdeps/powerpc/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c
(__feupdateenv): Likewise.
* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Rename to
__feupdateenv and define as weak alias of __feupdateenv. Use
libm_hidden_weak.
* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/tile/math_private.h (__feupdateenv): New inline
function.
* sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Use
libm_hidden_def.
* sysdeps/generic/math_private.h (default_libc_feupdateenv): Call
__feupdateenv instead of feupdateenv.
(default_libc_feupdateenv_test): Likewise.
(libc_feresetround_ctx): Likewise.
Adhemerval Zanella [Wed, 7 Jan 2015 18:26:26 +0000 (16:26 -0200)]
mips: Fix __libc_pread prototype
This patch fixes the __libc_pread prototype change from
14bb4e57c094849228ad8524693ab9432c38396c.
Chris Metcalf [Wed, 7 Jan 2015 17:29:26 +0000 (12:29 -0500)]
posix/regcomp: initialize union structure tag to avoid warning
We see some surprising warnings on tilegx with gcc 4.8.2:
In file included from regex.c:66:0:
regcomp.c: In function ‘parse_expression’:
regcomp.c:2849:15: error: ‘end_elem’ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
else if (br_elem->type == COLL_SYM)
^
regcomp.c:3109:34: note: ‘end_elem’ was declared here
bracket_elem_t start_elem, end_elem;
^
regcomp.c:3109:22: error: ‘start_elem’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
bracket_elem_t start_elem, end_elem;
^
These warnings are not seen on x86, and in fact if I compile the
preprocessed tile sources with the x86 gcc 4.8.2, I don't see the
warnings. I do see eqiuvalent warnings if I compile the
x86-preprocessed source code with tilegx gcc 4.8.2.
The fix here is to initialize the union type field appropriately in
a couple of places where we pass a union pointer to a subroutine that
"knows" what type the union is. Setting the type explicitly seems like
a more robust way to manage such a data structure in any case.
Richard Earnshaw [Wed, 7 Jan 2015 11:31:10 +0000 (11:31 +0000)]
AArch64: Optimized implementations of strcpy and stpcpy.
Richard Earnshaw [Wed, 7 Jan 2015 11:26:13 +0000 (11:26 +0000)]
AArch64 optimized implementation of strrchr.
Siddhesh Poyarekar [Wed, 7 Jan 2015 10:45:24 +0000 (16:15 +0530)]
Fix typo in ChangeLog
Eric Biggers [Wed, 7 Jan 2015 06:40:52 +0000 (12:10 +0530)]
setenv fix memory leak when setting large, duplicate string (BZ #17658)
glibc maintains a binary tree of environment strings it malloc()ed
itself. However, it's possible for it to malloc() a string, then find
that an identical string is already in the tree. In this case, the
memory is leaked and is not freed if the application later calls
__libc_freeres(). Fix this by freeing 'new_value' when it's unneeded.
Test case:
#include <stdlib.h>
#include <string.h>
int main()
{
char *p = calloc(100000, 1);
memset(p, 'A', 99999);
setenv("TESTVAR", p, 1);
setenv("TESTVAR", p, 1);
free(p);
}
Leak that was reported by valgrind:
100,008 bytes in 1 blocks are definitely lost in loss record 1 of 1
at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E6B3D4: __add_to_environ (setenv.c:176)
by 0x4C31B8F: setenv (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x400642: main (in /mnt/tmpfs/a.out)
Vladimir A. Nazarenko [Wed, 7 Jan 2015 03:19:44 +0000 (19:19 -0800)]
Fix incorrect mount table entry parsing in __getmntent_r
When mount entry contains only four fields and have more then one space or
tab at the and, mp.mnt_freq and mp.mnt_passno will be set to some specific
values as side effect from parsing of previus mount entry. It is because
sscanf(""," %d %d ", &a, &b) returns -1, but this case is unprocessed.
Values of mp.mnt_freq and mp.mnt_passno stays unchanged. This patch is
attempt to fix described issue by removing trailing tabs and spaces.
Joseph Myers [Wed, 7 Jan 2015 00:41:23 +0000 (00:41 +0000)]
Fix libm fesetround namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fesetround by making it a weak alias of
__fesetround and making the affected code call __fesetround. An
existing __fesetround function in fenv_libc.h for powerpc is renamed
to __fesetround_inline.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that fesetround failures disappear from the linknamespace
test results (feupdateenv remains to be addressed to complete fixing
bug 17748).
[BZ #17748]
* include/fenv.h (__fesetround): Declare. Use libm_hidden_proto.
* math/fesetround.c (fesetround): Rename to __fesetround and
define as weak alias of __fesetround. Use libm_hidden_weak.
* sysdeps/aarch64/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/alpha/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/arm/fesetround.c (fesetround): Likewise.
* sysdeps/hppa/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/i386/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/ia64/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/m68k/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/mips/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/powerpc/fpu/fenv_libc.h (__fesetround): Rename to
__fesetround_inline.
* sysdeps/powerpc/fpu/fenv_private.h (libc_fesetround_ppc): Call
__fesetround_inline instead of __fesetround.
* sysdeps/powerpc/fpu/fesetround.c (fesetround): Rename to
__fesetround and define as weak alias of __fesetround. Use
libm_hidden_weak. Call __fesetround_inline instead of
__fesetround.
* sysdeps/powerpc/nofpu/fesetround.c (fesetround): Rename to
__fesetround and define as weak alias of __fesetround. Use
libm_hidden_weak.
* sysdeps/powerpc/powerpc32/e500/nofpu/fesetround.c (fesetround):
Likewise.
* sysdeps/s390/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/sh/sh4/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/sparc/fpu/fesetround.c (fesetround): Likewise.
* sysdeps/tile/math_private.h (__fesetround): New inline function.
* sysdeps/x86_64/fpu/fesetround.c (fesetround): Rename to
__fesetround and define as weak alias of __fesetround. Use
libm_hidden_weak.
* sysdeps/generic/math_private.h (default_libc_fesetround): Call
__fesetround instead of fesetround.
(default_libc_feholdexcept_setround): Likewise.
(libc_feholdsetround_ctx): Likewise.
(libc_feholdsetround_noex_ctx): Likewise.
Joseph Myers [Tue, 6 Jan 2015 23:36:20 +0000 (23:36 +0000)]
Fix libm fesetenv namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fesetenv by making it a weak alias of
__fesetenv and making the affected code (including various copies of
feupdateenv which also gets called from C90 functions) call
__fesetenv.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that fesetenv failures disappear from the linknamespace
test results (fsetround and feupdateenv remain to be addressed to
complete fixing bug 17748).
[BZ #17748]
* include/fenv.h (__fesetenv): Use libm_hidden_proto.
* math/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/aarch64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
and define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/alpha/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/arm/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise.
* sysdeps/i386/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/ia64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/m68k/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/mips/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Use
libm_hidden_def.
* sysdeps/powerpc/nofpu/fesetenv.c (__fesetenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/fesetenv.c (__fesetenv):
Likewise.
* sysdeps/s390/fpu/fesetenv.c (fesetenv): Rename to __fesetenv and
define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/sh/sh4/fpu/fesetenv.c (fesetenv): Likewise.
* sysdeps/sparc/fpu/fesetenv.c (__fesetenv): Use libm_hidden_def.
* sysdeps/tile/math_private.h (__fesetenv): New inline function.
* sysdeps/x86_64/fpu/fesetenv.c (fesetenv): Rename to __fesetenv
and define as weak alias of __fesetenv. Use libm_hidden_weak.
* sysdeps/generic/math_private.h (default_libc_fesetenv): Use
__fesetenv instead of fesetenv.
(libc_feresetround_noex_ctx): Likewise.
* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/i386/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/powerpc/nofpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/feupdateenv.c
(__feupdateenv): Likewise.
* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/x86_64/fpu/feupdateenv.c (__feupdateenv): Likewise.
Ondřej Bílka [Tue, 6 Jan 2015 17:43:28 +0000 (18:43 +0100)]
Revert "Suppress warning in string/tester.c for gcc 4.9"
This reverts commit
9300797ee93422a87f443d5ba7e1411167e7a837.
H.J. Lu [Tue, 6 Jan 2015 17:32:41 +0000 (09:32 -0800)]
Mention bug fix for BZ #17806
Aurelien Jarno [Tue, 6 Jan 2015 16:50:23 +0000 (08:50 -0800)]
resolv: fix rotate option
The rotate option doesn't work correctly, and only send the query to the
same server (the second in the list). The rotation code in itself is not
broken, but the nsaddrs structure is reinitialized each time at the
beginning of __libc_res_nsend unless RES_STAYOPEN is enabled.
This is due to a call to __res_iclose from the end of __libc_res_nsend
when answers from the name server have been received. This function
closes all the sockets, but doesn't free the addresses (it can do that,
but in that case the second argument is false).
This patch change the code of __res_iclose to clear statp->_u._ext.nsinit
only when the addresses are actually freed.
* resolv/res_init.c (__res_iclose): Only clear nsinit if the
addresses have been freed.
Aurelien Jarno [Tue, 6 Jan 2015 16:33:43 +0000 (08:33 -0800)]
resolv: improve comments about nserv and nservall
The current comments concerning nserv and nservall are not really clear
and lead to confusion when reviewing an already complex code. Improve
them, there real meaning have been confirmed by a code analysis.
* resolv/res_init.c (__res_vinit): Improve comments about nserv
and nservall.
Ondřej Bílka [Tue, 6 Jan 2015 16:43:09 +0000 (17:43 +0100)]
Suppress warning in string/tester.c for gcc 4.9
Ondřej Bílka [Tue, 6 Jan 2015 16:35:24 +0000 (17:35 +0100)]
Add changelog
Ondřej Bílka [Tue, 6 Jan 2015 16:26:44 +0000 (17:26 +0100)]
Clean up check_pf allocation pattern. addresses
We simplify allocation strategy there so instead of using temporary linked list
and then copying entries to output array we keep them in resizable
array.
Adhemerval Zanella [Tue, 6 Jan 2015 16:22:41 +0000 (08:22 -0800)]
Function declaration cleanup
This patch changes the some function declaration from K&R style to
default ANSI C.
* nptl/pthread_cancel.c (pthread_cancel): Use ANSI prototype.
* nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
* nptl/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
* nptl/pthread_exit.c (__pthread_exit): Likewise.
* nptl/pthread_join.c (pthread_join): Likewise.
* nptl/pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
* sysdeps/posix/waitid.c (__waitid): Likewise.
* sysdeps/unix/sysv/linux/arm/pread.c (__libc_pread): Likewise.
* sysdeps/unix/sysv/linux/arm/pread64.c (__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/arm/pwrite.c (__libc_pwrite): Likewise.
* sysdeps/unix/sysv/linux/arm/pwrite64.c (__libc_pwrite64): Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c (__libc_pread):
Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pread64.c
(__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c
(__libc_pwrite): Likewise.
* sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite64.c
(__libc_pwrite64): Likewsie.
* sysdeps/unix/sysv/linux/mips/pread.c (__libc_pread): Likewise.
* sysdeps/unix/sysv/linux/mips/pread64.c (__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite64.c (__libc_pwrite64): Likewise.
* sysdeps/unix/sysv/linux/msgrcv.c (__libc_msgrcv): Likewise.
* sysdeps/unix/sysv/linux/msgsnd.c (__libc_msgsnd): Likewise.
* sysdeps/unix/sysv/linux/openat.c (OPENAT_NOT_CANCEL): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c (__libc_pread):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c
(__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c (__libc_pwrite):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c
(__libc_pwrite64): Likewise.
* sysdeps/unix/sysv/linux/pread.c (__libc_pread): Likewise.
* sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/preadv.c (PREADV): Likewise.
* sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
* sysdeps/unix/sysv/linux/pwrite.c (__libc_pwrite): Likewise.
* sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Likewise.
* sysdeps/unix/sysv/linux/pwritev.c (__libc_pwritev): Likewise.
* sysdeps/unix/sysv/linux/sh/pread.c (__libc_pread): Likewise.
* sysdeps/unix/sysv/linux/sh/pread64.c (__libc_pread64): Likewise.
* sysdeps/unix/sysv/linux/sh/pwrite.c (__libc_pwrite): Likewise.
* sysdeps/unix/sysv/linux/sh/pwrite64.c (__libc_write64): Likewise.
* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Likewise.
* sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Likewise.
* sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
* sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/msgrcv.c (__libc_msgrcv):
Likewise.
Andrew Senkevich [Tue, 6 Jan 2015 14:29:23 +0000 (06:29 -0800)]
Remove duplicated -frounding-math
No need to add -frounding-math. math-flags in Makeconfig includes
-frounding-math.
* math/Makefile (CFLAGS-test-float.c): Remove -frounding-math.
(CFLAGS-test-double.c): Likewise.
(CFLAGS-test-ldouble.c): Likewise.
(CPPFLAGS-test-ifloat.c): Likewise.
(CPPFLAGS-test-idouble.c): Likewise.
(CPPFLAGS-test-ildoubl.c): Likewise.
(CFLAGS-test-test-fenv.c): Remove variable.
(CFLAGS-test-misc.c): Likewise.
H.J. Lu [Tue, 6 Jan 2015 12:59:13 +0000 (04:59 -0800)]
Define CLOCKS_PER_SEC type to the type clock_t
C99 specifies that CLOCKS_PER_SEC is an expression with the type clock_t.
This patch adds a generic <bits/time2.h> to define CLOCKS_PER_SEC and
provides the Linux/x86-64 version of <bits/time2.h> to support x32.
[BZ #17797]
* bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000).
* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise.
* sysdeps/unix/sysv/linux/clock.c (clock): _Static_assert
CLOCKS_PER_SEC == 1000000.
* time/clocktest.c (main): Replace %ld with %jd and cast to
intmax_t.
Roland McGrath [Mon, 5 Jan 2015 22:01:49 +0000 (14:01 -0800)]
ARM: Consolidate with generic unwinder wrapper code
Steve Ellcey [Mon, 5 Jan 2015 23:07:26 +0000 (15:07 -0800)]
Merge branch 'master' of ssh://sourceware.org/git/glibc
Steve Ellcey [Mon, 5 Jan 2015 23:06:42 +0000 (15:06 -0800)]
2015-01-05 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/memset.S (memset): Modify for mips32r6/mips64r6
to avoid using stl/str to align destination.
Joseph Myers [Mon, 5 Jan 2015 23:06:14 +0000 (23:06 +0000)]
Fix libm feholdexcept namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of feholdexcept by making it a weak alias of
__feholdexcept and making the affected code call __feholdexcept.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that feholdexcept failures disappear from the
linknamespace test failures (fesetenv, fsetround and feupdateenv
remain to be addressed to complete fixing bug 17748).
[BZ #17748]
* include/fenv.h (__feholdexcept): Declare. Use
libm_hidden_proto.
* math/feholdexcpt.c (feholdexcept): Rename to __feholdexcept and
define as weak alias of __feholdexcept. Use libm_hidden_weak.
* sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/alpha/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/arm/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/ia64/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/mips/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/powerpc/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
(feholdexcept): Likewise.
* sysdeps/s390/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/x86_64/fpu/feholdexcpt.c (feholdexcept): Likewise.
* sysdeps/generic/math_private.h (default_libc_feholdexcept): Use
__feholdexcept instead of feholdexcept.
(default_libc_feholdexcept_setround): Likewise.
Steve Ellcey [Mon, 5 Jan 2015 21:28:42 +0000 (13:28 -0800)]
2015-01-05 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/memcpy.S: Add support for mips32r6/mips64r6.
Joseph Myers [Mon, 5 Jan 2015 18:02:31 +0000 (18:02 +0000)]
Fix MIPS n64 posix_fadvise namespace (bug 17796).
sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c defines
posix_fadvise64 as a strong alias for posix_fadvise (for
!SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3) - i.e., for static
linking, which is the case when this matters), but it should be a weak
alias. This patch makes it a weak alias.
Tested for MIPS that this fixes the observed linknamespace test
failures.
[BZ #17796]
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
[!SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)] (posix_fadvise64):
Define as weak alias not strong alias.
Steve Ellcey [Mon, 5 Jan 2015 17:39:33 +0000 (09:39 -0800)]
2015-01-05 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/mips/dl-machine.h (elf_machine_load_address): Replace
bltzal with addiupc.
(RTLD_START): Ditto.
Chris Metcalf [Mon, 5 Jan 2015 17:06:15 +0000 (12:06 -0500)]
tile: check error properly for vDSO calls
The tile vDSO vsyscalls were not properly setting the error value.
Conventionally, tile returns the same "non-negative success, negative
errno" value that x86 does (in r0), but it also returns "zero or positive
errno" in r1, which is what the regular syscall code checks. This change
uses that convention for the vDSO calls as well.
Chris Metcalf [Mon, 5 Jan 2015 16:59:32 +0000 (11:59 -0500)]
lround: provide cast for wordsize-64 version if needed
Platforms with 64-bit registers where 32-bit values need to have the
high 32 bits set in a particular way need to have an explicit cast
when using the 64-bit sysdeps/ieee754/dbl-64/wordsize-64 version
of llround() as lround(). This includes tilegx32, and likely MIPS.
x32 does not need this, and AArch64 ILP32 will not either. Require
it to be specified in sysdep.h to be explicit.
Joseph Myers [Mon, 5 Jan 2015 16:05:34 +0000 (16:05 +0000)]
Fix ARM posix_fadvise64 namespace (bug 17793).
ARM posix_fadvise calls __posix_fadvise64_l64, to which
posix_fadvise64 is a strong alias, but posix_fadvise is a POSIX
function and posix_fadvise64 isn't. This patch changes it into a weak
alias.
Tested for ARM that this fixes the corresponding linknamespace test
failures.
[BZ #17793]
* sysdeps/unix/sysv/linux/arm/posix_fadvise64.c (posix_fadvise64):
Define as weak alias not strong alias.
Joseph Myers [Mon, 5 Jan 2015 15:06:57 +0000 (15:06 +0000)]
Fix isblank / isascii / toascii namespace (bug 17635).
Use of isblank brings in isascii and toascii, but isblank is a C99
function and the other two aren't; similarly, isascii and toascii are
UNIX98 functions and bring in isblank, which isn't. (Not a
conformance issue because of the is* and to* reservation, but still
contrary to glibc practice.) This patch fixes this by splitting
isblank out of ctype-extn.c to a separate ctype-c99.c. isblank_l is
also moved to a separate file, ctype-c99_l.c (non-XSI POSIX.1-2008 has
isblank_l, but isascii / toascii are marked OB XSI). (In principle
all these functions could go in separate files - that's optimal for
static linking - but they are also all very small, and splitting them
all out is not needed to fix the present bug.)
Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by the patch - the ordering in which new and
existing sources are listed in ctype/Makefile is arranged so functions
go in the same order so that this comparison works).
[BZ #17635]
* ctype/ctype-c99.c: New file. isblank implementation moved from
...
* ctype/ctype-extn.c: ... here.
(__isblank_l): Move to ...
* ctype/ctype-c99_l.c: ... here. New file.
* ctype/Makefile (routines): Add ctype-c99 and ctype-c99_l.
* conform/Makefile (test-xfail-ISO99/ctype.h/linknamespace):
Remove variable.
(test-xfail-ISO11/ctype.h/linknamespace): Likewise.
(test-xfail-XPG3/ctype.h/linknamespace): Likewise.
(test-xfail-XPG4/ctype.h/linknamespace): Likewise.
(test-xfail-UNIX98/ctype.h/linknamespace): Likewise.
(test-xfail-POSIX2008/ctype.h/linknamespace): Likewise.
Joseph Myers [Mon, 5 Jan 2015 14:37:07 +0000 (14:37 +0000)]
Fix wordsize-64 posix_fadvise64, posix_fallocate64 namespace (bug 17777).
On systems using sysdeps/unix/sysv/linux/wordsize-64, posix_fadvise64
and posix_fallocate64 (non-POSIX) are strong aliases for posix_fadvise
and posix_fallocate (POSIX), meaning references to the latter wrongly
bring in definitions of the former. They should be weak aliases; this
patch makes them so.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).
[BZ #17777]
* sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c
(posix_fadvise64): Define as weak alias not strong alias.
* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
(posix_fallocate64): Likewise.
* conform/Makefile (test-xfail-XOPEN2K/fcntl.h/linknamespace):
Remove variable.
(test-xfail-XOPEN2K/mqueue.h/linknamespace): Likewise.
(test-xfail-POSIX2008/fcntl.h/linknamespace): Likewise.
(test-xfail-POSIX2008/mqueue.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/fcntl.h/linknamespace): Likewise.
(test-xfail-XOPEN2K8/mqueue.h/linknamespace): Likewise.
Matthew Fortune [Mon, 5 Jan 2015 13:34:41 +0000 (13:34 +0000)]
Fix MIPS variable PAGE_SIZE bug (16191)
MIPS supports a variable page size but glibc defines a constant.
This causes at least two glibc tests to fail when the page size
does not match the hard-coded size:
inet/test-ifaddrs
inet/test_ifindex
[BZ #16191]
* NEWS: Mention bug fix.
* sysdeps/unix/sysv/linux/mips/sys/user.h (PAGE_SHIFT): Remove.
(PAGE_SIZE, PAGE_MASK, NBPG, UPAGES): Likewise.
(HOST_TEXT_START_ADDR, HOST_DATA_START_ADDR): Likewise.
(HOST_STACK_END_ADDR): Likewise.
Joseph Myers [Fri, 2 Jan 2015 20:44:42 +0000 (20:44 +0000)]
Fix libm fegetround namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of fegetround by making it a weak alias of
__fegetround and making the affected code call __fegetround.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that fegetround failures disappear from the linknamespace
test failures (feholdexcept, fesetenv, fesetround and feupdateenv
remain to be addressed before bug 17748 is fully fixed, although this
patch may suffice to fix the failures in some cases, when the libc_fe*
functions are implemented but there is no architecture-specific sqrt
implementation in use so there were failures from fegetround used by
sqrt but no other such failures).
[BZ #17748]
* include/fenv.h (__fegetround): Declare. Use libm_hidden_proto.
* math/fegetround.c (fegetround): Rename to __fegetround and
define as weak alias of __fegetround. Use libm_hidden_weak.
* sysdeps/aarch64/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/alpha/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/arm/fegetround.c (fegetround): Likewise.
* sysdeps/hppa/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/i386/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/ia64/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/m68k/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/mips/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/powerpc/fpu/fegetround.c (fegetround): Likewise.
Undefine after rather than before function definition; use
parentheses around function name in definition.
(__fegetround): Also undefine macro after function definition.
* sysdeps/powerpc/nofpu/fegetround.c (fegetround): Rename to
__fegetround and define as weak alias of __fegetround. Use
libm_hidden_weak. Do not undefine as macro.
* sysdeps/powerpc/powerpc32/e500/nofpu/fegetround.c (fegetround):
Likewise.
* sysdeps/s390/fpu/fegetround.c (fegetround): Rename to
__fegetround and define as weak alias of __fegetround. Use
libm_hidden_weak.
* sysdeps/sh/sh4/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/sparc/fpu/fegetround.c (fegetround): Likewise.
* sysdeps/tile/math_private.h (__fegetround): New inline function.
* sysdeps/x86_64/fpu/fegetround.c (fegetround): Rename to
__fegetround and define as weak alias of __fegetround. Use
libm_hidden_weak.
* sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Use
__fegetround instead of fegetround.
Joseph Myers [Fri, 2 Jan 2015 18:31:41 +0000 (18:31 +0000)]
Fix MIPS TIOCSER_TEMT namespace (bug 17782).
sysdeps/unix/sysv/linux/mips/bits/termios.h defines TIOCSER_TEMT
unconditionally, but it's in the user's namespace. This patch
conditions it on __USE_MISC, as on powerpc. I've filed bug 17783 for
the residual inconsistency in conditions on this macro (sparc defines
it for __USE_GNU only).
[BZ #17782]
* sysdeps/unix/sysv/linux/mips/bits/termios.h (TIOCSER_TEMT):
Condition macro definition on [__USE_MISC].
Joseph Myers [Fri, 2 Jan 2015 18:30:32 +0000 (18:30 +0000)]
Fix MIPS sa_flags type (bug 17781).
sysdeps/unix/sysv/linux/mips/bits/sigaction.h gives sa_flags type
unsigned int, but POSIX says it should be signed int. This patch
gives it the correct type (the layout is unchanged, so there are no
ABI issues involved).
[BZ #17781]
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h
(struct sigaction): Change type of sa_flags field to int.
Joseph Myers [Fri, 2 Jan 2015 18:29:24 +0000 (18:29 +0000)]
Fix MIPS bits/fcntl.h namespace (bug 17780).
sysdeps/unix/sysv/linux/mips/bits/fcntl.h has a structure field called
pad, which is in the user's namespace. This patch changes it to
__glibc_reserved0.
[BZ #17780]
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (struct flock)
[!__USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64]: Rename pad field to
__glibc_reserved0.
Joseph Myers [Fri, 2 Jan 2015 17:45:48 +0000 (17:45 +0000)]
Use single year in copyright notice in banner in ntpl/version.c.
* nptl/version.c (banner): Use single year in copyright notice.
Joseph Myers [Fri, 2 Jan 2015 16:53:06 +0000 (16:53 +0000)]
Update copyright dates not handled by scripts/update-copyrights.
I've updated copyright dates in glibc for 2015. This is the patch for
the changes not generated by scripts/update-copyrights and subsequent
build / regeneration of generated files. Apart from the files updated
last time (of which sotruss.ksh had moved to sotruss.sh during the
year) this also updates nptl/version.c (missed from 2006 until
October) and sysdeps/unix/sysv/linux/lddlibc4.c (missed since 2009).
* NEWS: Update copyright dates.
* catgets/gencat.c (print_version): Likewise.
* csu/version.c (banner): Likewise.
* debug/catchsegv.sh: Likewise.
* debug/pcprofiledump.c (print_version): Likewise.
* debug/xtrace.sh (do_version): Likewise.
* elf/ldconfig.c (print_version): Likewise.
* elf/ldd.bash.in: Likewise.
* elf/pldd.c (print_version): Likewise.
* elf/sotruss.sh: Likewise.
* elf/sprof.c (print_version): Likewise.
* iconv/iconv_prog.c (print_version): Likewise.
* iconv/iconvconfig.c (print_version): Likewise.
* locale/programs/locale.c (print_version): Likewise.
* locale/programs/localedef.c (print_version): Likewise.
* login/programs/pt_chown.c (print_version): Likewise.
* malloc/memusage.sh (do_version): Likewise.
* malloc/memusagestat.c (print_version): Likewise.
* malloc/mtrace.pl: Likewise.
* manual/libc.texinfo: Likewise.
* nptl/version.c (banner): Likewise.
* nscd/nscd.c (print_version): Likewise.
* nss/getent.c (print_version): Likewise.
* nss/makedb.c (print_version): Likewise.
* posix/getconf.c (main): Likewise.
* scripts/test-installation.pl: Likewise.
* sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
Will Newton [Fri, 2 Jan 2015 12:42:13 +0000 (12:42 +0000)]
ARM: Remove configure check for binutils 2.21 for ARMv7
The default required version of binutils has been increased to 2.22
making this check redundant.
ChangeLog:
2015-01-02 Will Newton <will.newton@linaro.org>
* sysdeps/arm/armv7/configure: Removed.
* sysdeps/arm/armv7/configure.ac: Likewise.
Joseph Myers [Fri, 2 Jan 2015 16:28:19 +0000 (16:28 +0000)]
Update copyright dates with scripts/update-copyrights.
Siddhesh Poyarekar [Fri, 2 Jan 2015 05:46:35 +0000 (11:16 +0530)]
Remove uses of sprintf in gen-posix-conf-vars.awk
Simply some code by replacing sprintf in the awk script.
Joseph Myers [Wed, 31 Dec 2014 22:07:52 +0000 (22:07 +0000)]
Fix libm fegetenv namespace (bug 17748).
Some C90 libm functions call fegetenv via libc_feholdsetround*
functions in math_private.h. This patch makes them call __fegetenv
instead, making fegetenv into a weak alias for __fegetenv as needed.
Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch). Also tested for ARM
(soft-float) that fegetenv failures disappear from the linknamespace
test failures (however, similar fixes will also be needed for
fegetround, feholdexcept, fesetenv, fesetround and feupdateenv before
this set of namespace issues covered by bug 17748 is fully fixed and
those linknamespace tests start passing).
[BZ #17748]
* include/fenv.h (__fegetenv): Use libm_hidden_proto.
* math/fegetenv.c (__fegetenv): Use libm_hidden_def.
* sysdeps/aarch64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv
and define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/alpha/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
* sysdeps/arm/fegetenv.c (fegetenv): Rename to __fegetenv and
define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/hppa/fpu/fegetenv.c (fegetenv): Likewise.
* sysdeps/i386/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
* sysdeps/ia64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
* sysdeps/mips/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/powerpc/fpu/fegetenv.c (__fegetenv): Use
libm_hidden_def.
* sysdeps/powerpc/nofpu/fegetenv.c (__fegetenv): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (__fegetenv):
Likewise.
* sysdeps/s390/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise.
* sysdeps/sparc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
* sysdeps/tile/math_private.h (__fegetenv): New inline function.
* sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv
and define as weak alias of __fegetenv. Use libm_hidden_weak.
* sysdeps/generic/math_private.h (libc_feholdsetround_ctx): Use
__fegetenv instead of fegetenv.
(libc_feholdsetround_noex_ctx): Likewise.
Matthew Fortune [Sat, 31 May 2014 23:16:25 +0000 (00:16 +0100)]
Add support for MIPS O32 FPXX and .MIPS.abiflags
* elf/elf.h (PT_MIPS_ABIFLAGS): Define.
(Elf_MIPS_ABIFlags_v0): New structure.
(EF_MIPS_FP64): Define.
(MIPS_AFL_REG_NONE, MIPS_AFL_REG_32, MIPS_AFL_REG_64): Likewise.
(MIPS_AFL_REG_128, MIPS_AFL_ASE_DSP, MIPS_AFL_ASE_DSP64): Likewise.
(MIPS_AFL_ASE_DSPR2, MIPS_AFL_ASE_EVA, MIPS_AFL_ASE_MCU): Likewise.
(MIPS_AFL_ASE_MDMX, MIPS_AFL_ASE_MIPS3D, MIPS_AFL_ASE_MT): Likewise.
(MIPS_AFL_ASE_SMARTMIPS, MIPS_AFL_ASE_VIRT): Likewise.
(MIPS_AFL_ASE_VIRT64, MIPS_AFL_ASE_MSA, MIPS_AFL_ASE_MSA64): Likewise.
(MIPS_AFL_ASE_MIPS16, MIPS_AFL_ASE_MICROMIPS): Likewise.
(MIPS_AFL_ASE_XPA, MIPS_AFL_EXT_XLR, MIPS_AFL_EXT_OCTEON2): Likewise.
(MIPS_AFL_EXT_OCTEONP, MIPS_AFL_EXT_LOONGSON_3A): Likewise.
(MIPS_AFL_EXT_OCTEON, MIPS_AFL_EXT_5900, MIPS_AFL_EXT_4010): Likewise.
(MIPS_AFL_EXT_4100, MIPS_AFL_EXT_3900, MIPS_AFL_EXT_10000): Likewise.
(MIPS_AFL_EXT_SB1, MIPS_AFL_EXT_4111, MIPS_AFL_EXT_4120): Likewise.
(MIPS_AFL_EXT_5400, MIPS_AFL_EXT_5500): Likewise.
(MIPS_AFL_EXT_LOONGSON_2E, MIPS_AFL_EXT_LOONGSON_2F): Likewise.
(Val_GNU_MIPS_ABI_FP_ANY, Val_GNU_MIPS_ABI_FP_DOUBLE): New enum values.
(Val_GNU_MIPS_ABI_FP_SINGLE, Val_GNU_MIPS_ABI_FP_SOFT): Likewise.
(Val_GNU_MIPS_ABI_FP_OLD_64, Val_GNU_MIPS_ABI_FP_XX): Likewise.
(Val_GNU_MIPS_ABI_FP_64, Val_GNU_MIPS_ABI_FP_64A): Likewise.
(Val_GNU_MIPS_ABI_FP_MAX): Likewise.
* sysdeps/mips/Makefile [subdir=elf]: Add tst-abi-interlink,
tst-mode-switch-1, tst-mode-switch-2, tst-mode-switch-3 tests.
* sysdeps/mips/bits/linkmap.h (struct link_map_machine): Add fpmode
field.
* sysdeps/mips/dl-machine.h (elf_machine_matches_host): Reject
EF_MIPS_FP64.
* sysdeps/mips/dl-machine-reject-phdr.h: New file.
* sysdeps/mips/tst-abi-fp32mod.c: Likewise.
* sysdeps/mips/tst-abi-fpxxmod.c: Likewise.
* sysdeps/mips/tst-abi-fpxxomod.c: Likewise.
* sysdeps/mips/tst-abi-fp64mod.c: Likewise.
* sysdeps/mips/tst-abi-fp64amod.c: Likewise.
* sysdeps/mips/tst-abi-interlink.c: Likewise.
* sysdeps/mips/tst-mode-switch-1.c: Likewise.
* sysdeps/mips/tst-mode-switch-2.c: Likewise.
* sysdeps/mips/tst-mode-switch-3.c: Likewise.
* sysdeps/unix/sysv/linux/mips/configure.ac (o32-fpabi): Define to
record the current FP ABI extension.
(mips-mode-switch): Define to show if kernel headers support mode
switching.
* sysdeps/unix/sysv/linux/mips/configure: Regenerate.
* sysdeps/unix/sysv/linux/mips/ldsodefs.h: Increase maximum
supported SYSV ABI version to 3.
* sysdeps/unix/sysv/linux/mips/libc-abis: Add new MIPS_O32_FP64
feature.
Rajalakshmi Srinivasaraghavan [Wed, 31 Dec 2014 19:05:00 +0000 (14:05 -0500)]
powerpc: POWER7 strcpy optimization for unaligned strings
This patch optimizes strcpy for ppc64/power7 for unaligned source or
destination address. The source or destination address is aligned
to doubleword and data is shifted based on the alignment and
added with the previous loaded data to be written as a doubleword.
For each load, cmpb instruction is used for faster null check.
The word aligned optimization is also removed, since the new unaligned
code path shows better results handling word-aligned strings.
More combination of unaligned inputs is also added in benchtest
to measure the improvement.The new optimization shows 2 to 80% of
performance improvement for longer string though it does not show
big difference on string size less than 16 due to additional checks.
Joseph Myers [Wed, 31 Dec 2014 19:16:34 +0000 (19:16 +0000)]
Clean up powerpc fegetround / __fegetround inlines.
The natural fix for some linknamespace test failures, where C90 libm
functions call C99 <fenv.h> functions, is to make fe* into weak
aliases for __fe* and call __fe* from within libm as needed.
To do this, the __fe* names need to be available for that purpose -
that is, they must not be used for something other than aliases of
fe*. On powerpc, however, __fegetround is an inline function in
fenv_libc.h, with no corresponding fegetround inline function;
fegetround has an equivalent macro expansion in bits/fenvinline.h, but
that is disabled if __NO_MATH_INLINES (which is defined for building
libm).
I see no need for that disabling; it's not even clear that
__NO_MATH_INLINES should affect <fenv.h>, and the results of
fegetround are completely defined so there is no semantic effect of
that disabling at all outside glibc. The x86 inline feraiseexcept is
conditioned on __USE_EXTERN_INLINES not __NO_MATH_INLINES (but that's
an inline function rather than a macro).
This patch removes the __NO_MATH_INLINES conditional on that
fegetround macro, so resulting in it being expanded inline inside
glibc. In turn, this means that direct calls to __fegetround from C99
functions in ldbl-128ibm can be changed to calls to fegetround, so
that nofpu fenv_libc.h files don't need to define __fegetround at all
and, by changing ldbl-128ibm files to use <fenv.h> not <fenv_libc.h>,
non-e500 nofpu no longer needs an fenv_libc.h file.
The other macros in fenvinline.h are left conditional on
__NO_MATH_INLINES, although since the only case where this should make
a difference is one involving undefined behavior (if the argument to
the function is not a valid exception macro).
The out-of-line definition for fegetround uses __fegetround (the
inline function removed by this patch). So this continues to work,
the fenvinline.h header is made to define __fegetround, and then to
define fegetround to call __fegetround.
Tested for powerpc32 (hard float) that installed stripped shared
libraries are unchanged by this patch; also tested that powerpc-nofpu
build still works. (This patch does not itself fix any bugs; it
simply cleans things up in preparation for separate bug fixes.)
* sysdeps/powerpc/bits/fenvinline.h (fegetround): Rename macro to
__fegetround and redefine to call __fegetround. Remove condition
on [!__NO_MATH_INLINES].
* sysdeps/powerpc/fpu/fenv_libc.h (__fegetround): Remove inline
function.
* sysdeps/powerpc/nofpu/fenv_libc.h: Remove file.
* sysdeps/powerpc/powerpc32/e500/nofpu/fenv_libc.h (__fegetround):
Remove macro.
* sysdeps/ieee754/ldbl-128ibm/s_llrintl.c: Include <fenv.h>
instead of <fenv_libc.h>.
(__llrintl): Call fegetround instead of __fegetround.
* sysdeps/ieee754/ldbl-128ibm/s_llroundl.c: Include <fenv.h>
instead of <fenv_libc.h>.
* sysdeps/ieee754/ldbl-128ibm/s_lrintl.c: Likewise.
(__lrintl): Call fegetround instead of __fegetround.
* sysdeps/ieee754/ldbl-128ibm/s_lroundl.c: Include <fenv.h>
instead of <fenv_libc.h>.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c: Likewise.
(__rintl): Call fegetround instead of __fegetround.
Siddhesh Poyarekar [Wed, 31 Dec 2014 07:52:58 +0000 (13:22 +0530)]
Use one-dimension arrays in gen-posix-conf-vars.awk
True multi-dimensional arrays were introduced in awk 4.0 and we
support awk versions as early as 3.12. Use a single subscript of the
form prefix_conf instead of two dimensions to work around this
limitation. We also need one additional array of just the conf names
subscripted by the prefix_conf to print the names for the
specifications.
* scripts/gen-posix-conf-vars.awk: Don't use multi-dimensional
arrays.
H.J. Lu [Tue, 30 Dec 2014 22:30:37 +0000 (14:30 -0800)]
Don't check PI_STATIC_AND_HIDDEN in i386 dl-machine.h
PI_STATIC_AND_HIDDEN is always defined for i386. There is no need to
check PI_STATIC_AND_HIDDEN in sysdeps/i386/dl-machine.h.
[BZ #17775]
* sysdeps/i386/dl-machine.h (PI_STATIC_AND_HIDDEN): Removed.
(elf_machine_dynamic) [!PI_STATIC_AND_HIDDEN]: Likewise.
(elf_machine_load_address) [!PI_STATIC_AND_HIDDEN]: Likewise.
Andrew Senkevich [Tue, 30 Dec 2014 19:34:53 +0000 (11:34 -0800)]
i386: Fix build by GCC 5.0
Fixed 3 "make check" failures on glibc 32bit built by gcc 5.0 due to EBX
was enabled for allocation:
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg00892.html
Tests elf/tst-tls3, elf/tst-execstack-needed, elf/tst-execstack-prog
were failed because EBX was used as PIC register.
* sysdeps/i386/tls-macros.h: Include <features.h>.
(TLS_LE): Use non-PIC version for GCC >= 5.0.
(TLS_IE): Likewise.
(TLS_LD): Likewise.
(TLS_GD): Likewise.
* sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Don't
define for GCC >= 5.0.
Chris Metcalf [Tue, 30 Dec 2014 19:11:13 +0000 (14:11 -0500)]
Fix some warnings in the absence of FP round/exception support
Due to tile missing a bunch of FP exception and rounding
support, the tests generate warnings. These changes fix the
warnings by just not compiling some unused functions, and
adding some attribute ((unused)) tags.
H.J. Lu [Tue, 30 Dec 2014 17:32:50 +0000 (09:32 -0800)]
Mention i386 memcpy with SSE2 unaligned load/store
Joseph Myers [Tue, 30 Dec 2014 17:08:09 +0000 (17:08 +0000)]
Fix libm feraiseexcept namespace (bug 17723).
Various C90 and UNIX98 libm functions call feraiseexcept, which is not
in those standards. This causes linknamespace test failures - except
on x86 / x86_64, where feraiseexcept is inline (for the relevant
constant arguments) in bits/fenv.h.
This patch fixes this by making those functions call __feraiseexcept
instead. All changes are applied to all architectures rather than
considering the possibility that some might not be needed in some
cases (e.g. x86) as it seems most maintainable to keep architectures
consistent.
Where __feraiseexcept does not exist, it is added, with feraiseexcept
made a weak alias; where it is a strong alias, it is made weak.
libm_hidden_def / libm_hidden_proto are used with __feraiseexcept
(this might in some cases improve code generation for existing calls
to __feraiseexcept in some code on some architectures). Where there
are dummy feraiseexcept macros (on architectures without
floating-point exceptions support, to avoid compile errors from
references to undefined FE_* macros), corresponding dummy
__feraiseexcept macros are added. And on x86, to ensure
__feraiseexcept calls still get inlined, the inline function in
bits/fenv.h is refactored so that most of it can be reused in an
inline __feraiseexcept in a separate include/bits/fenv.h.
Calls are changed in C90/UNIX98 functions, but generally not in
functions missing from those standards. They are also changed in
libc_fe* functions (on the basis that those might be used in any libm
function), and in feupdateenv (on the same basis - may be used, via
default libc_*, in any libm function - of course feupdateenv will need
changing to __feupdateenv in a subsequent patch to make that fully
namespace-clean).
No __feraiseexcept is added corresponding to the feraiseexcept in
powerpc bits/fenvinline.h, because that macro definition is
conditional on !defined __NO_MATH_INLINES, and glibc libm is built
with -D__NO_MATH_INLINES, so changing internal calls to use
__feraiseexcept should make no difference.
Tested for x86_64 (testsuite; the only change in disassembly of
installed shared libraries is a slight code reordering in clog10, of
no apparent significance). Also tested for MIPS, where (in the
configuration tested) it eliminates math.h linknamespace failures for
n32 and n64 (some for o32 remain because of other issues).
[BZ #17723]
* include/fenv.h (__feraiseexcept): Use libm_hidden_proto.
* math/fraiseexcpt.c (__feraiseexcept): Use libm_hidden_def.
* sysdeps/aarch64/fpu/fraiseexcpt.c (feraiseexcept): Rename to
__feraiseexcept and define as weak alias of __feraiseexcept. Use
libm_hidden_weak.
* sysdeps/arm/fraiseexcpt.c (feraiseexcept): Likewise.
* sysdeps/hppa/fpu/fraiseexcpt.c (feraiseexcept): Likewise.
* sysdeps/i386/fpu/fraiseexcpt.c (__feraiseexcept): Use
libm_hidden_def.
* sysdeps/ia64/fpu/fraiseexcpt.c (feraiseexcept): Rename to
__feraiseexcept and define as weak alias of __feraiseexcept. Use
libm_hidden_weak.
* sysdeps/m68k/coldfire/fpu/fraiseexcpt.c (feraiseexcept):
Likewise.
* sysdeps/microblaze/math_private.h (__feraiseexcept): New macro.
* sysdeps/mips/fpu/fraiseexcpt.c (feraiseexcept): Rename to
__feraiseexcept and define as weak alias of __feraiseexcept. Use
libm_hidden_weak.
* sysdeps/powerpc/fpu/fraiseexcpt.c (__feraiseexcept): Use
libm_hidden_def.
* sysdeps/powerpc/nofpu/fraiseexcpt.c (__feraiseexcept): Likewise.
* sysdeps/powerpc/powerpc32/e500/nofpu/fraiseexcpt.c
(__feraiseexcept): Likewise.
* sysdeps/s390/fpu/fraiseexcpt.c (feraiseexcept): Rename to
__feraiseexcept and define as weak alias of __feraiseexcept. Use
libm_hidden_weak.
* sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Likewise.
* sysdeps/sparc/fpu/fraiseexcpt.c (__feraiseexcept): Use
libm_hidden_def.
* sysdeps/tile/math_private.h (__feraiseexcept): New macro.
* sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S (__feraiseexcept):
Use libm_hidden_def.
* sysdeps/x86_64/fpu/fraiseexcpt.c (__feraiseexcept): Use
libm_hidden_def.
(feraiseexcept): Define as weak not strong alias. Use
libm_hidden_weak.
* sysdeps/x86/fpu/bits/fenv.h (__feraiseexcept_invalid_divbyzero):
New inline function. Factored out of ...
(feraiseexcept): ... here. Use __feraiseexcept_invalid_divbyzero.
* sysdeps/x86/fpu/include/bits/fenv.h: New file.
* math/e_scalb.c (invalid_fn): Call __feraiseexcept instead of
feraiseexcept.
* math/w_acos.c (__acos): Likewise.
* math/w_asin.c (__asin): Likewise.
* math/w_ilogb.c (__ilogb): Likewise.
* math/w_j0.c (y0): Likewise.
* math/w_j1.c (y1): Likewise.
* math/w_jn.c (yn): Likewise.
* math/w_log.c (__log): Likewise.
* math/w_log10.c (__log10): Likewise.
* sysdeps/aarch64/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/aarch64/fpu/math_private.h
(libc_feupdateenv_test_aarch64): Likewise.
* sysdeps/alpha/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/arm/fenv_private.h (libc_feupdateenv_test_vfp): Likewise.
* sysdeps/arm/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/ia64/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/m68k/fpu/feupdateenv.c (__feupdateenv): Likewise.
* sysdeps/mips/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Likewise.
* sysdeps/s390/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sh/sh4/fpu/feupdateenv.c (feupdateenv): Likewise.
* sysdeps/sparc/fpu/feupdateenv.c (__feupdateenv): Likewise.
H.J. Lu [Tue, 30 Dec 2014 16:12:42 +0000 (08:12 -0800)]
Mention fix for BZ #17732
H.J. Lu [Fri, 19 Dec 2014 22:05:35 +0000 (14:05 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 22:04:35 +0000 (14:04 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 22:02:58 +0000 (14:02 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 22:01:40 +0000 (14:01 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 22:00:59 +0000 (14:00 -0800)]
Replace %ld/%lu with %jd/%ju and cast to intmax_t/uintmax_t
H.J. Lu [Fri, 19 Dec 2014 21:52:08 +0000 (13:52 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 21:51:13 +0000 (13:51 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 21:49:58 +0000 (13:49 -0800)]
Replace %ld with %jd and cast to intmax_t
H.J. Lu [Fri, 19 Dec 2014 21:48:40 +0000 (13:48 -0800)]
Replace %ld with %jd and cast to intmax_t
Andrew Senkevich [Mon, 29 Dec 2014 11:39:46 +0000 (14:39 +0300)]
i386: memcpy functions with SSE2 unaligned load/store
These new memcpy functions are the 32-bit version of x86_64 SSE2 unaligned
memcpy. Memcpy average performace benefit is 18% on Silvermont, other
platforms also improved about 35%, benchmarked on Silvermont, Haswell, Ivy
Bridge, Sandy Bridge and Westmere, performance results attached in
https://sourceware.org/ml/libc-alpha/2014-07/msg00157.html
* sysdeps/i386/i686/multiarch/bcopy-sse2-unaligned.S: New file.
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove-sse2-unaligned.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy-sse2-unaligned.S: Likewise.
* sysdeps/i386/i686/multiarch/bcopy.S: Select the sse2_unaligned
version if bit_Fast_Unaligned_Load is set.
* sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
bcopy-sse2-unaligned, memcpy-sse2-unaligned,
memmove-sse2-unaligned and mempcpy-sse2-unaligned.
* sysdeps/i386/i686/multiarch/ifunc-impl-list.c (MAX_IFUNC): Set
to 4.
(__libc_ifunc_impl_list): Test __bcopy_sse2_unaligned,
__memmove_chk_sse2_unaligned, __memmove_sse2_unaligned,
__memcpy_chk_sse2_unaligned, __memcpy_sse2_unaligned,
__mempcpy_chk_sse2_unaligned, and __mempcpy_sse2_unaligned.
Chris Metcalf [Tue, 30 Dec 2014 04:14:38 +0000 (23:14 -0500)]
Fix a couple of -Wundef warnings.
Chris Metcalf [Tue, 30 Dec 2014 00:48:43 +0000 (19:48 -0500)]
tile: prefer inlines to macros in math_private.h.
Chris Metcalf [Mon, 29 Dec 2014 15:58:25 +0000 (10:58 -0500)]
posix/Makefile: use $(objpfx) for files in before-compile.
This fixes a build failure with a separate build tree where
posix-conf-vars-def.h wasn't being built.
Siddhesh Poyarekar [Mon, 29 Dec 2014 12:13:19 +0000 (17:43 +0530)]
Make type for spec variable size as size_t
Siddhesh Poyarekar [Mon, 29 Dec 2014 12:10:47 +0000 (17:40 +0530)]
Use posix-conf-vars.list to generate spec array
This patch adds support to generate the spec array in getconf from the
conf.list. The generated code is mostly unchanged. the only changes
are due to the change in layout of the spec and val arrays in the ELF.
The val array can also be auto-generated from posix-conf-vars.list
once the remaining macros are added to it.
* posix/posix-conf-vars.list (SPEC:XBS5): Add sysconf prefix.
* posix/confstr.c: Define NEED_SPEC_ARRAY to 0.
* posix/posix-envs.def: Likewise.
* sysdeps/posix/sysconf.c: Likewise.
* posix/getconf.c: Define NEED_SPEC_ARRAY to 1.
(specs): Remove array.
* scripts/gen-posix-conf-vars.awk: Support generation of specs
array.
Siddhesh Poyarekar [Mon, 29 Dec 2014 12:09:30 +0000 (17:39 +0530)]
Add _POSIX namespace SYSCONF macros to posix-conf-vars.list
This fixes the remaining -Wundef warnings. Tested on x86_64.
* posix/posix-conf-vars.list: Add _POSIX sysconf namespace.
* sysdeps/posix/sysconf.c: Include posix-conf-vars.h.
(__sysconf): Use CONF_IS_* macros.
Siddhesh Poyarekar [Mon, 29 Dec 2014 12:07:54 +0000 (17:37 +0530)]
Remove Wundef warnings for specification macros
This patch adds a file posix-conf-vars.list that is used to generate
macros to determine if a macro is defined as set, unset or not
defined. gen-posix-conf-vars.awk processes this file and generates a
header (posix-conf-vars-def.h) with these macros. A new header
posix-conf-vars.h includes this generated header and defines accessor
macros for the generated macros.
Tested on x86_64.
* posix/Makefile (before-compile): Add posix-conf-vars-def.h.
($(objpfx)posix-conf-vars-def.h): New target.
* posix/posix-conf-vars.list: New file.
* posix/posix-conf-vars.h: New file.
* posix/confstr.c: Include posix-conf-vars.h.
(confstr): Use CONF_IS_* macros.
* posix/posix-envs.def: Include posix-conf-vars.h. Use
CONF_IS_* macros.
* scripts/gen-posix-conf-vars.awk: New file.
Chris Metcalf [Fri, 26 Dec 2014 23:39:47 +0000 (18:39 -0500)]
tile: add no-op fe*() routines for libc internal use
These avoid having tile generate real calls to the no-op
functions, which then causes linknamespace test failures.
It might make sense to factor all of these out into a common
header that can be shared by tile, microblaze, etc., but for
now just fix the test failures.
Chris Metcalf [Fri, 26 Dec 2014 21:34:02 +0000 (16:34 -0500)]
linux/clock_settime: remove unnecessary vDSO definitions
These definitions were added back before __ASSUME_POSIX_CPU_TIMERS
was removed. There used to be a vsyscall to clock_getres() in
maybe_syscall_settime_cpu(), but that function was removed in commit
26889eac. The presence of the vsyscall definitions means that platforms
that don't provide clock_getres as a vsyscall hit a symbol redefinition
warning in this file, becoming fatal with -Werror. Removing the
vsyscall definitions is the obvious fix.
No change to generated code on x86_64.
Chris Metcalf [Fri, 26 Dec 2014 21:22:28 +0000 (16:22 -0500)]
tilegx: fix sysdep.h to avoid a redefinition warning
The symbol for HAVE_CLOCK_GETTIME_VSYSCALL was being
only conditionally defined under [SHARED]. However, it turns
out this causes a preprocessor symbol redefinition warning
when building clock_gettime.o. Move the symbol definition
down to make it unconditional, like other platforms do.
Chris Metcalf [Fri, 26 Dec 2014 21:18:40 +0000 (16:18 -0500)]
tilegx32: avoid a a -Werror warning from unwinding
The _Unwind_GetCFA() routine returns a 64-bit value,
which we interpret as a pointer. Add an intermediate
cast to long so that in ILP32 mode we don't get a warning
about casting a wrong-sized integer to a pointer.
Chris Metcalf [Tue, 23 Dec 2014 19:04:35 +0000 (14:04 -0500)]
tilegx: enable wordsize-64 support for ieee745 dbl-64.
I missed this during the initial port. Some testing shows that
enabling this mode does, unsurprisingly, yield some nice speedups
on the math functions in question.
Richard Earnshaw [Tue, 23 Dec 2014 16:57:07 +0000 (08:57 -0800)]
* string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy.
Florian Weimer [Tue, 23 Dec 2014 15:16:32 +0000 (16:16 +0100)]
iconvdata/run-iconv-test.sh: Actually test iconv modules
Arjun Shankar noticed that this test case was not testing anything
because iconv was invoked without the required arguments.
Joseph Myers [Mon, 22 Dec 2014 21:42:03 +0000 (21:42 +0000)]
Make __ASSUME_UTIMES hppa-specific.
This patch makes __ASSUME_UTIMES hppa-specific, removing mentions of
the macro from architecture-independent code and code for other
architectures. (All other architectures either have the utimes
syscall in all relevant kernel versions, or use the asm-generic
interface so only have utimensat and won't get the utimes syscall.) A
similar approach is used to that used for futimesat for MicroBlaze: if
the kernel is recent enough that the utimes syscall can be assumed to
be present, use the implementation in terms of the utimes syscall, and
otherwise use the linux/generic implementation in terms of utimensat.
Tested x86_64 that the disassembly of installed shared libraries is
unchanged by the patch. Not tested for hppa.
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_UTIMES): Do
not define.
* sysdeps/unix/sysv/linux/utimes.c: Do not include
<kernel-features.h>.
(__utimes) [__NR_utimes]: Make code unconditional.
(__utimes) [!__ASSUME_UTIMES]: Remove conditional code.
* sysdeps/unix/sysv/linux/aarch64/kernel-features.h
(__ASSUME_UTIMES): Do not undefine.
* sysdeps/unix/sysv/linux/tile/kernel-features.h
(__ASSUME_UTIMES): Likewise.
* sysdeps/unix/sysv/linux/hppa/kernel-features.h
(__ASSUME_UTIMES): Define for [__LINUX_KERNEL_VERSION >= 0x030e00]
instead of undefining for [__LINUX_KERNEL_VERSION < 0x030e00].
* sysdeps/unix/sysv/linux/hppa/utimes.c: New file.
Steve Ellcey [Mon, 22 Dec 2014 21:29:20 +0000 (13:29 -0800)]
Fix preprocessor indentation in sysdeps/mips/memcpy.S.
Checked in as obvious.
Chris Metcalf [Mon, 22 Dec 2014 21:24:32 +0000 (16:24 -0500)]
NEWS: mention bug fix for 17747.
Chris Metcalf [Mon, 22 Dec 2014 20:24:17 +0000 (15:24 -0500)]
Fix namespace conformance issue with Bessel functions.
[BZ #17747]
The y0/y1/yn and j0/j1/jn functions provided a strong_alias
to the "l"-suffixed variants when no long double support is
being compiled. This breaks namespace conformance when the
basename versions conform but the l-suffixed ones don't.
Fixed by making them weak aliases instead.
Chris Metcalf [Mon, 22 Dec 2014 19:50:26 +0000 (14:50 -0500)]
tilegx: remove implicit boolean conversion in strstr.
[BZ #17746]
The __builtin_expect() truncated a uint64_t to a 32-bit long
in ILP32 mode, discarding the high 32 bits, and potentially
missing the NUL terminator that we were searching for with SIMD
operations. Explicitly compare to zero to fix the problem.
Chris Metcalf [Mon, 22 Dec 2014 19:45:02 +0000 (14:45 -0500)]
Update NEWS and ChangeLog with two tile bug fixes.
I committed fixes without references to bug numbers.
Bug 17744: commit
95dee05f.
Bug 17745: commit
e969965a.
Steve Ellcey [Mon, 22 Dec 2014 18:49:56 +0000 (10:49 -0800)]
2014-12-22 Steve Ellcey <sellcey@imgtec.com>
* sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Set
to zero if not already defined.
Joseph Myers [Mon, 22 Dec 2014 18:45:50 +0000 (18:45 +0000)]
Split __kernel_standard* functions (fixes bug 17724).
Bug 17724 reports references to fesetround being brought in by
ldbl-128ibm rintl via references to __rintl from __kernel_standard_l.
Because all three __kernel_standard* functions are in the same file,
this gets brought in even though only the long double version
__kernel_standard_l needs __rintl, and the C90 functions use only
__kernel_standard.
This patch fixes this by splitting the three versions into separate
files; it's fine for long double functions to refer to fe* functions
directly, unless they get called by C90 double functions.
Tested for x86_64 (testsuite; the reordering of code means disassembly
of shared libraries can't usefully be compared). Tested for powerpc
that the relevant issue disappears from the linknamespace test
output.
[BZ #17724]
* sysdeps/ieee754/k_standard.c: Don't include <float.h>.
(__kernel_standard_f): Remove. Moved to k_standardf.c.
(__kernel_standard_l): Remove. Moved to k_standardl.c with
(char *) casts added.
* sysdeps/ieee754/k_standardf.c: New file.
* sysdeps/ieee754/k_standardl.c: Likewise.
* math/Makefile (libm-support): Remove k_standard.
(libm-calls): Add k_standard.
Steve Ellcey [Mon, 22 Dec 2014 18:36:49 +0000 (10:36 -0800)]
Remove trailing whitespace.
Steve Ellcey [Mon, 22 Dec 2014 18:35:32 +0000 (10:35 -0800)]
Add missing ChangeLog entries from Friday (Dec 19, 2014).
Wilco Dijkstra [Mon, 22 Dec 2014 17:11:18 +0000 (17:11 +0000)]
Optimize to avoid an unnecessary FPCR read.
Wilco Dijkstra [Mon, 22 Dec 2014 17:07:16 +0000 (17:07 +0000)]
Optimize to reduce FPCR/FPSR accesses.
Wilco Dijkstra [Mon, 22 Dec 2014 17:01:33 +0000 (17:01 +0000)]
Call libc_fetestexcept_aarch64.
Wilco Dijkstra [Mon, 22 Dec 2014 16:57:41 +0000 (16:57 +0000)]
Call libc_fesetround_aarch64.