zorry       16/09/19 16:53:08

  Modified:             README.history
  Added:                13_all_default-ssp-fix.patch
  Log:
  add default ssp support for gcc 6.2.0

Revision  Changes    Path
1.2                  src/patchsets/gcc/6.2.0/gentoo/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/6.2.0/gentoo/README.history?rev=1.2&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/6.2.0/gentoo/README.history?rev=1.2&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/6.2.0/gentoo/README.history?r1=1.1&r2=1.2

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/6.2.0/gentoo/README.history,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.history      12 Sep 2016 15:20:57 -0000      1.1
+++ README.history      19 Sep 2016 16:53:08 -0000      1.2
@@ -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



1.1                  src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/6.2.0/gentoo/13_all_default-ssp-fix.patch?rev=1.1&content-type=text/plain

Index: 13_all_default-ssp-fix.patch
===================================================================
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",




Reply via email to