From 8b74c784e55b3c0747231b37d8f5dd8d4630d8d2 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Thu, 14 Sep 2017 14:33:20 +0100 Subject: COMPMID-417: Add -fstack-protector-strong flag The compiler seems to perform some "illegal" optimisations regarding the stack pointer which cause valgrind to report invalid writes. (Or it could be a compiler bug). Compiling with -fstack-protector-strong generates "correct" code and thus allows to use valgrind. Change-Id: I841dc839b5edb49f6f27acc1b3904671294476fc Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87719 Reviewed-by: Georgios Pinitas Tested-by: Kaizen --- SConstruct | 1 + 1 file changed, 1 insertion(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index cb08c89fcc..b46f775541 100644 --- a/SConstruct +++ b/SConstruct @@ -201,6 +201,7 @@ else: if env['asserts']: env.Append(CPPDEFINES = ['ARM_COMPUTE_ASSERTS_ENABLED']) + env.Append(CXXFLAGS = ['-fstack-protector-strong']) env.Append(CPPPATH = ['#/include', "#"]) env.Append(CXXFLAGS = env['extra_cxx_flags']) -- cgit v1.2.1