]> 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>
Fri, 15 Aug 2008 06:54:55 +0000 (08:54 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Tue, 13 Jan 2009 09:04:17 +0000 (10:04 +0100)
* tests/stresstest.at: Link with main.lo when liba is shared
and linking main with -no-install.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/stresstest.at

index c81c844ccb72217c8bdb11ec8f4df59b1f4cffc1..11abf321cb036353832d85841fa4805bd6c23108 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-15  Peter Rosin  <peda@lysator.liu.se>
+
+       * tests/stresstest.at: Link with main.lo when liba is shared
+       and linking main with -no-install.
+
 2008-08-15  Peter Rosin  <peda@lysator.liu.se>
 
        * tests/link-order.at [MSVC]: Always dllimport exported
index ee5fd293a2401b270846c482544a844e5702ff8a..c9fee10b9b8c14018e6c86e07c931ff5467364c2 100644 (file)
@@ -252,9 +252,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],