Browse Source

more static link issues

David Rose 16 years ago
parent
commit
f44857f8ee

+ 2 - 1
dtool/pptempl/Global.pp

@@ -457,7 +457,8 @@
 // within this tree) that we must link a particular target with.  It
 // is the transitive closure of our dependent libs: the libraries we
 // depend on, plus the libraries *those* libraries depend on, and so on.
-#defer complete_local_libs $[unique $[closure all_libs,$[active_libs]]]
+#defer nonunique_complete_local_libs $[closure all_libs,$[active_libs]]
+#defer complete_local_libs $[unique $[nonunique_complete_local_libs]]
 
 // And $[complete_ipath] is the list of directories (from within this
 // tree) we should add to our -I list.  It's basically just one for

+ 9 - 1
dtool/pptempl/Template.unix.pp

@@ -110,7 +110,15 @@
 #defer lpath $[sort $[complete_lpath]] $[other_trees_lib] $[install_lib_dir] $[get_lpath]
 
 // And $[libs] is the set of libraries we will link with.
-#defer libs $[unique $[actual_local_libs:%=%$[dllext]] $[patsubst %:m,,%:c %,%$[dllext],$[OTHER_LIBS]] $[get_libs]]
+#defer nonunique_libs $[nonunique_complete_local_libs:%=%$[dllext]] $[patsubst %:m,,%:c %,%$[dllext],$[OTHER_LIBS]] $[get_libs]
+
+// Don't use $[unique] here, since some libraries actually do need to be
+// named multiple times (when linking static).
+#if $[LINK_ALL_STATIC]
+  #defer libs $[nonunique_libs]
+#else
+  #defer libs $[unique $[nonunique_libs]]
+#endif
 
 // And $[frameworks] is the set of OSX-style frameworks we will link with.
 #defer frameworks $[unique $[get_frameworks]]

+ 1 - 1
dtool/src/interrogate/Sources.pp

@@ -1,6 +1,6 @@
 #define BUILD_DIRECTORY $[HAVE_INTERROGATE]
 
-#define LOCAL_LIBS cppParser pystub interrogatedb dconfig dtoolutil dtoolbase
+#define LOCAL_LIBS cppParser interrogatedb dconfig dtoolutil dtoolbase pystub
 #define USE_PACKAGES openssl
 
 #begin bin_target

+ 1 - 1
dtool/src/test_interrogate/Sources.pp

@@ -1,4 +1,4 @@
-#define LOCAL_LIBS pystub interrogatedb dconfig dtoolutil dtoolbase
+#define LOCAL_LIBS interrogatedb dconfig dtoolutil dtoolbase pystub
 #define USE_PACKAGES openssl
 
 #begin bin_target