[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r22682 - in /fsf/trunk/libc: ./ locale/programs/ ports/ ports/sysdeps/arm/ ports/sysdeps/unix/sysv/linux/arm/ stdlib/ sysdep...



Author: eglibc
Date: Thu Mar 21 00:01:40 2013
New Revision: 22682

Log:
Import glibc-mainline for 2013-03-21

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makerules
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/aclocal.m4
    fsf/trunk/libc/config.make.in
    fsf/trunk/libc/configure
    fsf/trunk/libc/configure.in
    fsf/trunk/libc/locale/programs/localedef.c
    fsf/trunk/libc/ports/ChangeLog.arm
    fsf/trunk/libc/ports/sysdeps/arm/configure
    fsf/trunk/libc/ports/sysdeps/arm/configure.in
    fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile
    fsf/trunk/libc/stdlib/stdlib.h
    fsf/trunk/libc/sysdeps/i386/configure
    fsf/trunk/libc/sysdeps/i386/configure.in
    fsf/trunk/libc/sysdeps/mach/configure
    fsf/trunk/libc/sysdeps/mach/configure.in
    fsf/trunk/libc/sysdeps/posix/libc_fatal.c
    fsf/trunk/libc/sysdeps/sparc/configure
    fsf/trunk/libc/sysdeps/sparc/configure.in
    fsf/trunk/libc/sysdeps/unix/sysv/linux/libc_fatal.c
    fsf/trunk/libc/sysdeps/x86_64/configure
    fsf/trunk/libc/sysdeps/x86_64/configure.in

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Mar 21 00:01:40 2013
@@ -1,3 +1,75 @@
+2013-03-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* aclocal.m4 (LIBC_CONFIG_VAR): New autoconf macro.
+	* config.make.in (config-cflags-sse4): Remove variable.
+	(config-cflags-avx): Likewise.
+	(config-cflags-sse2avx): Likewise.
+	(config-cflags-novzeroupper): Likewise.
+	(config-asflags-i686): Likewise.
+	(have-mfma4): Likewise.
+	(have-as-vis3): Likewise.
+	(MIG): Likewise.
+	* configure.in (MIG): Do not AC_SUBST.
+	(libc_cv_cc_nofma): Move AC_SUBST next to configure test.
+	(libc_cv_cc_sse4): Do not AC_SUBST.
+	(libc_cv_cc_avx): Likewise.
+	(libc_cv_cc_sse2avx): Likewise.
+	(libc_cv_cc_novzeroupper): Likewise.
+	(libc_cv_cc_fma4): Likewise.
+	(libc_cv_as_i686): Likewise.
+	(libc_cv_sparc_as_vis3): Likewise.
+	* sysdeps/i386/configure.in (config-cflags-sse4): Set using
+	LIBC_CONFIG_VAR.
+	(config-asflags-i686): Likewise.
+	(config-cflags-avx): Likewise.
+	(config-cflags-sse2avx): Likewise.
+	(have-mfma4): Likewise.
+	(config-cflags-novzeroupper): Likewise.
+	* sysdeps/mach/configure.in (MIG): Likewise.
+	* sysdeps/sparc/configure.in (have-as-vis3): Likewise.
+	* sysdeps/x86_64/configure.in (config-cflags-sse4): Set using
+	LIBC_CONFIG_VAR.
+	(config-cflags-avx): Likewise.
+	(config-cflags-sse2avx): Likewise.
+	(have-mfma4): Likewise.
+	(config-cflags-novzeroupper): Likewise.
+	* configure: Regenerated.
+	* sysdeps/i386/configure: Likewise.
+	* sysdeps/mach/configure: Likewise.
+	* sysdeps/sparc/configure: Likewise.
+	* sysdeps/x86_64/configure: Likewise.
+
+2013-03-20  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	[BZ #14812]
+	* locale/programs/localedef.c (options): Put N_ translation marker
+	on argument names, not just descriptions.
+
+2013-03-20  Marcus Shawcroft  <marcus.shawcroft@xxxxxxxxxx>
+
+	* Makerules ($(inst_libdir)/libc.so): Use $(rtlddir).
+
+2013-03-20  OndÃÂej BÃÂlka  <neleai@xxxxxxxxx>
+
+	[BZ #14176]
+	* stdlib/stdlib.h (mblen, mbtowc, wctomb): Remove __wur.
+
+2013-03-19  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* sysdeps/posix/libc_fatal.c: Include <sys/mman.h>.
+	[!WRITEV_FOR_FATAL] (writev_for_fatal): New function.
+	[!WRITEV_FOR_FATAL] (WRITEV_FOR_FATAL): New macro; call that.
+	[!BEFORE_ABORT] (before_abort): New function.
+	[!BEFORE_ABORT] (BEFORE_ABORT): New macro; call that.
+	* sysdeps/unix/sysv/linux/libc_fatal.c: Trim includes.
+	(writev_for_fatal): New function.
+	(WRITEV_FOR_FATAL): New macro; call that.
+	(backtrace_and_maps): New function.
+	(BEFORE_ABORT): New macro; call that.
+	(struct str_list): Type removed.
+	(__libc_message, __libc_fatal): Functions removed.
+	Include <sysdeps/posix/libc_fatal.c> instead.
+
 2013-03-19  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* math/k_casinhf.c (__kernel_casinhf): Consistently use float

Modified: fsf/trunk/libc/Makerules
==============================================================================
--- fsf/trunk/libc/Makerules (original)
+++ fsf/trunk/libc/Makerules Thu Mar 21 00:01:40 2013
@@ -928,7 +928,7 @@
 	 cat $<; \
 	 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
 	      '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
-	      ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
+	      ' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
 	) > $@.new
 	mv -f $@.new $@
 

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Mar 21 00:01:40 2013
@@ -9,9 +9,10 @@
 
 * The following bugs are resolved with this release:
 
-  11561, 12723, 13550, 13951, 14142, 14200, 14317, 14327, 14496, 14920,
-  14964, 14981, 14982, 14985, 14994, 14996, 15003, 15006, 15020, 15023,
-  15036, 15054, 15055, 15062, 15078, 15160, 15232, 15234, 15283.
+  11561, 12723, 13550, 13951, 14142, 14176, 14200, 14317, 14327, 14496,
+  14812, 14920, 14964, 14981, 14982, 14985, 14994, 14996, 15003, 15006,
+  15020, 15023, 15036, 15054, 15055, 15062, 15078, 15160, 15232, 15234,
+  15283.
 
 * Add support for calling C++11 thread_local object destructors on thread
   and program exit.  This needs compiler support for offloading C++11

Modified: fsf/trunk/libc/aclocal.m4
==============================================================================
--- fsf/trunk/libc/aclocal.m4 (original)
+++ fsf/trunk/libc/aclocal.m4 Thu Mar 21 00:01:40 2013
@@ -241,3 +241,10 @@
   $4
 fi
 AC_MSG_RESULT($libc_linker_feature)])
