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