Blame SOURCES/valgrind-3.16.0-some-stack-protector.patch

792938
commit b73fb7a614e1b5d60af23fb0752b5cead995e02e
792938
Author: Mark Wielaard <mark@klomp.org>
792938
Date:   Sun Apr 14 00:30:05 2019 +0200
792938
792938
    Remove no-stack-protector, add stack-protector-strong to some.
792938
792938
diff --git a/auxprogs/Makefile.am b/auxprogs/Makefile.am
792938
index 56cc5ef..1b7842b 100644
792938
--- a/auxprogs/Makefile.am
792938
+++ b/auxprogs/Makefile.am
792938
@@ -30,7 +30,7 @@ bin_PROGRAMS = valgrind-listener valgrind-di-server
792938
 
792938
 valgrind_listener_SOURCES = valgrind-listener.c
792938
 valgrind_listener_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
792938
-valgrind_listener_CFLAGS    = $(AM_CFLAGS_PRI)
792938
+valgrind_listener_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
792938
 valgrind_listener_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 valgrind_listener_LDFLAGS   = $(AM_CFLAGS_PRI)
792938
 if VGCONF_PLATVARIANT_IS_ANDROID
792938
@@ -49,7 +49,7 @@ endif
792938
 
792938
 valgrind_di_server_SOURCES   = valgrind-di-server.c
792938
 valgrind_di_server_CPPFLAGS  = $(AM_CPPFLAGS_PRI) -I$(top_srcdir)/coregrind
792938
-valgrind_di_server_CFLAGS    = $(AM_CFLAGS_PRI)
792938
+valgrind_di_server_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
792938
 valgrind_di_server_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 valgrind_di_server_LDFLAGS   = $(AM_CFLAGS_PRI)
792938
 if VGCONF_PLATVARIANT_IS_ANDROID
792938
@@ -84,7 +84,7 @@ endif
792938
 
792938
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES   = getoff.c
792938
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS  = $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
792938
-getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
792938
+getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS    = $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -fstack-protector-strong
792938
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 getoff_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
792938
 if HAVE_DLINFO_RTLD_DI_TLS_MODID
792938
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
792938
index f8447a1..f572741 100644
792938
--- a/cachegrind/Makefile.am
792938
+++ b/cachegrind/Makefile.am
792938
@@ -25,7 +25,7 @@ bin_PROGRAMS = cg_merge
792938
 
792938
 cg_merge_SOURCES = cg_merge.c
792938
 cg_merge_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
792938
-cg_merge_CFLAGS    = $(AM_CFLAGS_PRI)
792938
+cg_merge_CFLAGS    = $(AM_CFLAGS_PRI) -fstack-protector-strong
792938
 cg_merge_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 cg_merge_LDFLAGS   = $(AM_CFLAGS_PRI)
792938
 # If there is no secondary platform, and the platforms include x86-darwin,
792938
diff --git a/configure.ac b/configure.ac
792938
index f8c798b..ccc8f52 100755
792938
--- a/configure.ac
792938
+++ b/configure.ac
792938
@@ -2352,24 +2352,24 @@
792938
 AM_CONDITIONAL([HAVE_ALIGNED_CXX_ALLOC], [test x$ac_have_aligned_cxx_alloc = xyes])
792938
 
792938
 # does this compiler support -fno-stack-protector ?
792938
-AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
792938
-
792938
-safe_CFLAGS=$CFLAGS
792938
-CFLAGS="-fno-stack-protector -Werror"
792938
-
792938
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
792938
-  return 0;
792938
-]])], [
792938
-no_stack_protector=yes
792938
-FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
792938
-AC_MSG_RESULT([yes])
792938
-], [
792938
-no_stack_protector=no
792938
+#AC_MSG_CHECKING([if gcc accepts -fno-stack-protector])
792938
+#
792938
+#safe_CFLAGS=$CFLAGS
792938
+#CFLAGS="-fno-stack-protector -Werror"
792938
+#
792938
+#AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
792938
+#  return 0;
792938
+#]])], [
792938
+#no_stack_protector=yes
792938
+#FLAG_FNO_STACK_PROTECTOR="-fno-stack-protector"
792938
+#AC_MSG_RESULT([yes])
792938
+#], [
792938
+#no_stack_protector=no
792938
 FLAG_FNO_STACK_PROTECTOR=""
792938
-AC_MSG_RESULT([no])
792938
-])
792938
-CFLAGS=$safe_CFLAGS
792938
-
792938
+#AC_MSG_RESULT([no])
792938
+#])
792938
+#CFLAGS=$safe_CFLAGS
792938
+#
792938
 AC_SUBST(FLAG_FNO_STACK_PROTECTOR)
792938
 
792938
 # does this compiler support -finline-functions ?
792938
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
792938
index 94030fd..3c73210 100644
792938
--- a/coregrind/Makefile.am
792938
+++ b/coregrind/Makefile.am
792938
@@ -55,7 +55,7 @@ AR = ${LTO_AR}
792938
 RANLIB = ${LTO_RANLIB}
792938
 
792938
 valgrind_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
792938
-valgrind_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
792938
+valgrind_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
792938
 valgrind_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 valgrind_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
792938
 # If there is no secondary platform, and the platforms include x86-darwin,
792938
@@ -94,7 +94,7 @@ vgdb_SOURCES += vgdb-invoker-solaris.c
792938
 endif
792938
 
792938
 vgdb_CPPFLAGS  = $(AM_CPPFLAGS_PRI)
792938
-vgdb_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS)
792938
+vgdb_CFLAGS    = $(AM_CFLAGS_PRI) $(LTO_CFLAGS) -fstack-protector-strong
792938
 vgdb_CCASFLAGS = $(AM_CCASFLAGS_PRI)
792938
 vgdb_LDFLAGS   = $(AM_CFLAGS_PRI) @LIB_UBSAN@
792938
 if VGCONF_PLATVARIANT_IS_ANDROID