+
+dnl Add a makefile variable, with value set from a shell string
+dnl (expanded by the shell inside double quotes), to config.make.
+dnl LIBC_CONFIG_VAR(make-variable, shell-value)
+AC_DEFUN([LIBC_CONFIG_VAR],
+[config_vars="$config_vars
+$1 = $2"])

Modified: fsf/trunk/libc/config.make.in
==============================================================================
--- fsf/trunk/libc/config.make.in (original)
+++ fsf/trunk/libc/config.make.in Thu Mar 21 00:01:40 2013
@@ -37,12 +37,7 @@
 asflags-cpu = @libc_cv_cc_submachine@
 
 config-extra-cflags = @libc_extra_cflags@
-config-cflags-sse4 = @libc_cv_cc_sse4@
-config-cflags-avx = @libc_cv_cc_avx@
-config-cflags-sse2avx = @libc_cv_cc_sse2avx@
-config-cflags-novzeroupper = @libc_cv_cc_novzeroupper@
 config-cflags-nofma = @libc_cv_cc_nofma@
-config-asflags-i686 = @libc_cv_as_i686@
 
 defines = @DEFINES@
 sysheaders = @sysheaders@
@@ -58,8 +53,6 @@
 unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
 have-forced-unwind = @libc_cv_forced_unwind@
 have-fpie = @libc_cv_fpie@
-have-mfma4 = @libc_cv_cc_fma4@
-have-as-vis3 = @libc_cv_sparc_as_vis3@
 gnu89-inline-CFLAGS = @gnu89_inline@
 have-ssp = @libc_cv_ssp@
 have-selinux = @have_selinux@
@@ -115,7 +108,6 @@
 NM = @NM@
 MAKEINFO = @MAKEINFO@
 AS = $(CC) -c
-MIG = @MIG@
 BISON = @BISON@
 AUTOCONF = @AUTOCONF@
 OBJDUMP = @OBJDUMP@

Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Thu Mar 21 00:01:40 2013
@@ -581,14 +581,6 @@
 static
 ldd_rewrite_script
 use_ldconfig
-libc_cv_sparc_as_vis3
-libc_cv_as_i686
-libc_cv_cc_nofma
-libc_cv_cc_fma4
-libc_cv_cc_novzeroupper
-libc_cv_cc_sse2avx
-libc_cv_cc_avx
-libc_cv_cc_sse4
 libc_cv_forced_unwind
 libc_cv_rootsbindir
 libc_cv_localstatedir
@@ -607,6 +599,7 @@
 have_libaudit
 LIBGD
 libc_cv_cc_submachine
+libc_cv_cc_nofma
 exceptions
 gnu89_inline
 libc_cv_ssp
@@ -639,7 +632,6 @@
 MAKE
 LD
 AS
-MIG
 OBJCOPY
 OBJDUMP
 AR
@@ -6912,6 +6904,7 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5
 $as_echo "$libc_cv_cc_nofma" >&6; }
 
+
 if test -n "$submachine"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
 $as_echo_n "checking for compiler option for CPU variant... " >&6; }
