[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r22801 - in /fsf/trunk/libc: ./ elf/ localedata/locales/ math/ sysdeps/i386/ sysdeps/s390/s390-32/ sysdeps/s390/s390-64/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r22801 - in /fsf/trunk/libc: ./ elf/ localedata/locales/ math/ sysdeps/i386/ sysdeps/s390/s390-32/ sysdeps/s390/s390-64/
- From: eglibc@xxxxxxxxxx
- Date: Sun, 07 Apr 2013 00:02:01 -0000
Author: eglibc
Date: Sun Apr 7 00:02:00 2013
New Revision: 22801
Log:
Import glibc-mainline for 2013-04-07
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/Makefile.in
fsf/trunk/libc/NEWS
fsf/trunk/libc/README
fsf/trunk/libc/aclocal.m4
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/elf/dl-open.c
fsf/trunk/libc/localedata/locales/fi_FI
fsf/trunk/libc/math/Makefile
fsf/trunk/libc/math/README.libm-test
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/sysdeps/i386/configure
fsf/trunk/libc/sysdeps/i386/configure.in
fsf/trunk/libc/sysdeps/s390/s390-32/sysdep.h
fsf/trunk/libc/sysdeps/s390/s390-64/sysdep.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Apr 7 00:02:00 2013
@@ -1,3 +1,47 @@
+2013-04-06 Carlos O'Donell <carlos@xxxxxxxxxx>
+
+ * math/README.libm-test (How can I generate "libm-test-ulps"?):
+ Use testrun.sh to run libm tests.
+
+ [BZ #15309]
+ * elf/dl-open.c (dl_open_worker): memset all of seen array.
+
+2013-04-06 Marko Myllynen <myllynen@xxxxxxxxxx>
+
+ [BZ #15264]
+ * locales/fi_FI (LC_MESSAGES): Define yesstr and nostr.
+
+2013-04-06 Carlos O'Donell <carlos@xxxxxxxxxx>
+
+ * Makefile.in (regen-ulps): New target.
+ * math/Makefile [ifneq (no,$(PERL)]: Declare regen-ulps with .PHONY.
+ [ifneq (no,$(PERL)] (run-regen-ulps): New variable.
+ [ifneq (no,$(PERL)] (regen-ulps): New target.
+ [ifeq (no,$(PERL)] (regen-ulps): New target.
+ * math/libm-test.inc (ulps_file_name): Define.
+ (output_dir): New variable.
+ (options): Add "output-dir" option.
+ (parse_opt): Handle 'o' case.
+ (main): If output_dir is non-NULL use it as a prefix
+ otherwise use "".
+ * math/README.libm-test: Update `How can I generate "libm-test-ulps"?'
+
+2013-04-06 Carlos O'Donell <carlos@xxxxxxxxxx>
+
+ [BZ #10060, #10062]
+ * aclocal.m4 (LIBC_COMPILER_BUILTIN_INLINED): New macro.
+ * sysdeps/i386/configure.in: Use LIBC_COMPILER_BUILTIN_INLINED and
+ fail configure if __sync_val_compare_and_swap is not inlined.
+ * sysdeps/i386/configure: Regenerate.
+ * configure.in: Build for i686 when configured for i386.
+ * configure: Regenerate.
+ * README: Remove i386 reference.
+
+2013-04-06 Carlos O'Donell <carlos@xxxxxxxxxx>
+
+ * sysdeps/s390/s390-32/sysdep.h: Undefine PSEUDO before redefinition.
+ * sysdeps/s390/s390-64/sysdep.h: Likewise.
+
2013-04-05 Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
* stdio-common/tstdiomisc.c (snanval, msnanval, lsnanval)
Modified: fsf/trunk/libc/Makefile.in
==============================================================================
--- fsf/trunk/libc/Makefile.in (original)
+++ fsf/trunk/libc/Makefile.in Sun Apr 7 00:02:00 2013
@@ -14,3 +14,7 @@
bench:
$(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
+
+# Convenience target to rebuild ULPs for all math tests.
+regen-ulps:
+ $(MAKE) -C $(srcdir)/math $(PARALLELMFLAGS) objdir=`pwd` $@
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Apr 7 00:02:00 2013
@@ -9,11 +9,12 @@
* The following bugs are resolved with this release:
- 10357, 11120, 11561, 12723, 13550, 13889, 13951, 14142, 14176, 14200,
- 14317, 14327, 14478, 14496, 14686, 14812, 14920, 14964, 14981, 14982,
- 14985, 14994, 14996, 15003, 15006, 15020, 15023, 15036, 15054, 15055,
- 15062, 15078, 15160, 15214, 15232, 15234, 15283, 15285, 15287, 15304,
- 15305, 15307, 15327, 15330, 15335, 15336, 15337, 15342.
+ 10060, 10062, 10357, 11120, 11561, 12723, 13550, 13889, 13951, 14142,
+ 14176, 14200, 14317, 14327, 14478, 14496, 14686, 14812, 14920, 14964,
+ 14981, 14982, 14985, 14994, 14996, 15003, 15006, 15020, 15023, 15036,
+ 15054, 15055, 15062, 15078, 15160, 15214, 15232, 15234, 15283, 15285,
+ 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335, 15336, 15337,
+ 15342.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
Modified: fsf/trunk/libc/README
==============================================================================
--- fsf/trunk/libc/README (original)
+++ fsf/trunk/libc/README Sun Apr 7 00:02:00 2013
@@ -12,7 +12,7 @@
In GNU/Hurd systems, it works with a microkernel and Hurd servers.
The GNU C Library implements much of the POSIX.1 functionality in the
-GNU/Hurd system, using configurations i[34567]86-*-gnu. The current
+GNU/Hurd system, using configurations i[4567]86-*-gnu. The current
GNU/Hurd support requires out-of-tree patches that will eventually be
incorporated into an official GNU C Library release.
Modified: fsf/trunk/libc/aclocal.m4
==============================================================================
--- fsf/trunk/libc/aclocal.m4 (original)
+++ fsf/trunk/libc/aclocal.m4 Sun Apr 7 00:02:00 2013
@@ -248,3 +248,36 @@
AC_DEFUN([LIBC_CONFIG_VAR],
[config_vars="$config_vars
$1 = $2"])
+
+dnl Check that function FUNC was inlined as a builtin. The code fragment
+dnl CODE is compiled with additional options CC_OPTION. If FUNC is
+dnl not found in the assembly then it is assumed the compiler has support
+dnl for this builtin and has inlined the call. If the compiler has the
+dnl feature then ACTION-IF-TRUE is called, otherwise ACTION-IF-FALSE.
+dnl It is up to the caller to provide a CC_OPTION that ensures the
+dnl builtin is inlined if present.
+dnl Warning: This may not work for some machines. For example on ARM the
+dnl ABI dictates that some functions should not be inlined and instead
+dnl should be provided by a compiler helper library e.g. __aeabi_memcpy.
+dnl This is done to reduce code size.
+dnl LIBC_COMPILER_BUILTIN([func], [code], [cc_option], [action-if-true], [action-if-false])
+AC_DEFUN([LIBC_COMPILER_BUILTIN_INLINED],
+[AC_MSG_CHECKING([for compiler support of inlined builtin function $1])
+libc_compiler_builtin_inlined=no
+cat > conftest.c <<EOF
+int _start (void) { $2 return 0; }
+EOF
+if ! AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ $3 -nostdlib -nostartfiles
+ -S conftest.c -o - | fgrep "$1"
+ 1>&AS_MESSAGE_LOG_FD])
+then
+ libc_compiler_builtin_inlined=yes
+fi
+rm -f conftest*
+if test $libc_compiler_builtin_inlined = yes; then
+ $4
+else
+ $5
+fi
+AC_MSG_RESULT($libc_compiler_builtin_inlined)])
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun Apr 7 00:02:00 2013
@@ -3741,6 +3741,15 @@
;;
esac
+# Configure for i686 if the user asks for i386. We don't support
+# i386 any more but it continues to be common for users to configure
+# 32-bit x86 as i386. We build for i686 instead.
+if test "$machine" = i386; then
+ machine="i686"
+ echo "\
+*** WARNING: Support for i386 is deprecated. Building for i686 instead."
+fi
+
submachine=
# Check whether --with-cpu was given.
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun Apr 7 00:02:00 2013
@@ -389,6 +389,15 @@
with_fp=no
;;
esac
+
+# Configure for i686 if the user asks for i386. We don't support
+# i386 any more but it continues to be common for users to configure
+# 32-bit x86 as i386. We build for i686 instead.
+if test "$machine" = i386; then
+ machine="i686"
+ echo "\
+*** WARNING: Support for i386 is deprecated. Building for i686 instead."
+fi
submachine=
AC_ARG_WITH([cpu],
Modified: fsf/trunk/libc/elf/dl-open.c
==============================================================================
--- fsf/trunk/libc/elf/dl-open.c (original)
+++ fsf/trunk/libc/elf/dl-open.c Sun Apr 7 00:02:00 2013
@@ -344,7 +344,7 @@
if (nmaps > 1)
{
uint16_t seen[nmaps];
- memset (seen, '\0', nmaps);
+ memset (seen, '\0', sizeof (seen));
size_t i = 0;
while (1)
{
Modified: fsf/trunk/libc/localedata/locales/fi_FI
==============================================================================
--- fsf/trunk/libc/localedata/locales/fi_FI (original)
+++ fsf/trunk/libc/localedata/locales/fi_FI Sun Apr 7 00:02:00 2013
@@ -212,6 +212,8 @@
LC_MESSAGES
yesexpr "<U005E><U005B><U004B><U006B><U0059><U0079><U005D><U002E><U002A>"
noexpr "<U005E><U005B><U0045><U0065><U004E><U006E><U005D><U002E><U002A>"
+yesstr "<U004B><U0079><U006C><U006C><U00E4>"
+nostr "<U0045><U0069>"
END LC_MESSAGES
LC_PAPER
Modified: fsf/trunk/libc/math/Makefile
==============================================================================
--- fsf/trunk/libc/math/Makefile (original)
+++ fsf/trunk/libc/math/Makefile Sun Apr 7 00:02:00 2013
@@ -150,6 +150,33 @@
include ../Rules
+ifneq (no,$(PERL))
+# Run the math programs to automatically generate ULPs files.
+.PHONY: regen-ulps
+
+run-regen-ulps = $(test-wrapper-env) \
+ GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
+ $($*-ENV) $(run-via-rtld-prefix) $${run}
+
+regen-ulps: $(addprefix $(objpfx),$(libm-tests))
+ rm -f $(objpfx)ULPs; rm -f $(objpfx)NewUlps; \
+ cp $(ulps-file) $(objpfx)libm-test-ulps; \
+ for run in $^; do \
+ echo "Regenerating ULPs for $${run}"; \
+ $(run-regen-ulps) -u -o $(objpfx); \
+ cat $(objpfx)ULPs >> $(objpfx)libm-test-ulps; \
+ rm $(objpfx)ULPs; \
+ done; \
+ $(PERL) gen-libm-test.pl -o $(objpfx) -n -u $(objpfx)libm-test-ulps; \
+ echo "Automatic regeneration of ULPs complete."; \
+ echo "Difference between the current baseline and the new baseline is:";\
+ diff -urN $(ulps-file) $(objpfx)NewUlps; \
+ echo "Copy $(objpfx)NewUlps to $(ulps-file) (relative to source)."
+else
+regen-ulps:
+ @echo "Automatic regeneration of ULPs requires perl."; \
+ exit 1;
+endif
# The generated sysd-rules file defines rules like this for sources
# coming from sysdeps/ directories. These rules find the generic sources.
Modified: fsf/trunk/libc/math/README.libm-test
==============================================================================
--- fsf/trunk/libc/math/README.libm-test (original)
+++ fsf/trunk/libc/math/README.libm-test Sun Apr 7 00:02:00 2013
@@ -39,24 +39,32 @@
How can I generate "libm-test-ulps"?
====================================
-The test drivers have an option "-u" to output an unsorted list of all
-epsilons that the functions have. The output can be read in directly
-but it's better to pretty print it first. "gen-libm-test.pl" has an option
-to generate a pretty-printed and sorted new ULPs file from the output
-of the test drivers.
+To automatically generate a new "libm-test-ulps" run "make regen-ulps".
+This generates the file "math/NewUlps" in the build directory. The file
+contains the sorted results of all the tests. You can use the "NewUlps"
+file as the machine's updated "libm-test-ulps" file. Copy "NewUlps" to
+"libm-test-ulps" in the appropriate machine sysdep directory. Verify
+the changes, post your patch, and check it in after review.
-To generate a new "libm-test-ulps" file, first remove "ULPs" file in the
-current directory, then you can execute for example:
-test-double -u --ignore-max-ulp=yes
+To manually generate a new "libm-test-ulps" file, first remove "ULPs"
+file in the current directory, then you can execute for example:
+ ./testrun.sh math/test-double -u --ignore-max-ulp=yes
This generates a file "ULPs" with all double ULPs in it, ignoring any
-previous calculated ULPs.
-Now generate the ULPs for all other formats, the tests will be appending
-the data to the "ULPs" file. As final step run "gen-libm-test.pl" with the
-file as input and ask to generate a pretty printed output in the file "NewUlps":
+previously calculated ULPs, and running with the newly built dynamic
+loader and math library (assumes you didn't install your build). Now
+generate the ULPs for all other formats, the tests will be appending the
+data to the "ULPs" file. As final step run "gen-libm-test.pl" with the
+file as input and ask to generate a pretty printed output in the file
+"NewUlps":
gen-libm-test.pl -u ULPs -n
+Copy "NewUlps" to "libm-test-ulps" in the appropriate machine sysdep
+directory.
-Now you can rename "NewUlps" to "libm-test-ulps" and move it into
-sysdeps.
+Note that the test drivers have an option "-u" to output an unsorted
+list of all epsilons that the functions have. The output can be read
+in directly but it's better to pretty print it first.
+"gen-libm-test.pl" has an option to generate a pretty-printed and
+sorted new ULPs file from the output of the test drivers.
Contents of libm-test-ulps
==========================
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Sun Apr 7 00:02:00 2013
@@ -210,8 +210,10 @@
#define M_PI_LOG10El M_PIl * M_LOG10El
#define M_SQRT_2_2 0.70710678118654752440084436210484903L /* sqrt (2) / 2 */
-static FILE *ulps_file; /* File to document difference. */
-static int output_ulps; /* Should ulps printed? */
+#define ulps_file_name "ULPs" /* Name of the ULPs file. */
+static FILE *ulps_file; /* File to document difference. */
+static int output_ulps; /* Should ulps printed? */
+static char *output_dir; /* Directory where generated files will be written. */
static int noErrors; /* number of errors */
static int noTests; /* number of tests (without testing exceptions) */
@@ -12985,6 +12987,8 @@
"Don't output results of functions invocations"},
{ "ignore-max-ulp", 'i', "yes/no", 0,
"Ignore given maximal errors"},
+ { "output-dir", 'o', "DIR", 0,
+ "Directory where generated files will be placed"},
{ NULL, 0, NULL, 0, NULL }
};
@@ -13015,6 +13019,13 @@
ignore_max_ulp = 1;
else if (strcmp (arg, "no") == 0)
ignore_max_ulp = 0;
+ break;
+ case 'o':
+ output_dir = (char *) malloc (strlen (arg) + 1);
+ if (output_dir != NULL)
+ strcpy (output_dir, arg);
+ else
+ return errno;
break;
case 'p':
output_points = 0;
@@ -13065,11 +13076,14 @@
{
int remaining;
+ char *ulps_file_path;
+ size_t dir_len = 0;
verbose = 1;
output_ulps = 0;
output_max_error = 1;
output_points = 1;
+ output_dir = NULL;
/* XXX set to 0 for releases. */
ignore_max_ulp = 0;
@@ -13085,7 +13099,16 @@
if (output_ulps)
{
- ulps_file = fopen ("ULPs", "a");
+ if (output_dir != NULL)
+ dir_len = strlen (output_dir);
+ ulps_file_path = (char *) malloc (dir_len + strlen (ulps_file_name) + 1);
+ if (ulps_file_path == NULL)
+ {
+ perror ("can't allocate path for `ULPs' file: ");
+ exit (1);
+ }
+ sprintf (ulps_file_path, "%s%s", output_dir == NULL ? "" : output_dir, ulps_file_name);
+ ulps_file = fopen (ulps_file_path, "a");
if (ulps_file == NULL)
{
perror ("can't open file `ULPs' for writing: ");
Modified: fsf/trunk/libc/sysdeps/i386/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure (original)
+++ fsf/trunk/libc/sysdeps/i386/configure Sun Apr 7 00:02:00 2013
@@ -32,6 +32,45 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
+# The GNU C Library can't be built for i386. There are several reasons for
+# this restriction. The primary reason is that i386 lacks the atomic
+# operations required to support the current NPTL implementation. While it is
+# possible that such atomic operations could be emulated in the kernel to date
+# no such work has been done to enable this. Even with NPTL disabled you still
+# have no atomic.h implementation. Given the declining use of i386 we disable
+# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly
+# check for i386, instead we make sure the compiler has support for inlining
+# the builtin __sync_val_compare_and_swap. If it does then we should have no
+# problem building for i386.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler support of inlined builtin function __sync_val_compare_and_swap" >&5
+$as_echo_n "checking for compiler support of inlined builtin function __sync_val_compare_and_swap... " >&6; }
+libc_compiler_builtin_inlined=no
+cat > conftest.c <<EOF
+int _start (void) { int a, b, c; __sync_val_compare_and_swap (&a, b, c); return 0; }
+EOF
+if ! { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -O0 -nostdlib -nostartfiles
+ -S conftest.c -o - | fgrep "__sync_val_compare_and_swap"
+ 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then
+ libc_compiler_builtin_inlined=yes
+fi
+rm -f conftest*
+if test $libc_compiler_builtin_inlined = yes; then
+ libc_cv_unsupported_i386=no
+else
+ as_fn_error $? "
+*** Building with -march=i386/-mcpu=i386 is not supported.
+*** Please use host i786, i686, i586, or i486." "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_compiler_builtin_inlined" >&5
+$as_echo "$libc_compiler_builtin_inlined" >&6; }
+
ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
"
Modified: fsf/trunk/libc/sysdeps/i386/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure.in (original)
+++ fsf/trunk/libc/sysdeps/i386/configure.in Sun Apr 7 00:02:00 2013
@@ -1,5 +1,24 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/i386.
+
+# The GNU C Library can't be built for i386. There are several reasons for
+# this restriction. The primary reason is that i386 lacks the atomic
+# operations required to support the current NPTL implementation. While it is
+# possible that such atomic operations could be emulated in the kernel to date
+# no such work has been done to enable this. Even with NPTL disabled you still
+# have no atomic.h implementation. Given the declining use of i386 we disable
+# support for building with `-march=i386' or `-mcpu=i386.' We don't explicitly
+# check for i386, instead we make sure the compiler has support for inlining
+# the builtin __sync_val_compare_and_swap. If it does then we should have no
+# problem building for i386.
+LIBC_COMPILER_BUILTIN_INLINED(
+ [__sync_val_compare_and_swap],
+ [int a, b, c; __sync_val_compare_and_swap (&a, b, c);],
+ [-O0],
+ [libc_cv_unsupported_i386=no],
+ [AC_MSG_ERROR([
+*** Building with -march=i386/-mcpu=i386 is not supported.
+*** Please use host i786, i686, i586, or i486.])])
AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
Modified: fsf/trunk/libc/sysdeps/s390/s390-32/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-32/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-32/sysdep.h Sun Apr 7 00:02:00 2013
@@ -65,6 +65,7 @@
#define syscall_error __syscall_error
#define mcount _mcount
+#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
lose: SYSCALL_PIC_SETUP \
basr %r1,0; \
Modified: fsf/trunk/libc/sysdeps/s390/s390-64/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/s390/s390-64/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/s390/s390-64/sysdep.h Sun Apr 7 00:02:00 2013
@@ -63,6 +63,7 @@
#define syscall_error __syscall_error
#define mcount _mcount
+#undef PSEUDO
#define PSEUDO(name, syscall_name, args) \
lose: SYSCALL_PIC_SETUP \
jg JUMPTARGET(syscall_error); \
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits