--- ltmain.sh.orig	2010-12-14 14:01:46.000000000 -0500
+++ ltmain.sh	2010-12-14 14:14:41.000000000 -0500
@@ -1239,6 +1239,11 @@
 	  prev=
 	  continue
 	  ;;
+        xarch)
+          linkopts="$linkopts $arg"
+	  prev=
+	  continue
+          ;;
 	*)
 	  eval "$prev=\"\$arg\""
 	  prev=
@@ -1264,6 +1269,14 @@
 	continue
 	;;
 
+      # Darwin uses the -arch flag to determine output architecture.
+      # Add it to the link options for "archive_cmds".
+      -arch)
+	linkopts="$linkopts $arg"
+	prev=xarch
+	continue
+	;;
+
       -avoid-version)
 	avoid_version=yes
 	continue