@@ -7357,15 +7350,6 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** be removed." >&5
 $as_echo "$as_me: WARNING: *** be removed." >&2;}
 fi
-
-
-
-
-
-
-
-
-
 
 
 

Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Thu Mar 21 00:01:40 2013
@@ -954,7 +954,6 @@
 AC_PROG_LN_S
 
 LIBC_PROG_BINUTILS
-AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
 
 # Accept binutils 2.20 or newer.
 AC_CHECK_PROG_VER(AS, $AS, --version,
@@ -1948,6 +1947,7 @@
 for opt in -ffp-contract=off -mno-fused-madd; do
   LIBC_TRY_CC_OPTION([$opt], [libc_cv_cc_nofma=$opt; break])
 done])
+AC_SUBST(libc_cv_cc_nofma)
 
 if test -n "$submachine"; then
   AC_CACHE_CHECK([for compiler option for CPU variant],
@@ -2160,16 +2160,6 @@
 AC_SUBST(libc_cv_rootsbindir)
 AC_SUBST(libc_cv_forced_unwind)
 
-dnl sysdeps/CPU/configure.in checks set this via arch-specific asm tests
-AC_SUBST(libc_cv_cc_sse4)
-AC_SUBST(libc_cv_cc_avx)
-AC_SUBST(libc_cv_cc_sse2avx)
-AC_SUBST(libc_cv_cc_novzeroupper)
-AC_SUBST(libc_cv_cc_fma4)
-AC_SUBST(libc_cv_cc_nofma)
-AC_SUBST(libc_cv_as_i686)
-AC_SUBST(libc_cv_sparc_as_vis3)
-
 if test x$use_ldconfig = xyes; then
   AC_DEFINE(USE_LDCONFIG)
 fi

Modified: fsf/trunk/libc/locale/programs/localedef.c
==============================================================================
--- fsf/trunk/libc/locale/programs/localedef.c (original)
+++ fsf/trunk/libc/locale/programs/localedef.c Thu Mar 21 00:01:40 2013
@@ -117,17 +117,18 @@
 static const struct argp_option options[] =
 {
   { NULL, 0, NULL, 0, N_("Input Files:") },
-  { "charmap", 'f', "FILE", 0,
+  { "charmap", 'f', N_("FILE"), 0,
     N_("Symbolic character names defined in FILE") },
-  { "inputfile", 'i', "FILE", 0, N_("Source definitions are found in FILE") },
-  { "repertoire-map", 'u', "FILE", 0,
+  { "inputfile", 'i', N_("FILE"), 0,
+    N_("Source definitions are found in FILE") },
+  { "repertoire-map", 'u', N_("FILE"), 0,
     N_("FILE contains mapping from symbolic names to UCS4 values") },
 
   { NULL, 0, NULL, 0, N_("Output control:") },
   { "force", 'c', NULL, 0,
     N_("Create output even if warning messages were issued") },
   { "old-style", OPT_OLDSTYLE, NULL, 0, N_("Create old-style tables") },
-  { "prefix", OPT_PREFIX, "PATH", 0, N_("Optional output file prefix") },
+  { "prefix", OPT_PREFIX, N_("PATH"), 0, N_("Optional output file prefix") },
   { "posix", OPT_POSIX, NULL, 0, N_("Strictly conform to POSIX") },
   { "quiet", OPT_QUIET, NULL, 0,
     N_("Suppress warnings and information messages") },
@@ -141,7 +142,7 @@
   { "delete-from-archive", OPT_DELETE_FROM_ARCHIVE, NULL, 0,
     N_("Remove locales named by parameters from archive") },
   { "list-archive", OPT_LIST_ARCHIVE, NULL, 0, N_("List content of archive") },
-  { "alias-file", 'A', "FILE", 0,
+  { "alias-file", 'A', N_("FILE"), 0,
     N_("locale.alias file to consult when making archive")},
   { NULL, 0, NULL, 0, NULL }
 };

Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Thu Mar 21 00:01:40 2013
@@ -1,3 +1,11 @@
+2013-03-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/arm/configure.in (default-abi): Set using
+	LIBC_CONFIG_VAR.
+	* sysdeps/arm/configure: Regenerated.
+	* sysdeps/unix/sysv/linux/arm/Makefile: Do not include
+	default-abi.make.
+
 2013-03-18  Roland McGrath  <roland@xxxxxxxxxxxxx>
 
 	* sysdeps/arm/dl-tlsdesc.S: Include <arm-features.h>.

Modified: fsf/trunk/libc/ports/sysdeps/arm/configure
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/configure (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/configure Thu Mar 21 00:01:40 2013
@@ -197,7 +197,9 @@
 if test $libc_cv_arm_pcs_vfp = yes; then
   $as_echo "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
 
-  echo "default-abi := hard" > default-abi.make
-else
-  echo "default-abi := soft" > default-abi.make
-fi
+  config_vars="$config_vars
+default-abi = hard"
+else
+  config_vars="$config_vars
+default-abi = soft"
+fi

Modified: fsf/trunk/libc/ports/sysdeps/arm/configure.in
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/configure.in (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/configure.in Thu Mar 21 00:01:40 2013
@@ -40,7 +40,7 @@
   ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
 if test $libc_cv_arm_pcs_vfp = yes; then
   AC_DEFINE(HAVE_ARM_PCS_VFP)
-  echo "default-abi := hard" > default-abi.make
+  LIBC_CONFIG_VAR([default-abi], [hard])
 else
-  echo "default-abi := soft" > default-abi.make
+  LIBC_CONFIG_VAR([default-abi], [soft])
 fi

Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/Makefile Thu Mar 21 00:01:40 2013
@@ -70,9 +70,6 @@
 LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o
 endif
 
-# Get value of default-abi.
-include $(common-objpfx)default-abi.make
-
 abi-variants := soft hard
 
 ifeq (,$(filter $(default-abi),$(abi-variants)))

Modified: fsf/trunk/libc/stdlib/stdlib.h
==============================================================================
--- fsf/trunk/libc/stdlib/stdlib.h (original)
+++ fsf/trunk/libc/stdlib/stdlib.h Thu Mar 21 00:01:40 2013
@@ -861,14 +861,14 @@
 __BEGIN_NAMESPACE_STD
 /* Return the length of the multibyte character
    in S, which is no longer than N.  */
-extern int mblen (const char *__s, size_t __n) __THROW __wur;
+extern int mblen (const char *__s, size_t __n) __THROW;
 /* Return the length of the given multibyte character,
    putting its `wchar_t' representation in *PWC.  */
 extern int mbtowc (wchar_t *__restrict __pwc,
-		   const char *__restrict __s, size_t __n) __THROW __wur;
+		   const char *__restrict __s, size_t __n) __THROW;
 /* Put the multibyte character represented
    by WCHAR in S, returning its length.  */
-extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
+extern int wctomb (char *__s, wchar_t __wchar) __THROW;
 
 
 /* Convert a multibyte string to a wide char string.  */

Modified: fsf/trunk/libc/sysdeps/i386/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure (original)
+++ fsf/trunk/libc/sysdeps/i386/configure Thu Mar 21 00:01:40 2013
@@ -66,6 +66,8 @@
   $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-sse4 = $libc_cv_cc_sse4"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5
 $as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
@@ -86,6 +88,8 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_as_i686" >&5
 $as_echo "$libc_cv_as_i686" >&6; }
+config_vars="$config_vars
+config-asflags-i686 = $libc_cv_as_i686"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
 $as_echo_n "checking for AVX support... " >&6; }
@@ -110,6 +114,8 @@
   $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-avx = $libc_cv_cc_avx"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
@@ -134,6 +140,8 @@
   $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-sse2avx = $libc_cv_cc_sse2avx"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
 $as_echo_n "checking for FMA4 support... " >&6; }
@@ -158,6 +166,8 @@
   $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+have-mfma4 = $libc_cv_cc_fma4"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
@@ -178,6 +188,8 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
+config_vars="$config_vars
+config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
 
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 

Modified: fsf/trunk/libc/sysdeps/i386/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure.in (original)
+++ fsf/trunk/libc/sysdeps/i386/configure.in Thu Mar 21 00:01:40 2013
@@ -12,6 +12,7 @@
 if test $libc_cv_cc_sse4 = yes; then
   AC_DEFINE(HAVE_SSE4_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4])
 
 dnl Check if -Wa,-mtune=i686 works.
 AC_CACHE_CHECK(for assembler -mtune=i686 support, libc_cv_as_i686, [dnl
@@ -19,6 +20,7 @@
 		   [libc_cv_as_i686=yes],
 		   [libc_cv_as_i686=no])
 ])
