3 From: Roland Mc Grath <roland@hack.frob.com>
4 Date: Tue, 8 May 2012 17:44:57 +0000 (+0200)
5 Subject: Warn if user requests __FORTIFY_SOURCE but it is disabled
6 X-Git-Tag: glibc-2.16-tps~448
7 X-Git-Url: http://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=05c2c9618f583ea4acd69b3fe5ae2a2922dd2ddc
9 Warn if user requests __FORTIFY_SOURCE but it is disabled
12 * include/features.h: Warn if user requests __FORTIFY_SOURCE
13 checking but the checks are disabled for any reason.
16 include/features.h | 7 +++----
17 1 file changed, 3 insertions(+), 4 deletions(-)
19 --- a/include/features.h
20 +++ b/include/features.h
25 -#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0
26 -# if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0
27 -# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
28 -# elif !__GNUC_PREREQ (4, 1)
29 +#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
30 + && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
31 +# if !__GNUC_PREREQ (4, 1)
32 # warning _FORTIFY_SOURCE requires GCC 4.1 or later
33 # elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0) \
34 || __GNUC_PREREQ (12, 0))