From de60ed90fb9ce1f15e785a9b73b2e644c3dc3413 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Tue, 21 Dec 2021 11:07:27 +0000 Subject: Remove Unusued arguments -pie and -static-libstdc++ in clang80 and clang80++ Resolves: [COMPMID-4977] Change-Id: If44cb02dbb7e537b135c5ade529f41857133423a Signed-off-by: Mohammed Suhail Munshi Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6846 Reviewed-by: Gunes Bayir Comments-Addressed: Gunes Bayir Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- SConscript | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index afff4e58bc..8d5e60867c 100644 --- a/SConscript +++ b/SConscript @@ -92,13 +92,18 @@ def build_objs(sources): def build_library(name, build_env, sources, static=False, libs=[]): + cloned_build_env = build_env.Clone() + if env['os'] == 'android' and static == False: + cloned_build_env["LINKFLAGS"].remove('-pie') + cloned_build_env["LINKFLAGS"].remove('-static-libstdc++') + if static: - obj = build_env.StaticLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs) + obj = cloned_build_env.StaticLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs) else: if env['set_soname']: - obj = build_env.SharedLibrary(name, source=sources, SHLIBVERSION = SONAME_VERSION, LIBS = arm_compute_env["LIBS"] + libs) + obj = cloned_build_env.SharedLibrary(name, source=sources, SHLIBVERSION = SONAME_VERSION, LIBS = arm_compute_env["LIBS"] + libs) else: - obj = build_env.SharedLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs) + obj = cloned_build_env.SharedLibrary(name, source=sources, LIBS = arm_compute_env["LIBS"] + libs) obj = install_lib(obj) Default(obj) -- cgit v1.2.1