+LIBC_CONFIG_VAR([config-asflags-i686], [$libc_cv_as_i686])
 
 dnl Check if -mavx works.
 AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
@@ -27,6 +29,7 @@
 if test $libc_cv_cc_avx = yes; then
   AC_DEFINE(HAVE_AVX_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
 
 dnl Check if -msse2avx works.
 AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
@@ -37,6 +40,7 @@
 if test $libc_cv_cc_sse2avx = yes; then
   AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx])
 
 dnl Check if -mfma4 works.
 AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
@@ -45,6 +49,7 @@
 if test $libc_cv_cc_fma4 = yes; then
   AC_DEFINE(HAVE_FMA4_SUPPORT)
 fi
+LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4])
 
 dnl Check if -mno-vzeroupper works.
 AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
@@ -52,6 +57,7 @@
 		   [libc_cv_cc_novzeroupper=yes],
 		   [libc_cv_cc_novzeroupper=no])
 ])
+LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper])
 
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.

Modified: fsf/trunk/libc/sysdeps/mach/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/configure (original)
+++ fsf/trunk/libc/sysdeps/mach/configure Thu Mar 21 00:01:40 2013
@@ -162,6 +162,8 @@
 if test "x$MIG" = xMISSING; then
   as_fn_error $? "cannot find required build tool mig" "$LINENO" 5
 fi
