summaryrefslogtreecommitdiffstats
path: root/tools/libtool/patches/120-strip-unsafe-dirs-for-relinking.patch
blob: 1c3df4c0049a6f0d0e03152307a1ab85233152e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -2183,6 +2183,9 @@ func_mode_install ()
 	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
+	  relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
+	  relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
+
 	  func_warning "relinking \`$file'"
 	  func_show_eval "$relink_command" \
 	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
--- a/libltdl/config/ltmain.sh
+++ b/libltdl/config/ltmain.sh
@@ -2972,6 +2972,9 @@ func_mode_install ()
 	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
+	  relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
+	  relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
+
 	  func_warning "relinking \`$file'"
 	  func_show_eval "$relink_command" \
 	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'