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-764-g05c2c96


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  05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc (commit)
      from  4b30f61a1ea78de9b0e84a54fc6ee96ea70e6ed5 (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=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc

commit 05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc
Author: Roland Mc Grath <roland@hack.frob.com>
Date:   Tue May 8 19:44:57 2012 +0200

    Warn if user requests __FORTIFY_SOURCE but it is disabled
    
    [BZ #13979]
            * include/features.h: Warn if user requests __FORTIFY_SOURCE
            checking but the checks are disabled for any reason.

diff --git a/ChangeLog b/ChangeLog
index 6d7759d..cd90025 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-08  Roland Mc Grath  <roland@hack.frob.com>
+
+        [BZ #13979]
+        * include/features.h: Warn if user requests __FORTIFY_SOURCE
+        checking but the checks are disabled for any reason.
+
 2012-05-08  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/x86_64/dl-machine.h: Replace Elf64_XXX with ElfW(XXX)
diff --git a/NEWS b/NEWS
index b2f8a4e..ec7eb92 100644
--- a/NEWS
+++ b/NEWS
@@ -23,8 +23,8 @@ Version 2.16
   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, 13963, 13967, 13970, 13973, 14027, 14033, 14034,
-  14040, 14049, 14055, 14064
+  13938, 13941, 13942, 13963, 13967, 13970, 13973, 13979, 14027, 14033,
+  14034, 14040, 14049, 14055, 14064
 
 * ISO C11 support:
 
diff --git a/include/features.h b/include/features.h
index c347555..c700871 100644
--- a/include/features.h
+++ b/include/features.h
@@ -325,14 +325,18 @@
 # define __USE_REENTRANT	1
 #endif
 
-#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
-    && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
-# if _FORTIFY_SOURCE > 1
+#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
+# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+#  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
+# elif !__GNUC_PREREQ (4, 1)
+#  warning _FORTIFY_SOURCE requires GCC 4.1 or later
+# elif _FORTIFY_SOURCE > 1
 #  define __USE_FORTIFY_LEVEL 2
 # else
 #  define __USE_FORTIFY_LEVEL 1
 # endif
-#else
+#endif
+#ifndef __USE_FORTIFY_LEVEL
 # define __USE_FORTIFY_LEVEL 0
 #endif
 

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

Summary of changes:
 ChangeLog          |    6 ++++++
 NEWS               |    4 ++--
 include/features.h |   12 ++++++++----
 3 files changed, 16 insertions(+), 6 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]