Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.3.2/pie: 20_all_gcc-4.4-gentoo-hardened-setup.patch
Date: Wed, 31 Dec 2008 21:50:43
Message-Id: E1LI8xa-0003Ig-FX@stork.gentoo.org
1 solar 08/12/31 21:50:38
2
3 Modified: 20_all_gcc-4.4-gentoo-hardened-setup.patch
4 Log:
5 remove references to fortify and relro. relro should be default in our binutils for over a year now
6
7 Revision Changes Path
8 1.2 src/patchsets/gcc/4.3.2/pie/20_all_gcc-4.4-gentoo-hardened-setup.patch
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.2/pie/20_all_gcc-4.4-gentoo-hardened-setup.patch?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.2/pie/20_all_gcc-4.4-gentoo-hardened-setup.patch?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gcc/4.3.2/pie/20_all_gcc-4.4-gentoo-hardened-setup.patch?r1=1.1&r2=1.2
13
14 Index: 20_all_gcc-4.4-gentoo-hardened-setup.patch
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.3.2/pie/20_all_gcc-4.4-gentoo-hardened-setup.patch,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- 20_all_gcc-4.4-gentoo-hardened-setup.patch 26 Dec 2008 00:36:55 -0000 1.1
21 +++ 20_all_gcc-4.4-gentoo-hardened-setup.patch 31 Dec 2008 21:50:38 -0000 1.2
22 @@ -32,19 +32,19 @@
23 +#ifndef CC1_SSP_ALL_SPEC
24 +#define CC1_SSP_ALL_SPEC ""
25 +#endif
26 -+#ifndef CC1_FORTIFY_SPEC
27 -+#define CC1_FORTIFY_SPEC ""
28 -+#endif
29 +#ifndef CC1_STRICT_SPEC
30 +#define CC1_STRICT_SPEC ""
31 +#endif
32 -+#ifndef LINK_RELRO_SPEC
33 -+#define LINK_RELRO_SPEC ""
34 -+#endif
35 +#ifndef LINK_NOW_SPEC
36 +#define LINK_NOW_SPEC ""
37 +#endif
38 +
39 ++
40 ++
41 ++
42 ++
43 ++
44 ++
45 /* -u* was put back because both BSD and SysV seem to support it. */
46 /* %{static:} simply prevents an error message if the target machine
47 doesn't handle -static. */
48 @@ -53,7 +53,7 @@
49 #define LINK_COMMAND_SPEC "\
50 %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
51 - %(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
52 -+ %(linker) %l %(link_pie) %(link_relro) %(link_now) %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
53 ++ %(linker) %l %(link_pie) %(link_now) %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
54 %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
55 %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
56 %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
57 @@ -73,23 +73,14 @@
58 +static const char *cc1_ssp_spec = CC1_SSP_SPEC;
59 +static const char *cc1_ssp_all_spec = CC1_SSP_ALL_SPEC;
60 +static const char *cc1_pie_spec = CC1_PIE_SPEC;
61 -+static const char *cc1_fortify_spec = CC1_FORTIFY_SPEC;
62 +static const char *cc1_strict_spec = CC1_STRICT_SPEC;
63 -+static const char *link_relro_spec = LINK_RELRO_SPEC;
64 +static const char *link_now_spec = LINK_NOW_SPEC;
65 +static const char *link_pie_spec = LINK_PIE_SPEC;
66 ++
67 ++
68
69 /* Standard options to cpp, cc1, and as, to reduce duplication in specs.
70 There should be no need to override these in target dependent files,
71 -@@ -828,7 +860,7 @@
72 - %{H} %C %{D*&U*&A*} %{i*} %Z %i\
73 - %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
74 - %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
75 -- %{E|M|MM:%W{o*}}";
76 -+ %{E|M|MM:%W{o*}} %(cc1_fortify)";
77 -
78 - /* This contains cpp options which are common with cc1_options and are passed
79 - only when preprocessing only to avoid duplication. We pass the cc1 spec
80 @@ -1643,6 +1675,14 @@
81 INIT_STATIC_SPEC ("startfile_pie_t_gen", &startfile_pie_t_gen_spec),
82 INIT_STATIC_SPEC ("startfile_pie_gen", &startfile_pie_gen_spec),
83 @@ -97,9 +88,9 @@
84 + INIT_STATIC_SPEC ("cc1_ssp", &cc1_ssp_spec),
85 + INIT_STATIC_SPEC ("cc1_ssp_all", &cc1_ssp_all_spec),
86 + INIT_STATIC_SPEC ("cc1_pie", &cc1_pie_spec),
87 -+ INIT_STATIC_SPEC ("cc1_fortify", &cc1_fortify_spec),
88 ++ /* INIT_STATIC_SPEC ("cc1_fortify", &cc1_fortify_spec), */
89 + INIT_STATIC_SPEC ("cc1_strict", &cc1_strict_spec),
90 -+ INIT_STATIC_SPEC ("link_relro", &link_relro_spec),
91 ++ /* INIT_STATIC_SPEC ("link_relro", &link_relro_spec), */
92 + INIT_STATIC_SPEC ("link_now", &link_now_spec),
93 + INIT_STATIC_SPEC ("link_pie", &link_pie_spec),
94 };