This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-941-g30b99d7


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  30b99d798f9728a96d4766dd3f7fcfe5daae8945 (commit)
       via  61653dfb81b776bb72ce4304175b861d77c357a8 (commit)
      from  90c885c87bdb3380d430d3f72a4a5cabf2835167 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30b99d798f9728a96d4766dd3f7fcfe5daae8945

commit 30b99d798f9728a96d4766dd3f7fcfe5daae8945
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon May 14 16:08:25 2012 -0700

    BZ#10375: Configure magic to use -fno-stack-protector if needed.

diff --git a/ChangeLog b/ChangeLog
index cde0173..ecfdebc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 2012-05-16  Roland McGrath  <roland@hack.frob.com>
 
 	[BZ #10375]
+	* configure.in (NM): Add AC_CHECK_TOOL for it.
+	(libc_extra_cflags): New substituted variable.
+	Check for -fstack-protector being used implicitly.
+	* configure: Regenerated.
+	* config.make.in (config-extra-cflags): New variable,
+	gets @libc_extra_cflags@.
+	* Makeconfig (CFLAGS): Add $(config-extra-cflags) near the front.
+
+	[BZ #10375]
 	* configure.in: Check for _FORTIFY_SOURCE being predefined.
 	(CPPUNDEFS): New substituted variable; add -U_FORTIFY_SOURCE if needed.
 	* configure: Regenerated.
diff --git a/Makeconfig b/Makeconfig
index b81594f..3a09764 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -668,7 +668,7 @@ CPPFLAGS = $(CPPUNDEFS) $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \
 	   $(foreach lib,$(libof-$(basename $(@F))) \
 			 $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
 	   $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
-override CFLAGS	= -std=gnu99 $(gnu89-inline-CFLAGS) \
+override CFLAGS	= -std=gnu99 $(gnu89-inline-CFLAGS) $(config-extra-cflags) \
 		  $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
 		  $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
 		  $(CFLAGS-$(@F)) \
diff --git a/NEWS b/NEWS
index dc0f11a..8d98497 100644
--- a/NEWS
+++ b/NEWS
@@ -14,20 +14,20 @@ Version 2.16
   3440, 3748, 3768, 3866, 3868, 3906, 3976, 3992, 4026, 4108, 4596, 4822,
   5077, 5461, 5805, 5993, 6471, 6486, 6578, 6649, 6730, 6770, 6794, 6884,
   6890, 6894, 6895, 6907, 6911, 6959, 7064, 9739, 9902, 10110, 10135, 10140,
-  10153, 10210, 10254, 10346, 10545, 10716, 11174, 11322, 11365, 11451,
-  11494, 11521, 11677, 11837, 11959, 12047, 12097, 12193, 12297, 12298,
-  12301, 12340, 12354, 13058, 13361, 13525, 13526, 13527, 13528, 13529,
-  13530, 13531, 13532, 13533, 13547, 13551, 13552, 13553, 13555, 13556,
-  13559, 13563, 13566, 13583, 13592, 13594, 13613, 13618, 13637, 13656,
-  13658, 13673, 13691, 13695, 13704, 13705, 13706, 13726, 13738, 13739,
-  13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806, 13824,
-  13840, 13841, 13844, 13846, 13851, 13852, 13854, 13871, 13872, 13873,
-  13879, 13883, 13884, 13885, 13886, 13892, 13895, 13908, 13910, 13911,
-  13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921,
-  13922, 13923, 13924, 13926, 13927, 13928, 13938, 13941, 13942, 13954,
-  13955, 13956, 13963, 13967, 13970, 13973, 13979, 13983, 13986, 14012,
-  14027, 14033, 14034, 14040, 14043, 14044, 14049, 14053, 14055, 14064,
-  14080, 14083, 14103, 14104, 14109
+  10153, 10210, 10254, 10346, 10375 10545, 10716, 11174, 11322, 11365,
+  11451, 11494, 11521, 11677, 11837, 11959, 12047, 12097, 12193, 12297,
+  12298, 12301, 12340, 12354, 13058, 13361, 13525, 13526, 13527, 13528,
+  13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552, 13553, 13555,
+  13556, 13559, 13563, 13566, 13583, 13592, 13594, 13613, 13618, 13637,
+  13656, 13658, 13673, 13691, 13695, 13704, 13705, 13706, 13726, 13738,
+  13739, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806,
+  13824, 13840, 13841, 13844, 13846, 13851, 13852, 13854, 13871, 13872,
+  13873, 13879, 13883, 13884, 13885, 13886, 13892, 13895, 13908, 13910,
+  13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920,
+  13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938, 13941, 13942,
+  13954, 13955, 13956, 13963, 13967, 13970, 13973, 13979, 13983, 13986,
+  14012, 14027, 14033, 14034, 14040, 14043, 14044, 14049, 14053, 14055,
+  14064, 14080, 14083, 14103, 14104, 14109
 
 * ISO C11 support:
 
diff --git a/config.make.in b/config.make.in
index 4fa2608..f0db199 100644
--- a/config.make.in
+++ b/config.make.in
@@ -34,6 +34,7 @@ config-sysdirs = @sysnames@
 cflags-cpu = @libc_cv_cc_submachine@
 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@
diff --git a/configure b/configure
index c295277..f23c40f 100755
--- a/configure
+++ b/configure
@@ -632,6 +632,7 @@ libc_cv_localedir
 libc_cv_slibdir
 old_glibc_headers
 libc_cv_gcc_unwind_find_fde
+libc_extra_cflags
 CPPUNDEFS
 sizeof_long_double
 EGREP
@@ -666,6 +667,7 @@ libc_cv_gcc_static_libgcc
 CXX_SYSINCLUDES
 SYSINCLUDES
 AUTOCONF
+NM
 READELF
 SED
 MAKEINFO
@@ -5154,6 +5156,98 @@ else
   READELF="$ac_cv_prog_READELF"
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NM="${ac_tool_prefix}nm"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NM"; then
+  ac_ct_NM=$NM
+  # Extract the first word of "nm", so it can be a program name with args.
+set dummy nm; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NM"; then
+  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NM="nm"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NM=$ac_cv_prog_ac_ct_NM
+if test -n "$ac_ct_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
+$as_echo "$ac_ct_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NM" = x; then
+    NM="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NM=$ac_ct_NM
+  fi
+else
+  NM="$ac_cv_prog_NM"
+fi
+
 
 for ac_prog in autoconf
 do
@@ -7577,6 +7671,51 @@ if test $libc_cv_predef_fortify_source = yes; then
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implicitly enables -fstack-protector" >&5
+$as_echo_n "checking whether $CC implicitly enables -fstack-protector... " >&6; }
+if ${libc_cv_predef_stack_protector+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void foobar (char *);
+int
+main ()
+{
+char large_array[2048]; foobar (large_array);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+libc_undefs=`$NM -u conftest.o |
+  LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \
+    2>&5` || {
+  as_fn_error $? "confusing output from $NM -u" "$LINENO" 5
+}
+echo >&5 "libc_undefs='$libc_undefs'"
+case "$libc_undefs" in
+foobar) libc_cv_predef_stack_protector=no ;;
+'__stack_chk_fail
+foobar') libc_cv_predef_stack_protector=yes ;;
+*) as_fn_error $? "unexpected symbols in test: $libc_undefs" "$LINENO" 5 ;;
+esac
+else
+  as_fn_error $? "test compilation failed" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_predef_stack_protector" >&5
+$as_echo "$libc_cv_predef_stack_protector" >&6; }
+libc_extra_cflags=
+if test $libc_cv_predef_stack_protector = yes; then
+  libc_extra_cflags=-fno-stack-protector
+fi
+
+
 ### End of automated tests.
 ### Now run sysdeps configure fragments.
 
diff --git a/configure.in b/configure.in
index 0916e9e..a9ee733 100644
--- a/configure.in
+++ b/configure.in
@@ -927,6 +927,7 @@ AC_CHECK_PROG_VER(SED, sed, --version,
   SED=: aux_missing="$aux_missing sed")
 
 AC_CHECK_TOOL(READELF, readelf, false)
+AC_CHECK_TOOL(NM, nm, false)
 
 AC_CHECK_PROGS(AUTOCONF, autoconf, no)
 case "x$AUTOCONF" in
@@ -2052,6 +2053,39 @@ if test $libc_cv_predef_fortify_source = yes; then
 fi
 AC_SUBST(CPPUNDEFS)
 
+dnl Check for silly hacked compilers inserting -fstack-protector.
+dnl This breaks badly for the early startup code we compile, since
+dnl the compiled code can refer to a magic machine-dependent location
+dnl for the canary value before we have sufficient setup for that to
+dnl work.  It's also questionable to build all of libc with this flag
+dnl even when you're doing that for most applications you build, since
+dnl libc's code is so heavily-used and performance-sensitive.  If we
+dnl ever really want to make that work, it should be enabled explicitly
+dnl in the libc build, not inherited from implicit compiler settings.
+AC_CACHE_CHECK([whether $CC implicitly enables -fstack-protector],
+	       libc_cv_predef_stack_protector, [
+AC_TRY_COMPILE([extern void foobar (char *);],
+	       [char large_array[2048]; foobar (large_array);], [
+libc_undefs=`$NM -u conftest.o |
+  LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \
+    2>&AS_MESSAGE_LOG_FD` || {
+  AC_MSG_ERROR([confusing output from $NM -u])
+}
+echo >&AS_MESSAGE_LOG_FD "libc_undefs='$libc_undefs'"
+case "$libc_undefs" in
+foobar) libc_cv_predef_stack_protector=no ;;
+'__stack_chk_fail
+foobar') libc_cv_predef_stack_protector=yes ;;
+*) AC_MSG_ERROR([unexpected symbols in test: $libc_undefs]) ;;
+esac],
+	       [AC_MSG_ERROR([test compilation failed])])
+])
+libc_extra_cflags=
+if test $libc_cv_predef_stack_protector = yes; then
+  libc_extra_cflags=-fno-stack-protector
+fi
+AC_SUBST(libc_extra_cflags)
+
 ### End of automated tests.
 ### Now run sysdeps configure fragments.
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=61653dfb81b776bb72ce4304175b861d77c357a8

