scons: conditional use of new RPATH inclusion
authorAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Fri, 22 Feb 2019 16:42:16 +0000 (11:42 -0500)
committerAndrea Mondelli <Andrea.Mondelli@ucf.edu>
Sat, 23 Feb 2019 03:15:59 +0000 (03:15 +0000)
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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

SConstruct

index 026327c2c1b6c543589aaa71160884e2e555e66b..5162c3dfb2c4df3639b70d92a211224eb3b02564 100755 (executable)
@@ -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.