]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in [darwin]: Don't add -framework. -arch, -isysroot
authorPeter O'Gorman <peter@pogma.com>
Tue, 13 Dec 2005 14:39:22 +0000 (14:39 +0000)
committerPeter O'Gorman <peter@pogma.com>
Tue, 13 Dec 2005 14:39:22 +0000 (14:39 +0000)
to $compiler_flags if already in $CC with same arguments.

ChangeLog
ltmain.in

index 924f3d96996b84d85dec2a18282ccb22b764c739..d53960b4445ee7e0a22357892d23f0da68a30ebf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-13  Peter O'Gorman  <peter@pogma.com>
+
+       * ltmain.in [darwin]: Don't add -framework. -arch, -isysroot
+       to $compiler_flags if already in $CC with same arguments.
+
 2005-12-07  Marc Espie  <espie@nerim.net>
 
        * ltmain.in: Preserve both parts of `--tag TAG', for
index 7fe51797c76128ac95fe777eb70d65d28fcdcedd..1cac54161a87ed5239f7f38a15228746a40c566d 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1363,8 +1363,8 @@ EOF
          prev=
          continue
          ;;
-        darwin_framework)
-         compiler_flags="$compiler_flags $arg"
+       darwin_framework|darwin_framework_skip)
+         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
          compile_command="$compile_command $arg"
          finalize_command="$finalize_command $arg"
          prev=
@@ -1429,12 +1429,16 @@ EOF
        ;;
 
       -framework|-arch|-isysroot)
-        prev=darwin_framework
-        compiler_flags="$compiler_flags $arg"
+       case " $CC " in
+         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
+               prev=darwin_framework_skip ;;
+         *) compiler_flags="$compiler_flags $arg"
+            prev=darwin_framework ;;
+       esac
        compile_command="$compile_command $arg"
        finalize_command="$finalize_command $arg"
-        continue
-        ;;
+       continue
+       ;;
 
       -inst-prefix-dir)
        prev=inst_prefix