]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
make fortify logic checks less angry
authorMike Frysinger <vapier@gentoo.org>
Sat, 4 May 2013 18:12:58 +0000 (14:12 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 16 Aug 2013 19:13:12 +0000 (15:13 -0400)
the fortify/optimization check does not play well with our default gcc specs

http://sourceware.org/ml/libc-alpha/2012-06/msg00068.html

include/features.h

index c9be10a63e35fb84159aa8f56f710e491c0d5a4d..476aa13d68f5399be7ca63a7c5409844d62ff3f3 100644 (file)
 # define __USE_REENTRANT       1
 #endif
 
+#if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
+# undef _FORTIFY_SOURCE
+#endif
 #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)
+# if !__GNUC_PREREQ (4, 1)
 #  warning _FORTIFY_SOURCE requires GCC 4.1 or later
 # elif _FORTIFY_SOURCE > 1
 #  define __USE_FORTIFY_LEVEL 2