]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
dllimport when the lib is shared and not linking with -static
authorPeter Rosin <peda@lysator.liu.se>
Sun, 18 Jul 2010 15:17:15 +0000 (17:17 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Wed, 21 Jul 2010 16:19:50 +0000 (18:19 +0200)
* tests/stresstest.at: Link with main.lo when liba is shared
and linking main with -no-install.

ChangeLog
tests/stresstest.at

index 73f74355e7087bd1f4765199df0a634a40579b9a..d7aecc4b95ebea02235c04f44296930dc2196059 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-18  Peter Rosin  <peda@lysator.liu.se>
+
+       * tests/stresstest.at: Link with main.lo when liba is shared
+       and linking main with -no-install.
+
 2010-07-18  Peter Rosin  <peda@lysator.liu.se>
 
        * tests/stresstest.at [MSVC]: dllimport all imported
index 652232960115f3ae49049c4a6eac73f416018bf0..e71d492d969393591f22d05d77d75a1759b427c0 100644 (file)
@@ -264,9 +264,12 @@ do
                 [0],[ignore],[ignore])
        for st in '' '-static' '-no-install'
        do
-          case $st,$l3 in
-          ,-rpath*) mst= ;;
-          *) mst=-static ;;
+         # if -static is not passed, and the library is shared, then we have
+         # to use -DLIBA_DLL_IMPORT, thus main.lo (and not main-static.lo).
+         case $st,$l3 in
+         -static,*) mst=-static ;;
+         *,-rpath*) mst= ;;
+         *) mst=-static ;;
          esac
 
          LT_AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS $st -o "$rel"main$EXEEXT "$rel"main$mst.lo "$rel"sub2/liba.la],