libtool-patches
[Top][All Lists]
Advanced

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

Re: [patch #6448] [MSVC 7/7] Add MSVC Support


From: Peter Rosin
Subject: Re: [patch #6448] [MSVC 7/7] Add MSVC Support
Date: Wed, 13 Aug 2008 21:40:17 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

Peter Rosin skrev:
Peter Rosin skrev:
Attached, I'll work through all the failures to try to find out why
they fail...

*snip*

  72: stresstest.at:31   Link option thorough search test
Automatic path conversion in MSYS doesn't kick in for the argument
-OUT:/some/absolute/path so lib.exe barfs.

Commenting out absolute paths from the stress test reveals a couple of
other problems...

First, when l3='-rpath /nonexistent' and st='-no-install', I see no
reason for linking main using main-static.lo, so clear the mst variable
for this case.

So, fixing that, like this:

2008-08-13  Peter Rosin <address@hidden>

        * tests/stresstest.at: Link with main.lo when liba is shared
        and linking main with -no-install.

Second, there are the inevitable variables that need importing, like
this:

2008-08-13  Peter Rosin <address@hidden>

        * tests/stresstest.at [MSVC]: dllimport all imported
        variables.

Cheers,
Peter
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 27e7ee9..8eadf10 100644
--- a/tests/stresstest.at
+++ b/tests/stresstest.at
@@ -253,7 +253,8 @@ do
        for st in '' '-static' '-no-install'
        do
           case $st,$l3 in
-          ,-rpath*) mst= ;;
+          -static,*) mst=-static ;;
+          *,-rpath*) mst= ;;
           *) mst=-static ;;
          esac
 
diff --git a/tests/stresstest.at b/tests/stresstest.at
index 27e7ee9..8eadf10 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[];
-extern int v9(void);
-extern int (*v10) (void);
-extern int (*v11) (void);
+LIBA_SCOPE_VAR const char* v7;
+LIBA_SCOPE_VAR const char v8[];
+LIBA_SCOPE_VAR int v9(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[];
-extern int v9(void);
-extern int (*v10) (void);
-extern int (*v11) (void);
+LIBA_SCOPE_VAR const char* v7;
+LIBA_SCOPE_VAR const char v8[];
+LIBA_SCOPE_VAR int v9(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;

reply via email to

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