From f59e550bc8164a2a8d06bf18099f993c7181367c Mon Sep 17 00:00:00 2001 From: Andrea Mondelli Date: Fri, 22 Feb 2019 11:42:16 -0500 Subject: [PATCH] scons: conditional use of new RPATH inclusion MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On OSX, clang doesn’t support the -z option. This patch resolve the compiler error produced on MacOS platform. Change-Id: Idfe69c30fe40add97d16d0f2e25e598b30d26a9d Reviewed-on: https://gem5-review.googlesource.com/c/16649 Reviewed-by: Gabe Black Maintainer: Gabe Black --- SConstruct | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 026327c2c..5162c3dfb 100755 --- a/SConstruct +++ b/SConstruct @@ -1090,7 +1090,9 @@ def add_local_rpath(env, *targets): ] env.Append(RPATH=[env.Literal(os.path.join(*components))]) -main.Append(LINKFLAGS=Split('-z origin')) +if sys.platform != "darwin": + main.Append(LINKFLAGS=Split('-z origin')) + main.AddMethod(add_local_rpath, 'AddLocalRPATH') # builds in ext are shared across all configs in the build root. -- 2.30.2