diff options
author | Magnus Granberg <zorry@gentoo.org> | 2016-09-19 16:53:08 +0000 |
---|---|---|
committer | Magnus Granberg <zorry@gentoo.org> | 2016-09-19 16:53:08 +0000 |
commit | 250d22a0f04b8df339321f198d16ad1db4676cd5 (patch) | |
tree | 65b96338dc09f50923a476fcc7867af6ab6d0ccf /src/patchsets/gcc | |
parent | Add patchset for GCC 6.2 (diff) | |
download | gentoo-250d22a0f04b8df339321f198d16ad1db4676cd5.tar.gz gentoo-250d22a0f04b8df339321f198d16ad1db4676cd5.tar.bz2 gentoo-250d22a0f04b8df339321f198d16ad1db4676cd5.zip |
add default ssp support for gcc 6.2.0
Diffstat (limited to 'src/patchsets/gcc')
-rw-r--r-- | src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch | 55 | ||||
-rw-r--r-- | src/patchsets/gcc/6.2.0/gentoo/README.history | 5 |
2 files changed, 59 insertions, 1 deletions
diff --git a/src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch b/src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch new file mode 100644 index 0000000000..03624870f8 --- /dev/null +++ b/src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch @@ -0,0 +1,55 @@ +We disable ssp on -nostdlib and -ffreestanding as we did on older gcc +and change the buffer size. + +--- a/gcc/c-family/c-opts.c 2016-03-08 23:30:44.000000000 +0100 ++++ b/gcc/c-family/c-opts.c 2016-09-18 18:42:10.231644014 +0200 +@@ -436,7 +436,15 @@ c_common_handle_option (size_t scode, co + + case OPT_ffreestanding: + value = !value; ++ if (global_options.x_flag_stack_protect == -1) ++ global_options.x_flag_stack_protect = 0; + /* Fall through.... */ ++ ++ case OPT_nostdlib: ++ if (global_options.x_flag_stack_protect == -1) ++ global_options.x_flag_stack_protect = 0; ++ /* Fall through.... */ ++ + case OPT_fhosted: + flag_hosted = value; + flag_no_builtin = !value; +--- a/gcc/c-family/c.opt 2016-03-23 18:51:56.000000000 +0100 ++++ b/gcc/c-family/c.opt 2016-09-18 18:46:17.071649782 +0200 +@@ -1647,6 +1647,10 @@ nostdinc++ + C++ ObjC++ + Do not search standard system include directories for C++. + ++nostdlib ++C ObjC C++ ObjC++ ++; Documented in common.opt ++ + o + C ObjC C++ ObjC++ Joined Separate + ; Documented in common.opt +--- a/gcc/gcc.c 2016-02-19 23:18:38.000000000 +0100 ++++ b/gcc/gcc.c 2016-09-18 18:47:35.621651618 +0200 +@@ -1132,6 +1143,7 @@ static const char *cc1_options = + %{-help=*:--help=%*}\ + %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ + %{fsyntax-only:-o %j} %{-param*}\ ++ %{nostdlib:-nostdlib}\ + %{coverage:-fprofile-arcs -ftest-coverage}"; + + static const char *asm_options = +--- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200 ++++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200 +@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, + DEFPARAM (PARAM_SSP_BUFFER_SIZE, + "ssp-buffer-size", + "The lower bound for a buffer to be considered for stack smashing protection.", +- 8, 1, 0) ++ 4, 1, 0) + + DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING, + "min-size-for-stack-sharing", diff --git a/src/patchsets/gcc/6.2.0/gentoo/README.history b/src/patchsets/gcc/6.2.0/gentoo/README.history index 809854e640..c403e73ccf 100644 --- a/src/patchsets/gcc/6.2.0/gentoo/README.history +++ b/src/patchsets/gcc/6.2.0/gentoo/README.history @@ -1,4 +1,7 @@ -1.0 10 sep 2016 +1.1 19 Sep 2016 + + 13_all_default-ssp-fix.patch + +1.0 10 Sep 2016 + 10_all_default-fortify-source.patch + 11_all_default-warn-format-security.patch + 12_all_default-warn-trampolines.patch |