libtool
[Top][All Lists]
Advanced

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

Re: libtool woes


From: Ozkan Sezer
Subject: Re: libtool woes
Date: Tue, 10 Sep 2013 16:00:27 +0300

On 9/10/13, Peter Rosin <address@hidden> wrote:
> 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?
>

No, it does not.  With this patch applied, I see
sys_lib_search_path_spec="/opt/W64_180676/lib/gcc "
..  in the libtool --config output.

(Note that, this is not a multilib compiler: it targets only win64.)


> 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.
>

--
O.S.



reply via email to

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