libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.4-41-g44f2e4b


From: Peter Rosin
Subject: [SCM] GNU Libtool branch, pr-msvc-support, updated. v2.2.4-41-g44f2e4b
Date: Fri, 15 Aug 2008 11:43:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, pr-msvc-support has been updated
       via  44f2e4b6e75c8573ab19d5a8fd14f4f2cf31958d (commit)
       via  9ca15d89442bb61fd3eb08bb213c6471ac06db7f (commit)
       via  db25f668beb6f5412f8dac79bd09977e95d22a3b (commit)
      from  fe8b365cca167d63c6b6acecf19ef0bbd1f87dd6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 44f2e4b6e75c8573ab19d5a8fd14f4f2cf31958d
Author: Peter Rosin <address@hidden>
Date:   Fri Aug 15 10:04:25 2008 +0200

    dllimport variables for MSVC in stresstest.at
    
    * tests/stresstest.at [MSVC]: dllimport all imported
    variables.
    
    Signed-off-by: Peter Rosin <address@hidden>
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 9ca15d89442bb61fd3eb08bb213c6471ac06db7f
Author: Peter Rosin <address@hidden>
Date:   Fri Aug 15 08:54:55 2008 +0200

    dllimport when the lib is shared and not linking with -static
    
    * tests/stresstest.at: Link with main.lo when liba is shared
    and linking main with -no-install.
    
    Signed-off-by: Peter Rosin <address@hidden>
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit db25f668beb6f5412f8dac79bd09977e95d22a3b
Author: Peter Rosin <address@hidden>
Date:   Fri Aug 15 08:33:59 2008 +0200

    Always dllimport the variable for MSVC in link-order.at
    
    * tests/link-order.at [MSVC]: Always dllimport exported
    variables.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   15 +++++++++++++++
 tests/link-order.at |   20 ++++++++++++++++++--
 tests/stresstest.at |   49 ++++++++++++++++++++++++++++++++-----------------
 3 files changed, 65 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 970a124..1df978f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2008-08-15  Peter Rosin  <address@hidden>
+
+       * tests/stresstest.at [MSVC]: dllimport all imported
+       variables.
+
+2008-08-15  Peter Rosin  <address@hidden>
+
+       * tests/stresstest.at: Link with main.lo when liba is shared
+       and linking main with -no-install.
+
+2008-08-15  Peter Rosin  <address@hidden>
+
+       * tests/link-order.at [MSVC]: Always dllimport exported
+       variables.
+
 2008-08-13  Ralf Wildenhues  <address@hidden>
 
        * libltdl/m4/libtool.m4 (_LT_PROG_AR, LT_PATH_NM): Fix bogus
diff --git a/tests/link-order.at b/tests/link-order.at
index ce52cc9..8791df8 100644
--- a/tests/link-order.at
+++ b/tests/link-order.at
@@ -48,13 +48,29 @@ for i in old new; do
   mkdir src
 
   cat >src/a_$i.c <<EOF
-extern int c;
+/* w32 fun, MSVC supports dllimport even if importing is not needed (static
+ * case). gnu has auto import.
+ */
+#ifdef _MSC_VER
+#  define LIBCEE_SCOPE __declspec(dllimport)
+#else
+#  define LIBCEE_SCOPE extern
+#endif
+LIBCEE_SCOPE int c;
 extern int b_$i();
 int a_$i() { return c + b_$i(); }
 EOF
 
   cat >src/b_$i.c <<EOF
-extern int c;
+/* w32 fun, MSVC supports dllimport even if importing is not needed (static
+ * case). gnu has auto import.
+ */
+#ifdef _MSC_VER
+#  define LIBCEE_SCOPE __declspec(dllimport)
+#else
+#  define LIBCEE_SCOPE extern
+#endif
+LIBCEE_SCOPE int c;
 int b_$i() { return 1 + c; }
 EOF
 
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 27e7ee9..3b6658d 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -93,29 +93,35 @@ AT_DATA(main.c,
 #if defined(LIBA_DLL_IMPORT)
 #  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
 #    define LIBA_SCOPE extern __declspec(dllimport)
+#    if defined(_MSC_VER)
+#      define LIBA_SCOPE_VAR LIBA_SCOPE
+#    endif
 #  endif
 #endif
 #if !defined(LIBA_SCOPE)
 #  define LIBA_SCOPE extern
 #endif
+#if !defined(LIBA_SCOPE_VAR)
+#  define LIBA_SCOPE_VAR extern
+#endif
 #ifdef __cplusplus
 extern "C" {
 #endif
-extern int v1;
-extern int v3, v4;
+LIBA_SCOPE_VAR int v1;
+LIBA_SCOPE_VAR int v3, v4;
 LIBA_SCOPE const int v5, v6;
-extern const char* v7;
-extern const char v8[];
+LIBA_SCOPE_VAR const char* v7;
+LIBA_SCOPE_VAR const char v8[];
 extern int v9(void);
-extern int (*v10) (void);
-extern int (*v11) (void);
+LIBA_SCOPE_VAR int (*v10) (void);
+LIBA_SCOPE_VAR int (*v11) (void);
 LIBA_SCOPE int (*const v12) (void);
 #ifdef __cplusplus
 }
 #endif
 
 typedef struct { int arr[1000]; } large;
-extern large v13, v14, v15;
+LIBA_SCOPE_VAR large v13, v14, v15;
 
 int main(void)
 {
@@ -131,26 +137,32 @@ AT_DATA(dlself.c,
 #if defined(LIBA_DLL_IMPORT)
 #  if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
 #    define LIBA_SCOPE extern __declspec(dllimport)
+#    if defined(_MSC_VER)
+#      define LIBA_SCOPE_VAR LIBA_SCOPE
+#    endif
 #  endif
 #endif
 #if !defined(LIBA_SCOPE)
 #  define LIBA_SCOPE extern
 #endif
+#if !defined(LIBA_SCOPE_VAR)
+#  define LIBA_SCOPE_VAR extern
+#endif
 #ifdef __cplusplus
 extern "C" {
 #endif
-extern int v1;
-extern int v3, v4;
+LIBA_SCOPE_VAR int v1;
+LIBA_SCOPE_VAR int v3, v4;
 LIBA_SCOPE const int v5, v6;
-extern const char* v7;
-extern const char v8[];
+LIBA_SCOPE_VAR const char* v7;
+LIBA_SCOPE_VAR const char v8[];
 extern int v9(void);
-extern int (*v10) (void);
-extern int (*v11) (void);
+LIBA_SCOPE_VAR int (*v10) (void);
+LIBA_SCOPE_VAR int (*v11) (void);
 LIBA_SCOPE int (*const v12) (void);
 
 typedef struct { int arr[1000]; } large;
-extern large v13, v14, v15;
+LIBA_SCOPE_VAR large v13, v14, v15;
 
 extern int w1;
 extern int w3, w4;
@@ -252,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 "$rel"main$mst.lo "$rel"sub2/liba.la],


hooks/post-receive
--
GNU Libtool




reply via email to

[Prev in Thread] Current Thread [Next in Thread]