commit 61653dfb81b776bb72ce4304175b861d77c357a8
Author: Roland McGrath <roland@hack.frob.com>
Date:   Mon May 14 15:42:52 2012 -0700

    BZ#10375: Configure magic to use -U_FORTIFY_SOURCE if needed.

diff --git a/ChangeLog b/ChangeLog
index 95a4055..cde0173 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-05-16  Roland McGrath  <roland@hack.frob.com>
+
+	[BZ #10375]
+	* configure.in: Check for _FORTIFY_SOURCE being predefined.
+	(CPPUNDEFS): New substituted variable; add -U_FORTIFY_SOURCE if needed.
+	* configure: Regenerated.
+	* config.make.in (CPPUNDEFS): New substituted variable.
+	* Makeconfig (CPPFLAGS): Put $(CPPUNDEFS) at the beginning.
+	* Makerules ($(stdio_lim:h=st)): Use $(CPPUNDEFS).
+	* time/ctime.c: Don't #undef __OPTIMIZE__ and ctime.
+
 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/unix/sysv/linux/bits/mqueue.h: Include <bits/types.h>.
diff --git a/Makeconfig b/Makeconfig
index f68a752..b81594f 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -661,7 +661,8 @@ libio-include = -I$(..)libio
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
 # the implicit -lang-asm and breaks cpp behavior for .S files--notably
 # it causes cpp to stop predefining __ASSEMBLER__.
-CPPFLAGS = $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) $(+includes) $(defines) \
+CPPFLAGS = $(CPPUNDEFS) $(CPPFLAGS-config) $($(subdir)-CPPFLAGS) \
+	   $(+includes) $(defines) \
 	   -include $(..)include/libc-symbols.h $(sysdep-CPPFLAGS) \
 	   $(CPPFLAGS-$(suffix $@)) \
 	   $(foreach lib,$(libof-$(basename $(@F))) \
diff --git a/Makerules b/Makerules
index f374700..528077a 100644
--- a/Makerules
+++ b/Makerules
@@ -1233,7 +1233,7 @@ $(stdio_lim:h=st): $(..)stdio-common/stdio_lim.h.in $(..)Rules \
 	  echo '#define _LIBC 1';					\
 	  echo '#include "$(..)misc/sys/uio.h"'; } |			\
 	$(CC) -E -dM -MD -MP -MF $(@:st=dT) -MT '$(@:st=h) $(@:st=d)' 	\
