Преглед изворни кода

* Enable SSP for debug binary/testing.

Bryan Drewery пре 17 година
родитељ
комит
3a7a806682
4 измењених фајлова са 11 додато и 2 уклоњено
  1. 1 1
      Makefile.in
  2. 5 1
      autotools/includes/depend.m4
  3. 4 0
      configure
  4. 1 0
      doc/UPDATES

+ 1 - 1
Makefile.in

@@ -40,7 +40,7 @@ DIFF = @DIFF@
 #LIBS = @LIBS@ @ZLIB@ @SSL@ 
 #LIBS = @LIBS@ @ZLIB@ @SSL@ 
 LIBS = @LIBS@
 LIBS = @LIBS@
 
 
-DEBCXXFLAGS = -DDEBUG -fno-inline -g3 -ggdb3 -O0 -Wshadow -Wpointer-arith -Wcast-align @GCC3DEB@
+DEBCXXFLAGS = -DDEBUG -fno-inline -g3 -ggdb3 -O0 -Wshadow -Wpointer-arith -Wcast-align @GCC3DEB@ @GCC4DEB@
 CFLGS = @GCC3@
 CFLGS = @GCC3@
 _CFLGS = -fno-strict-aliasing -W -Wformat \
 _CFLGS = -fno-strict-aliasing -W -Wformat \
 #-Wshadow -Wnested-externs -Wno-format-y2k \
 #-Wshadow -Wnested-externs -Wno-format-y2k \

+ 5 - 1
autotools/includes/depend.m4

@@ -11,12 +11,16 @@ num=`$CXX -dumpversion | sed "s/^\\\(.\\\).*/\\\1/"`
 if test $num -ge "3"; then
 if test $num -ge "3"; then
   CCDEPMODE=gcc3
   CCDEPMODE=gcc3
 #  GCC3="-Wpadded -Wpacked -Wno-unused-parameter -Wmissing-format-attribute -Wdisabled-optimization"
 #  GCC3="-Wpadded -Wpacked -Wno-unused-parameter -Wmissing-format-attribute -Wdisabled-optimization"
-  GCC3="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -no-strict-aliasing"
+  GCC3="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -fno-strict-aliasing"
   GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
   GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
 fi
 fi
+if test $num -ge "4"; then
+  GCC4DEB="-fstack-protector-all"
+fi
 AC_SUBST(CCDEPMODE)dnl
 AC_SUBST(CCDEPMODE)dnl
 AC_SUBST(GCC3)dnl
 AC_SUBST(GCC3)dnl
 AC_SUBST(GCC3DEB)dnl
 AC_SUBST(GCC3DEB)dnl
+AC_SUBST(GCC4DEB)dnl
 ])
 ])
 
 
 AC_DEFUN([DO_DEPS],
 AC_DEFUN([DO_DEPS],

+ 4 - 0
configure

@@ -659,6 +659,7 @@ BASENAME
 AWK
 AWK
 HEAD_1
 HEAD_1
 SET_MAKE
 SET_MAKE
+GCC4DEB
 GCC3DEB
 GCC3DEB
 GCC3
 GCC3
 CCDEPMODE
 CCDEPMODE
@@ -3842,6 +3843,9 @@ if test $num -ge "3"; then
   GCC3="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -fno-strict-aliasing"
   GCC3="-W -Wno-unused-parameter -Wdisabled-optimization -Wno-write-strings -Wno-format-security -fno-strict-aliasing"
   GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
   GCC3DEB="-Wno-disabled-optimization -Wmissing-format-attribute"
 fi
 fi
+if test $num -ge "4"; then
+  GCC4DEB="-fstack-protector-all"
+fi
 
 
 
 
 #checkpoint
 #checkpoint

+ 1 - 0
doc/UPDATES

@@ -27,6 +27,7 @@
 * If a .resolv.conf exists, only use the nameservers listed in it
 * If a .resolv.conf exists, only use the nameservers listed in it
 * Remove all backup nameservers except for 4.2.2.2
 * Remove all backup nameservers except for 4.2.2.2
 * Prefer g++ 4.4.1 when compiling.
 * Prefer g++ 4.4.1 when compiling.
+* Enable SSP for debug binary/testing.
 
 
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)