aboutsummaryrefslogtreecommitdiff
path: root/tests/SConscript
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-02-07 09:45:55 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-10-13 09:40:19 +0000
commit6a9e801743b85706177b01e1ffb31320222c4378 (patch)
tree380b7f08fe897f19c397175d7be29d2e747fcc4c /tests/SConscript
parentd056e574f60ca731b2d078e56c6baca5a6c642ac (diff)
downloadComputeLibrary-6a9e801743b85706177b01e1ffb31320222c4378.tar.gz
COMPMID-3830: Support baremetal with gcc7+
Change-Id: I987a1c6b87419a10dd85ecd7f71baad416d359e1 Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4139 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Diffstat (limited to 'tests/SConscript')
-rw-r--r--tests/SConscript8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/SConscript b/tests/SConscript
index 9e6c78d8c5..6fc67af747 100644
--- a/tests/SConscript
+++ b/tests/SConscript
@@ -154,10 +154,12 @@ if env['gles_compute']:
files_validation += Glob('validation/GLES_COMPUTE/*/*.cpp')
files_validation += Glob('validation/GLES_COMPUTE/*.cpp')
+extra_link_flags = []
if env['os'] == 'android':
test_env.Append(LIBS = ["log"])
elif env['os'] != 'bare_metal':
test_env.Append(LIBS = ["rt"])
+ extra_link_flags += ['-fstack-protector-strong']
if test_env['benchmark_tests']:
arm_compute_benchmark = test_env.Program('arm_compute_benchmark', files_benchmark + common_objects)
@@ -167,7 +169,7 @@ if test_env['benchmark_tests']:
Default(arm_compute_benchmark)
Export('arm_compute_benchmark')
-bm_link_flags = ['-fstack-protector-strong']
+bm_link_flags = []
if test_env['linker_script']:
bm_link_flags += ['-Wl,--build-id=none', '-T', env['linker_script']]
@@ -219,7 +221,7 @@ if test_env['validation_tests']:
for file in Glob("validate_examples/graph_*.cpp"):
example = "validate_" + os.path.basename(os.path.splitext(str(file))[0])
if env['os'] in ['android', 'bare_metal'] or env['standalone']:
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"] + [ arm_compute_validation_framework ], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',arm_compute_lib,'-Wl,--no-whole-archive'] + bm_link_flags)
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils]+ files_validate_examples, LIBS = test_env["LIBS"] + [ arm_compute_validation_framework ], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',arm_compute_lib,'-Wl,--no-whole-archive'] + bm_link_flags + extra_link_flags)
arm_compute_validate_examples += [ prog ]
else:
#-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies
@@ -268,7 +270,7 @@ if test_env['benchmark_examples']:
for file in Glob("%s/graph_*.cpp" % examples_folder ):
example = "benchmark_" + os.path.basename(os.path.splitext(str(file))[0])
if env['os'] in ['android', 'bare_metal'] or env['standalone']:
- prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils, graph_params]+ files_benchmark_examples, LIBS = test_env["LIBS"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',arm_compute_lib,'-Wl,--no-whole-archive'] + bm_link_flags)
+ prog = test_env.Program(example, [ test_env.Object(source=file, target=example), graph_utils, graph_params]+ files_benchmark_examples, LIBS = test_env["LIBS"], LINKFLAGS=test_env["LINKFLAGS"]+['-Wl,--whole-archive',arm_compute_lib,'-Wl,--no-whole-archive'] + bm_link_flags + extra_link_flags)
arm_compute_benchmark_examples += [ prog ]
else:
#-Wl,--allow-shlib-undefined: Ignore dependencies of dependencies