-	      $(+includes) -xc - -o $(@:st=hT)
+	      $(CPPUNDEFS) $(+includes) -xc - -o $(@:st=hT)
 	sed $(sed-remove-objpfx) $(sed-remove-dotdot)			\
 	    $(@:st=dT) > $(@:st=dt)
 	mv -f $(@:st=dt) $(@:st=d)
diff --git a/config.make.in b/config.make.in
index 6c4d04e..4fa2608 100644
--- a/config.make.in
+++ b/config.make.in
@@ -104,6 +104,7 @@ CXX = @CXX@
 BUILD_CC = @BUILD_CC@
 CFLAGS = @CFLAGS@
 CPPFLAGS-config = @CPPFLAGS@
+CPPUNDEFS = @CPPUNDEFS@
 ASFLAGS-config = @ASFLAGS_config@
 AR = @AR@
 MAKEINFO = @MAKEINFO@
diff --git a/configure b/configure
index e664260..c295277 100755
--- a/configure
+++ b/configure
@@ -632,6 +632,7 @@ libc_cv_localedir
 libc_cv_slibdir
 old_glibc_headers
 libc_cv_gcc_unwind_find_fde
+CPPUNDEFS
 sizeof_long_double
 EGREP
 GREP
@@ -7542,6 +7543,40 @@ _ACEOF
 sizeof_long_double=$ac_cv_sizeof_long_double
 
 
