From 7d30352848670657e6433ab5ca72966ea516df14 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Tue, 7 Jan 2020 12:56:01 +0000 Subject: COMPMID-3000 (Nightly) Bare metal debug build failures Added -fstack-protector-strong flag in order to solve the undefined reference to `__stack_chk_guard' when building in debug mode. Change-Id: Idd71c6cb0f4af57c9910c4a1b71e12caf66f6424 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/2544 Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- examples/SConscript | 4 ++-- tests/SConscript | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/SConscript b/examples/SConscript index add3022056..96a4f93d6b 100644 --- a/examples/SConscript +++ b/examples/SConscript @@ -57,7 +57,7 @@ for file in Glob("./graph_*.cpp"): prog = None if env['os'] in ['android', 'bare_metal'] or env['standalone']: - prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive']) + prog = examples_env.Program(example, ["{}.cpp".format(example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive', '-fstack-protector-strong']) Depends(prog, graph_dependency) prog = install_bin(prog) else: @@ -121,7 +121,7 @@ for file in Glob("#3rdparty/examples/graph_*.cpp"): prog = None if env['os'] in ['android', 'bare_metal'] or env['standalone']: - prog = examples_env.Program(example, [examples_env.Object(source=file, target=example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive']) + prog = examples_env.Program(example, [examples_env.Object(source=file, target=example), utils, graph_utils], LIBS = examples_libs + arm_compute_graph_libs, LINKFLAGS=examples_env["LINKFLAGS"]+['-Wl,--whole-archive',graph_dependency,'-Wl,--no-whole-archive', '-fstack-protector-strong']) Depends(prog, graph_dependency) prog = install_bin(prog) else: diff --git a/tests/SConscript b/tests/SConscript index 0c56a7475c..a6668e1f98 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -155,9 +155,9 @@ if test_env['benchmark_tests']: Default(arm_compute_benchmark) Export('arm_compute_benchmark') -bm_link_flags = [] +bm_link_flags = ['-fstack-protector-strong'] if test_env['linker_script']: - bm_link_flags = ['-Wl,--build-id=none', '-T', env['linker_script']] + bm_link_flags += ['-Wl,--build-id=none', '-T', env['linker_script']] if test_env['validation_tests']: arm_compute_validation_framework = env.StaticLibrary('arm_compute_validation_framework', Glob('validation/reference/*.cpp') + Glob('validation/*.cpp'), LIBS= [ arm_compute_test_framework, arm_compute_core_a]) -- cgit v1.2.1