+config_vars="$config_vars
+MIG = $MIG"
 
 ### Sanity checks for Mach header installation
 

Modified: fsf/trunk/libc/sysdeps/mach/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/configure.in (original)
+++ fsf/trunk/libc/sysdeps/mach/configure.in Thu Mar 21 00:01:40 2013
@@ -4,6 +4,7 @@
 if test "x$MIG" = xMISSING; then
   AC_MSG_ERROR([cannot find required build tool mig])
 fi
+LIBC_CONFIG_VAR([MIG], [$MIG])
 
 ### Sanity checks for Mach header installation
 AC_CHECK_HEADER(mach/mach_types.h,,

Modified: fsf/trunk/libc/sysdeps/posix/libc_fatal.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/libc_fatal.c (original)
+++ fsf/trunk/libc/sysdeps/posix/libc_fatal.c Thu Mar 21 00:01:40 2013
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
+/* Catastrophic failure reports.  Generic POSIX.1 version.
+   Copyright (C) 1993-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +28,7 @@
 #include <string.h>
 #include <sysdep.h>
 #include <unistd.h>
+#include <sys/mman.h>
 #include <sys/syslog.h>
 #include <sys/uio.h>
 #include <not-cancel.h>
@@ -35,13 +37,31 @@
 #include FATAL_PREPARE_INCLUDE
 #endif
 
+#ifndef WRITEV_FOR_FATAL
+# define WRITEV_FOR_FATAL	writev_for_fatal
+static bool
+writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
+{
+  return TEMP_FAILURE_RETRY (__writev (fd, iov, niov)) == total;
+}
+#endif
+
+#ifndef BEFORE_ABORT
+# define BEFORE_ABORT		before_abort
+static void
+before_abort (int do_abort __attribute__ ((unused)),
+              bool written __attribute__ ((unused)),
+              int fd __attribute__ ((unused)))
+{
+}
+#endif
+
 struct str_list
 {
   const char *str;
   size_t len;
   struct str_list *next;
 };
-
 
 /* Abort with an error message.  */
 void
@@ -121,8 +141,7 @@
 	  list = list->next;
 	}
 
