summaryrefslogtreecommitdiffstats
path: root/tools/libtool/patches/100-libdir-fixes.patch
blob: d4e6f785ccd6412f4f2bf21bf2e300f72100aeb5 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -5715,8 +5715,14 @@ func_mode_link ()
 	    absdir="$abs_ladir"
 	    libdir="$abs_ladir"
 	  else
-	    dir="$lt_sysroot$libdir"
-	    absdir="$lt_sysroot$libdir"
+	    # Adding 'libdir' from the .la file to our library search paths
+	    # breaks crosscompilation horribly.  We cheat here and don't add
+	    # it, instead adding the path where we found the .la.  -CL
+	    dir="$lt_sysroot$abs_ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	    #dir="$libdir"
+	    #absdir="$lt_sysroot$libdir"
 	  fi
 	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
@@ -6114,8 +6120,6 @@ func_mode_link ()
 		add="$libdir/$linklib"
 	      fi
 	    else
-	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
@@ -6270,7 +6274,17 @@ func_mode_link ()
 		  fi
 		  ;;
 		*)
-		  path="-L$absdir/$objdir"
+                  # OE sets installed=no in staging. We need to look in $objdir and $absdir, 
+                  # preferring $objdir. RP 31/04/2008
+                  if test -f "$absdir/$objdir/$depdepl" ; then
+		    depdepl="$absdir/$objdir/$depdepl"
+		    path="-L$absdir/$objdir"
+                  elif test -f "$absdir/$depdepl" ; then
+		    depdepl="$absdir/$depdepl"
+		    path="-L$absdir"
+                  else
+		    path="-L$absdir/$objdir"
+                  fi
 		  ;;
 		esac
 		else
--- a/libltdl/config/ltmain.sh
+++ b/libltdl/config/ltmain.sh
@@ -6504,8 +6504,14 @@ func_mode_link ()
 	    absdir="$abs_ladir"
 	    libdir="$abs_ladir"
 	  else
-	    dir="$lt_sysroot$libdir"
-	    absdir="$lt_sysroot$libdir"
+	    # Adding 'libdir' from the .la file to our library search paths
+	    # breaks crosscompilation horribly.  We cheat here and don't add
+	    # it, instead adding the path where we found the .la.  -CL
+	    dir="$lt_sysroot$abs_ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	    #dir="$libdir"
+	    #absdir="$lt_sysroot$libdir"
 	  fi
 	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
@@ -6903,8 +6909,6 @@ func_mode_link ()
 		add="$libdir/$linklib"
 	      fi
 	    else
-	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
@@ -7059,7 +7063,17 @@ func_mode_link ()
 		  fi
 		  ;;
 		*)
-		  path="-L$absdir/$objdir"
+                  # OE sets installed=no in staging. We need to look in $objdir and $absdir, 
+                  # preferring $objdir. RP 31/04/2008
+                  if test -f "$absdir/$objdir/$depdepl" ; then
+		    depdepl="$absdir/$objdir/$depdepl"
+		    path="-L$absdir/$objdir"
+                  elif test -f "$absdir/$depdepl" ; then
+		    depdepl="$absdir/$depdepl"
+		    path="-L$absdir"
+                  else
+		    path="-L$absdir/$objdir"
+                  fi
 		  ;;
 		esac
 		else