scons: conditional use of new RPATH inclusion

On OSX, clang doesn’t support the -z option.
This patch resolve the compiler error produced on MacOS platform.

Change-Id: Idfe69c30fe40add97d16d0f2e25e598b30d26a9d
Reviewed-by: Gabe Black <>
Maintainer: Gabe Black <>
diff --git a/SConstruct b/SConstruct
index 026327c..5162c3d 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1090,7 +1090,9 @@
-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.