-      if (TEMP_FAILURE_RETRY (__writev (fd, iov, nlist)) == total)
-	written = true;
+      written = WRITEV_FOR_FATAL (fd, iov, nlist, total);
 
       if (do_abort)
 	{
@@ -131,7 +150,7 @@
 	  struct abort_msg_s *buf = __mmap (NULL, total,
 					    PROT_READ | PROT_WRITE,
 					    MAP_ANON | MAP_PRIVATE, -1, 0);
-	  if (buf != MAP_FAILED)
+	  if (__glibc_likely (buf != MAP_FAILED))
 	    {
 	      buf->size = total;
 	      char *wp = buf->msg;
@@ -158,8 +177,12 @@
   va_end (ap_copy);
 
   if (do_abort)
-    /* Kill the application.  */
-    abort ();
+    {
+      BEFORE_ABORT (do_abort, written, fd);
+
+      /* Kill the application.  */
+      abort ();
+    }
 }
 
 

Modified: fsf/trunk/libc/sysdeps/sparc/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/configure (original)
+++ fsf/trunk/libc/sysdeps/sparc/configure Thu Mar 21 00:01:40 2013
@@ -40,6 +40,8 @@
   $as_echo "#define HAVE_AS_VIS3_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+have-as-vis3 = $libc_cv_sparc_as_vis3"
 
 # Check for a GCC emitting GOTDATA relocations.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sparc gcc GOTDATA reloc support" >&5

Modified: fsf/trunk/libc/sysdeps/sparc/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/sparc/configure.in (original)
+++ fsf/trunk/libc/sysdeps/sparc/configure.in Thu Mar 21 00:01:40 2013
@@ -28,6 +28,7 @@
 if test $libc_cv_sparc_as_vis3 = yes; then
   AC_DEFINE(HAVE_AS_VIS3_SUPPORT)
 fi
+LIBC_CONFIG_VAR([have-as-vis3], [$libc_cv_sparc_as_vis3])
 
 # Check for a GCC emitting GOTDATA relocations.
 AC_CACHE_CHECK(for sparc gcc GOTDATA reloc support, libc_cv_sparc_gcc_gotdata, [dnl

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/libc_fatal.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/libc_fatal.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/libc_fatal.c Thu Mar 21 00:01:40 2013
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
+/* Catastrophic failure reports.  Linux version.
+   Copyright (C) 1993-2013 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,195 +16,52 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <atomic.h>
 #include <errno.h>
+#include <execinfo.h>
 #include <fcntl.h>
-#include <ldsodefs.h>
-#include <paths.h>
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sysdep.h>
-#include <unistd.h>
+#include <not-cancel.h>
 #include <sys/mman.h>
-#include <sys/syslog.h>
-#include <execinfo.h>
+#include <sys/uio.h>
 
-/* Abort with an error message.  */
-#include <not-cancel.h>
+static bool
+writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
+{
+  INTERNAL_SYSCALL_DECL (err);
+  ssize_t cnt;
+  do
+    cnt = INTERNAL_SYSCALL (writev, err, 3, fd, iov, niov);
+  while (INTERNAL_SYSCALL_ERROR_P (cnt, err)
+         && INTERNAL_SYSCALL_ERRNO (cnt, err) == EINTR);
+  return cnt == total;
+}
+#define WRITEV_FOR_FATAL	writev_for_fatal
 
-#ifdef FATAL_PREPARE_INCLUDE
-#include FATAL_PREPARE_INCLUDE
-#endif
-
-struct str_list
+static void
+backtrace_and_maps (int do_abort, bool written, int fd)
 {
-  const char *str;
-  size_t len;
-  struct str_list *next;
-};
-
-
-/* Abort with an error message.  */
-void
-__libc_message (int do_abort, const char *fmt, ...)
-{
-  va_list ap;
-  va_list ap_copy;
-  int fd = -1;
-
-  va_start (ap, fmt);
-  va_copy (ap_copy, ap);
-
-#ifdef FATAL_PREPARE
-  FATAL_PREPARE;
-#endif
-
-  /* Open a descriptor for /dev/tty unless the user explicitly
-     requests errors on standard error.  */
-  const char *on_2 = __libc_secure_getenv ("LIBC_FATAL_STDERR_");
-  if (on_2 == NULL || *on_2 == '\0')
-    fd = open_not_cancel_2 (_PATH_TTY, O_RDWR | O_NOCTTY | O_NDELAY);
-
-  if (fd == -1)
-    fd = STDERR_FILENO;
-
-  struct str_list *list = NULL;
-  int nlist = 0;
-
-  const char *cp = fmt;
-  while (*cp != '\0')
+  if (do_abort > 1 && written)
     {
-      /* Find the next "%s" or the end of the string.  */
-      const char *next = cp;
-      while (next[0] != '%' || next[1] != 's')
-	{
-	  next = __strchrnul (next + 1, '%');
-
-	  if (next[0] == '\0')
-	    break;
-	}
-
-      /* Determine what to print.  */
-      const char *str;
-      size_t len;
-      if (cp[0] == '%' && cp[1] == 's')
-	{
-	  str = va_arg (ap, const char *);
-	  len = strlen (str);
-	  cp += 2;
-	}
-      else
-	{
-	  str = cp;
-	  len = next - cp;
-	  cp = next;
-	}
-
-      struct str_list *newp = alloca (sizeof (struct str_list));
-      newp->str = str;
-      newp->len = len;
-      newp->next = list;
-      list = newp;
-      ++nlist;
-    }
-
-  bool written = false;
-  if (nlist > 0)
-    {
-      struct iovec *iov = alloca (nlist * sizeof (struct iovec));
-      ssize_t total = 0;
-
-      for (int cnt = nlist - 1; cnt >= 0; --cnt)
-	{
-	  iov[cnt].iov_base = (void *) list->str;
-	  iov[cnt].iov_len = list->len;
-	  total += list->len;
-	  list = list->next;
-	}
-
-      INTERNAL_SYSCALL_DECL (err);
-      ssize_t cnt;
-      do
-	cnt = INTERNAL_SYSCALL (writev, err, 3, fd, iov, nlist);
-      while (INTERNAL_SYSCALL_ERROR_P (cnt, err)
-	     && INTERNAL_SYSCALL_ERRNO (cnt, err) == EINTR);
-
-      if (cnt == total)
-	written = true;
-
-      if (do_abort)
-	{
-	  total = ((total + 1 + GLRO(dl_pagesize) - 1)
-		   & ~(GLRO(dl_pagesize) - 1));
-	  struct abort_msg_s *buf = __mmap (NULL, total,
-					    PROT_READ | PROT_WRITE,
-					    MAP_ANON | MAP_PRIVATE, -1, 0);
-	  if (__builtin_expect (buf != MAP_FAILED, 1))
-	    {
-	      buf->size = total;
-	      char *wp = buf->msg;
-	      for (int cnt = 0; cnt < nlist; ++cnt)
-		wp = mempcpy (wp, iov[cnt].iov_base, iov[cnt].iov_len);
-	      *wp = '\0';
-
-	      /* We have to free the old buffer since the application might
-		 catch the SIGABRT signal.  */
-	      struct abort_msg_s *old = atomic_exchange_acq (&__abort_msg,
-							     buf);
-	      if (old != NULL)
-		__munmap (old, old->size);
-	    }
-	}
-    }
-
-  va_end (ap);
-
-  /* If we  had no success writing the message, use syslog.  */
-  if (! written)
-    vsyslog (LOG_ERR, fmt, ap_copy);
-
-  va_end (ap_copy);
-
-  if (do_abort)
-    {
-      if (do_abort > 1 && written)
-	{
-	  void *addrs[64];
+      void *addrs[64];
 #define naddrs (sizeof (addrs) / sizeof (addrs[0]))
-	  int n = __backtrace (addrs, naddrs);
-	  if (n > 2)
-	    {
+      int n = __backtrace (addrs, naddrs);
+      if (n > 2)
+        {
 #define strnsize(str) str, strlen (str)
 #define writestr(str) write_not_cancel (fd, str)
-	      writestr (strnsize ("======= Backtrace: =========\n"));
-	      __backtrace_symbols_fd (addrs + 1, n - 1, fd);
+          writestr (strnsize ("======= Backtrace: =========\n"));
+          __backtrace_symbols_fd (addrs + 1, n - 1, fd);
 
-	      writestr (strnsize ("======= Memory map: ========\n"));
-	      int fd2 = open_not_cancel_2 ("/proc/self/maps", O_RDONLY);
-	      char buf[1024];
-	      ssize_t n2;
-	      while ((n2 = read_not_cancel (fd2, buf, sizeof (buf))) > 0)
-		if (write_not_cancel (fd, buf, n2) != n2)
-		  break;
-	      close_not_cancel_no_status (fd2);
-	    }
-	}
-
-      /* Terminate the process.  */
-      abort ();
+          writestr (strnsize ("======= Memory map: ========\n"));
+          int fd2 = open_not_cancel_2 ("/proc/self/maps", O_RDONLY);
+          char buf[1024];
+          ssize_t n2;
+          while ((n2 = read_not_cancel (fd2, buf, sizeof (buf))) > 0)
+            if (write_not_cancel (fd, buf, n2) != n2)
+              break;
+          close_not_cancel_no_status (fd2);
+        }
     }
 }
+#define BEFORE_ABORT		backtrace_and_maps
 
-
-void
-__libc_fatal (message)
-     const char *message;
-{
-  /* The loop is added only to keep gcc happy.  */
-  while (1)
-    __libc_message (1, "%s", message);
-}
-libc_hidden_def (__libc_fatal)
+#include <sysdeps/posix/libc_fatal.c>

Modified: fsf/trunk/libc/sysdeps/x86_64/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/configure (original)
+++ fsf/trunk/libc/sysdeps/x86_64/configure Thu Mar 21 00:01:40 2013
@@ -66,6 +66,8 @@
   $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-sse4 = $libc_cv_cc_sse4"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
 $as_echo_n "checking for AVX support... " >&6; }
@@ -90,6 +92,8 @@
   $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-avx = $libc_cv_cc_avx"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5
 $as_echo_n "checking for AVX encoding of SSE instructions... " >&6; }
@@ -114,6 +118,8 @@
   $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+config-cflags-sse2avx = $libc_cv_cc_sse2avx"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
 $as_echo_n "checking for FMA4 support... " >&6; }
