Gentoo Archives: gentoo-commits

From: "Ryan Hill (dirtyepic)" <dirtyepic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.6.0/gentoo: 10_all_default-fortify-source.patch README.history
Date: Mon, 04 Apr 2011 01:04:51
Message-Id: 20110404005255.9F90320054@flycatcher.gentoo.org
1 dirtyepic 11/04/04 00:52:55
2
3 Modified: 10_all_default-fortify-source.patch README.history
4 Log:
5 Unbreak -U_FORTIFY_SOURCE (bug #361783).
6
7 Revision Changes Path
8 1.2 src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch?r1=1.1&r2=1.2
13
14 Index: 10_all_default-fortify-source.patch
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- 10_all_default-fortify-source.patch 1 Apr 2011 05:20:12 -0000 1.1
21 +++ 10_all_default-fortify-source.patch 4 Apr 2011 00:52:55 -0000 1.2
22 @@ -1,9 +1,21 @@
23 -Enable -D_FORTIFY_SOURCE=2 by default at -O2 and higher.
24 +Enable -D_FORTIFY_SOURCE=2 by default
25
26
27 +--- a/gcc/c-family/c-cppbuiltin.c
28 ++++ b/gcc/c-family/c-cppbuiltin.c
29 +@@ -731,6 +731,9 @@ c_cpp_builtins (cpp_reader *pfile)
30 + builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
31 + builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
32 +
33 ++ /* Fortify Source enabled by default */
34 ++ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
35 ++
36 + /* Misc. */
37 + if (flag_gnu89_inline)
38 + cpp_define (pfile, "__GNUC_GNU_INLINE__");
39 --- a/gcc/doc/invoke.texi
40 +++ b/gcc/doc/invoke.texi
41 -@@ -5983,6 +5983,11 @@ also turns on the following optimization flags:
42 +@@ -5973,6 +5973,11 @@ also turns on the following optimization flags:
43 Please note the warning under @option{-fgcse} about
44 invoking @option{-O2} on programs that use computed gotos.
45
46 @@ -15,13 +27,3 @@
47 @item -O3
48 @opindex O3
49 Optimize yet more. @option{-O3} turns on all optimizations specified
50 ---- a/gcc/gcc.c
51 -+++ b/gcc/gcc.c
52 -@@ -741,6 +741,7 @@ static const char *cpp_unique_options =
53 - %{H} %C %{D*&U*&A*} %{i*} %Z %i\
54 - %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
55 - %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
56 -+ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
57 - %{E|M|MM:%W{o*}}";
58 -
59 - /* This contains cpp options which are common with cc1_options and are passed
60
61
62
63 1.2 src/patchsets/gcc/4.6.0/gentoo/README.history
64
65 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/README.history?rev=1.2&view=markup
66 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/README.history?rev=1.2&content-type=text/plain
67 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/README.history?r1=1.1&r2=1.2
68
69 Index: README.history
70 ===================================================================
71 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.6.0/gentoo/README.history,v
72 retrieving revision 1.1
73 retrieving revision 1.2
74 diff -u -r1.1 -r1.2
75 --- README.history 1 Apr 2011 05:20:12 -0000 1.1
76 +++ README.history 4 Apr 2011 00:52:55 -0000 1.2
77 @@ -1,4 +1,7 @@
78 -1.0 pending
79 +1.1 2011-04-03
80 + U 10_all_default-fortify-source.patch
81 +
82 +1.0 2011-04-02
83 + 03_all_java-nomulti.patch
84 + 08_all_cross-compile.patch
85 + 10_all_default-fortify-source.patch