+CPPUNDEFS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FORTIFY_SOURCE predefine" >&5
+$as_echo_n "checking for _FORTIFY_SOURCE predefine... " >&6; }
+if ${libc_cv_predef_fortify_source+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+#ifdef _FORTIFY_SOURCE
+# error bogon
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libc_cv_predef_fortify_source=no
+else
+  libc_cv_predef_fortify_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_predef_fortify_source" >&5
+$as_echo "$libc_cv_predef_fortify_source" >&6; }
+if test $libc_cv_predef_fortify_source = yes; then
+  CPPUNDEFS="${CPPUNDEFS:+$CPPUNDEFS }-U_FORTIFY_SOURCE"
+fi
+
+
 ### End of automated tests.
 ### Now run sysdeps configure fragments.
 
diff --git a/configure.in b/configure.in
index ce4b7ad..0916e9e 100644
--- a/configure.in
+++ b/configure.in
@@ -2036,6 +2036,22 @@ AC_CHECK_SIZEOF(long double, 0)
 sizeof_long_double=$ac_cv_sizeof_long_double
 AC_SUBST(sizeof_long_double)
 
+CPPUNDEFS=
+dnl Check for silly hacked compilers predefining _FORTIFY_SOURCE.
+dnl Since we are building the implementations of the fortified functions here,
+dnl having the macro defined interacts very badly.
+AC_CACHE_CHECK([for _FORTIFY_SOURCE predefine], libc_cv_predef_fortify_source,
+[AC_TRY_COMPILE([], [
+#ifdef _FORTIFY_SOURCE
+# error bogon
+#endif],
+		[libc_cv_predef_fortify_source=no],
+		[libc_cv_predef_fortify_source=yes])])
+if test $libc_cv_predef_fortify_source = yes; then
+  CPPUNDEFS="${CPPUNDEFS:+$CPPUNDEFS }-U_FORTIFY_SOURCE"
+fi
+AC_SUBST(CPPUNDEFS)
+
 ### End of automated tests.
 ### Now run sysdeps configure fragments.
 
diff --git a/time/ctime.c b/time/ctime.c
index 28321af..ca2d3ea 100644
--- a/time/ctime.c
+++ b/time/ctime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 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,12 +15,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#undef	__OPTIMIZE__	/* Avoid inline `ctime' function.  */
 #include <time.h>
 
-#undef	ctime
-
-
 /* Return a string as returned by asctime which
    is the representation of *T in that form.  */
 char *

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |   20 +++++++
 Makeconfig     |    5 +-
 Makerules      |    2 +-
 NEWS           |   28 +++++-----
 config.make.in |    2 +
 configure      |  174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.in   |   50 ++++++++++++++++
 time/ctime.c   |    6 +--
 8 files changed, 265 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]