@@ -138,6 +144,8 @@
   $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
 
 fi
+config_vars="$config_vars
+have-mfma4 = $libc_cv_cc_fma4"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
 $as_echo_n "checking for -mno-vzeroupper support... " >&6; }
@@ -158,6 +166,8 @@
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5
 $as_echo "$libc_cv_cc_novzeroupper" >&6; }
+config_vars="$config_vars
+config-cflags-novzeroupper = $libc_cv_cc_novzeroupper"
 
 $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
 

Modified: fsf/trunk/libc/sysdeps/x86_64/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/configure.in (original)
+++ fsf/trunk/libc/sysdeps/x86_64/configure.in Thu Mar 21 00:01:40 2013
@@ -12,6 +12,7 @@
 if test $libc_cv_cc_sse4 = yes; then
   AC_DEFINE(HAVE_SSE4_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-sse4], [$libc_cv_cc_sse4])
 
 dnl Check if -mavx works.
 AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
@@ -20,6 +21,7 @@
 if test $libc_cv_cc_avx = yes; then
   AC_DEFINE(HAVE_AVX_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-avx], [$libc_cv_cc_avx])
 
 dnl Check if -msse2avx works.
 AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
@@ -30,6 +32,7 @@
 if test $libc_cv_cc_sse2avx = yes; then
   AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
 fi
+LIBC_CONFIG_VAR([config-cflags-sse2avx], [$libc_cv_cc_sse2avx])
 
 dnl Check if -mfma4 works.
 AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
@@ -38,6 +41,7 @@
 if test $libc_cv_cc_fma4 = yes; then
   AC_DEFINE(HAVE_FMA4_SUPPORT)
 fi
+LIBC_CONFIG_VAR([have-mfma4], [$libc_cv_cc_fma4])
 
 dnl Check if -mno-vzeroupper works.
 AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
@@ -45,6 +49,7 @@
 		   [libc_cv_cc_novzeroupper=yes],
 		   [libc_cv_cc_novzeroupper=no])
 ])
+LIBC_CONFIG_VAR([config-cflags-novzeroupper], [$libc_cv_cc_novzeroupper])
 
 dnl It is always possible to access static and hidden symbols in an
 dnl position independent way.

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits