libtool-patches
[Top][All Lists]
Advanced

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

Re: inherited linker flags misses linker flags on darwin


From: Christoph Egger
Subject: Re: inherited linker flags misses linker flags on darwin
Date: Mon, 22 Aug 2005 16:05:51 +0200 (MEST)

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ralf Wildenhues wrote:
> 
> | I backed out this patch.  It was obviously broken, and I need at least
> | a bit of time to investigate (and do not want bogus bug reports
> | because of this patch causing havoc on !darwin).  For one, a `$' was
> | missing (wonder how I could overlook this on first inspection ;-),
> | for another on !darwin it does not work but harms.
> 
> My fault. Shouldn't try to pack and patch at the same time.

Hi Peter! Welcome back from vacation.

> I believe this is better.

There is still one bug remaining in the for loop below.




2005-08-22  Peter O'Gorman  <address@hidden>

    * config/ltmain.m4sh (inherited_linker_flags): Work when output
    is an application too.
    Reported by Christopher Egger <address@hidden>

Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.84
diff -u -3 -p -u -r1.84 ltmain.m4sh
--- config/ltmain.m4sh    12 Aug 2005 21:06:13 -0000    1.84
+++ config/ltmain.m4sh    22 Aug 2005 13:47:56 -0000
@@ -3357,19 +3357,20 @@ func_mode_link ()
     # Read the .la file
     func_source "$lib"
 
-    case $host in
-    *-*-darwin*)
-      # Convert "-framework foo" to "foo.ltframework"
-      if test -n "$inherited_linker_flags"; then
-        tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" |
$Xsed -e 's/-framework \([[^ $]]*\)/\1.ltframework/g'`
-        new_inherited_linker_flags="$new_inherited_linker_flags
$tmp_inherited_linker_flags"
-      fi
-      dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([[^
$]]*\).ltframework% -framework \1%g'`
-      ;;
-    esac
+    # Convert "-framework foo" to "foo.ltframework"
+    if test -n "$inherited_linker_flags"; then
+      tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed
-e 's/-framework \([[^ $]]*\)/\1.ltframework/g'`
+      for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+        case " $new_inherited_linker_flags " in
+          *" tmp_inherited_linker_flag "*) ;;
+          *) new_inherited_linker_flags="$new_inherited_linker_flags
$tmp_inherited_linker_flag";;

Replace this with (note the change to the singular):

           *) new_inherited_linker_flags="$new_inherited_linker_flag
$tmp_inherited_linker_flag";;

+        esac
+      done
+    fi
+    dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([[^
$]]*\).ltframework% -framework \1%g'`
     if test "$linkmode,$pass" = "prog,link"; then
-      compile_deplibs="$inherited_linker_flags $compile_deplibs"
-      finalize_deplibs="$inherited_linker_flags $finalize_deplibs"
+      compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+      finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
     else
       compiler_flags="$compiler_flags $inherited_linker_flags"
     fi

-- 
Greetings,

Christoph

5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++




reply via email to

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