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