Explorar o código

add optional support for IBM Stack-Smashing-Protection patch

Ralf S. Engelschall %!s(int64=22) %!d(string=hai) anos
pai
achega
e6eae14d95
Modificáronse 1 ficheiros con 9 adicións e 1 borrados
  1. 9 1
      gcc/gcc.spec

+ 9 - 1
gcc/gcc.spec

@@ -27,6 +27,7 @@
 %define       V_full         3.3
 %define       V_comp         %nil
 %define       V_bounds       1.01
+%define       V_spp          1
 
 #   package information
 Name:         gcc
@@ -38,7 +39,7 @@ Distribution: OpenPKG [CORE]
 Group:        Language
 License:      GPL
 Version:      %{V_full}
-Release:      20030701
+Release:      20030702
 
 #   package options
 %option       with_cxx       yes
@@ -46,12 +47,14 @@ Release:      20030701
 %option       with_binutils  yes
 %option       with_threads   yes
 %option       with_bounds    no
+%option       with_spp       no
 %option       with_gcc       no
 
 #   list of sources
 Source0:      ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
 Patch0:       gcc.patch
 Patch1:       http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-gcc-%{version}-%{V_bounds}.patch.bz2
+Patch2:       http://www.trl.ibm.com/projects/security/ssp/gcc3_3/protector-%{version}-%{V_spp}.tar.gz
 
 #   build information
 Prefix:       %{l_prefix}
@@ -77,6 +80,11 @@ Provides:     gcc = %{version}-%{release}
     %patch0 -p0
 %if "%{with_bounds}" == "yes"
     %patch1 -p1
+%endif
+%if "%{with_spp}" == "yes"
+    ( cd gcc
+      %{l_gzip} -d -c %{SOURCE protector-%{version}-%{V_spp}.tar.gz} | %{l_tar} xf -
+      %{l_patch} -p1 <protector.dif )
 %endif
     %{l_shtool} subst -v -s \
         -e "s;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g" \