pike7.8 (7.8.352-dfsg-3) 02_smartlink_rpath

Summary

 bin/smartlink   |    5 ++---
 src/smartlink.c |    5 +++--
 2 files changed, 5 insertions(+), 5 deletions(-)

    
download this patch

Patch contents

#! /bin/sh /usr/share/dpatch/dpatch-run
## 02_smartlink_rpath.dpatch
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Make smartlink not use -rpath

@DPATCH@
diff -urNad trunk~/bin/smartlink trunk/bin/smartlink
--- trunk~/bin/smartlink	2008-08-19 13:51:08.000000000 +0200
+++ trunk/bin/smartlink	2009-08-16 17:18:26.000000000 +0200
@@ -162,9 +162,8 @@
      LDOPTS="$LDOPTS -R$RPATH"
    ;;
    Linux\ 2.*)
-     if test x$LINKING != xno -a "x$RPATH" != x ; then
-      LDOPTS="$LDOPTS -Wl,-rpath,$RPATH"
-     fi
+     LD_LIBRARY_PATH="$RPATH"
+     export LD_LIBRARY_PATH
    ;;
    UnixWare\ 7.*)
      if test x$LINKING != xno -a "x$RPATH" != x ; then
diff -urNad trunk~/src/smartlink.c trunk/src/smartlink.c
--- trunk~/src/smartlink.c	2008-08-19 17:57:34.000000000 +0200
+++ trunk/src/smartlink.c	2009-08-16 17:18:26.000000000 +0200
@@ -160,7 +160,7 @@
   full_rpath = rpath;
 
 #ifdef USE_Wl
-  strcat(rpath, "-Wl,-rpath,");
+  /* strcat(rpath, "-Wl,-rpath,"); */
 #elif defined(USE_Wl_R)
   strcat(rpath, "-Wl,-R");
 #elif defined(USE_R)
@@ -310,7 +310,7 @@
     }
     rpath_in_use |= add_path(rpath, ld_lib_path);
   }
-
+#if 0
   if (rpath_in_use) {
     /* Delete the terminating ':' */
     rpath[strlen(rpath) - 1] = 0;
@@ -357,6 +357,7 @@
 #error Unknown method
 #endif
   }
+#endif
 
   new_argv[new_argc++] = NULL;