components/net-snmp/patches/009.ltmain.sh.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Sat, 18 May 2013 09:18:20 -0700
changeset 1306 11b376b53ac1
parent 1301 636f7c363f41
child 1650 ce501c11d5fa
permissions -rw-r--r--
backout 16488880/15685782/15997718/15705167/15754602/16003771/16242256 - needs more work

--- net-snmp-5.4.2.1/ltmain.sh	Fri Jun  6 02:34:34 2008
+++ net-snmp-5.4.2.1/ltmain.mod.sh	Tue Feb  3 11:02:05 2009
@@ -1425,7 +1425,9 @@
 	  if test "$prev" = rpath; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
+	    *) rpath="$rpath $arg"
+        # This is make sure only $libdir path is encoded in RUNPATH
+        sma_rpath="$rpath" ;;
 	    esac
 	  else
 	    case "$xrpath " in
@@ -3915,7 +3917,7 @@
 	if test "$hardcode_into_libs" = yes; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
-	  dep_rpath=
+	  dep_rpath="-R $sma_rpath"
 	  rpath="$finalize_rpath"
 	  test "$mode" != relink && rpath="$compile_rpath$rpath"
 	  for libdir in $rpath; do
@@ -3935,7 +3937,7 @@
 		fi
 	      else
 		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
+		#dep_rpath="$dep_rpath $flag"
 	      fi
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in