aboutsummaryrefslogtreecommitdiff
blob: fc39347180edeb2057bfc1349f1014f17e323118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
--- a/gcc/doc/invoke.texi	2012-03-01 10:57:59.000000000 +0100
+++ b/gcc/doc/invoke.texi	2012-07-30 00:57:03.766847851 +0200
@@ -3216,6 +3216,10 @@ aspects of format checking, the options
 @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
 @option{-Wformat=2} are available, but are not included in @option{-Wall}.
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{|}pie@r{]}is 
+this option enabled by default for C, C++, ObjC, ObjC++.
+To disable, use @option{-Wformat=0}.
+
 @item -Wformat-y2k
 @opindex Wformat-y2k
 @opindex Wno-format-y2k
@@ -3269,6 +3273,12 @@ currently a subset of what @option{-Wfor
 in future warnings may be added to @option{-Wformat-security} that are not
 included in @option{-Wformat-nonliteral}.)
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{|}pie@r{]} is
+this option enabled by default for C, C++, ObjC, ObjC++.  To disable,
+use @option{-Wno-format-security}, or disable all format warnings
+with @option{-Wformat=0}.  To make format security warnings fatal,
+specify @option{-Werror=format-security}.
+
 @item -Wformat=2
 @opindex Wformat=2
 @opindex Wno-format=2
@@ -6229,6 +6239,13 @@ also turns on the following optimization
 Please note the warning under @option{-fgcse} about
 invoking @option{-O2} on programs that use computed gotos.
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{|}pie@r{]},
+@option{-D_FORTIFY_SOURCE=2} is set by default, and is activated 
+when @option{-O} is set to 2 or higher. This enables additional 
+compile-time and run-time checks for several libc functions.
+To disable, specify either @option{-U_FORTIFY_SOURCE} or
+@option{-D_FORTIFY_SOURCE=0}.
+
 @item -O3
 @opindex O3
 Optimize yet more.  @option{-O3} turns on all optimizations specified
@@ -8475,6 +8492,12 @@ functions with buffers larger than 8 byt
 when a function is entered and then checked when the function exits.
 If a guard check fails, an error message is printed and the program exits.
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}ssp@r{]} this option
+is enabled by default for C, C++, ObjC, ObjC++, if none of 
+@option{-fno-stack-protector}, @option{-nostdlib}, 
+@option{-fno-stack-protector-all}, @option{nodefaultlibs}, 
+nor @option{-ffreestanding} are found.
+
 @item -fstack-protector-all
 @opindex fstack-protector-all
 Like @option{-fstack-protector} except that all functions are protected.
@@ -9457,6 +9480,12 @@ For predictable results, you must also s
 that were used to generate code (@option{-fpie}, @option{-fPIE},
 or model suboptions) when you specify this option.
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}pie@r{]} this option is
+enabled by default for C, C++, ObjC, ObjC++, if none of @option{-fno-PIE},
+@option{-fno-pie}, @option{-fPIC}, @option{-fpic}, @option{-fno-PIC},
+@option{-fno-pic}, @option{-nostdlib}, @option{-nostartfiles},
+@option{-shared}, @option{-nodefaultlibs}, nor @option{static} are found.
+
 @item -rdynamic
 @opindex rdynamic
 Pass the flag @option{-export-dynamic} to the ELF linker, on targets
@@ -19125,6 +19154,12 @@ used during linking.
 @code{__pie__} and @code{__PIE__}.  The macros have the value 1
 for @option{-fpie} and 2 for @option{-fPIE}.
 
+NOTE: With configure --enable-espf=@r{[}all@r{|}pie@r{]} this option is
+enabled by default for C, C++, ObjC, ObjC++, if none of @option{-fno-PIE},
+@option{-fno-pie}, @option{-fPIC}, @option{-fpic}, @option{-fno-PIC},
+@option{-fno-pic}, @option{-nostdlib}, @option{-nostartfiles},
+@option{-shared}, @option{-nodefaultlibs}, nor @option{static} are found.
+
 @item -fno-jump-tables
 @opindex fno-jump-tables
 Do not use jump tables for switch statements even where it would be
--- a/gcc/doc/install.texi	2012-03-02 10:37:30.000000000 +0100
+++ b/gcc/doc/install.texi	2012-07-23 18:05:14.160784593 +0200
@@ -1392,6 +1392,17 @@ do a @samp{make -C gcc gnatlib_and_tools
 Specify that the run-time libraries for stack smashing protection
 should not be built.
 
+@item --enable-espf=@var{list}
+Will turn on some compiler and preprosessor options as default.
+@option{-D_FORTIFY_SOURCE=2}, @option{-Wformat} and 
+@option{-Wformat-security} will be turn on as default and depend on
+if you use @samp{all} it will turn on @option{-fstack-protection}and
+@option{-fPIE} and @option{-pie} by default. if the support is there. If you
+use @samp{ssp} it will turn on @option{-fstack-protection} by default if the
+support is there. If you use @samp{pie} it will turn on @option{-fPIE} and
+@option{-pie} by default if the support is there. We only support
+i?86*-*-linux*, x86_32*-*-linux* and x86_64*-*-linux* as target for now.
+
 @item --disable-libquadmath
 Specify that the GCC quad-precision math library should not be built.
 On some systems, the library is required to be linkable when building