libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool woes


From: Peter Rosin
Subject: Re: libtool woes
Date: Tue, 10 Sep 2013 14:50:17 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8

On 2013-09-10 12:52, Ozkan Sezer wrote:
> That effectively cripples libtool for cross-compilers. Can the behavior
> be refined instead?  Can you contact Charles Wilson about this?

He should be reading this list, if he has time...

Anyway, does this work?

Cheers,
Peter

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 4418a1c..59953d1 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2246,23 +2246,38 @@ if test yes = "$GCC"; then
   done
   lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
 BEGIN {RS = " "; FS = "/|\n";} {
-  lt_foo = "";
-  lt_count = 0;
+  lt_canon_foo = "";
+  lt_canon_count = 0;
+  lt_multi_foo = "";
+  lt_multi_count = 0;
+  lt_multi = 1;
   for (lt_i = NF; lt_i > 0; lt_i--) {
-    if ($lt_i != "" && $lt_i != ".") {
+    if ($lt_i == ";") {
+      lt_multi = 0;
+      continue;
+    }
+    if ($lt_i == "" || $lt_i == ".") continue;
+    if (!lt_multi) {
       if ($lt_i == "..") {
-        lt_count++;
+        lt_canon_count++;
+      } else if (lt_canon_count == 0) {
+        lt_canon_foo = "/" $lt_i lt_canon_foo;
       } else {
-        if (lt_count == 0) {
-          lt_foo = "/" $lt_i lt_foo;
-        } else {
-          lt_count--;
-        }
+        lt_canon_count--;
       }
     }
+    if ($lt_i == "..") {
+      lt_multi_count++;
+    } else if (lt_multi_count == 0) {
+      lt_multi_foo = "/" $lt_i lt_multi_foo;
+    } else {
+      lt_multi_count--;
+    }
   }
-  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
-  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+  if (lt_canon_foo != "") { lt_canon_freq[lt_canon_foo]++; }
+  if (lt_canon_freq[lt_multi_foo]) { lt_multi_foo = lt_canon_foo; }
+  if (lt_multi_foo != "") { lt_multi_freq[lt_multi_foo]++; }
+  if (lt_multi_freq[lt_multi_foo] == 1) { print lt_multi_foo; }
 }'`
   # AWK program above erroneously prepends '/' to C:/dos/paths
   # for these hosts.


Attachment: multilib.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]