From cfdcfeb3699a5346402eb61801609ac0a3b38cde Mon Sep 17 00:00:00 2001
From: William Welliver <william@welliver.org>
Date: Fri, 13 Oct 2017 21:51:25 -0400
Subject: [PATCH] smartlink: update the shell version of smartlink to include
 Darwin rpath

---
 bin/smartlink | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/bin/smartlink b/bin/smartlink
index c7076424dc..f78db6ac4c 100755
--- a/bin/smartlink
+++ b/bin/smartlink
@@ -176,6 +176,17 @@ if test x$# != x0 ; then
        LDOPTS="$LDOPTS -Xlinker -YP, -Xlinker $RPATH"
      fi
    ;;
+   Darwin\ *|NetBSD\ *)
+    if test x$LINKING != xno -a "x$RPATH" != x ; then
+      OIFS="$IFS"
+      IFS=":"
+      RPP="$PATH"
+      for RP in $RPATH ; do
+       LDOPTS="$LDOPTS -Wl,-rpath,$RP"
+     done
+     IFS="$OIFS"
+     fi
+   ;;
    *)
     LD_LIBRARY_PATH="$RPATH"
     LD_RUN_PATH="$RPATH"
-- 
GitLab