Charles Davis : winebuild: When building implibs, invoke dlltool with a machine type.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 11 09:59:46 CST 2016


Module: wine
Branch: master
Commit: 2ea17846b8dbaf7d3c78f3c4d1a37e2de4b2e81a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2ea17846b8dbaf7d3c78f3c4d1a37e2de4b2e81a

Author: Charles Davis <cdavis5x at gmail.com>
Date:   Thu Feb 11 03:20:27 2016 -0700

winebuild: When building implibs, invoke dlltool with a machine type.

Signed-off-by: Charles Davis <cdavis5x at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winebuild/import.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 13596a4..d3aa41b 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1329,6 +1329,7 @@ void output_import_lib( DLLSPEC *spec, char **argv )
 {
     struct strarray *args;
     char *def_file;
+    const char *as_flags, *m_flag;
 
     if (target_platform != PLATFORM_WINDOWS)
         fatal_error( "Unix-style import libraries not supported yet\n" );
@@ -1342,7 +1343,23 @@ void output_import_lib( DLLSPEC *spec, char **argv )
     output_file = NULL;
 
     args = find_tool( "dlltool", NULL );
+    switch (target_cpu)
+    {
+        case CPU_x86:
+            m_flag = "i386";
+            as_flags = "--as-flags=--32";
+            break;
+        case CPU_x86_64:
+            m_flag = "i386:x86-64";
+            as_flags = "--as-flags=--64";
+            break;
+        default:
+            m_flag = NULL;
+            break;
+    }
     strarray_add( args, "-k", "-l", output_file_name, "-d", def_file, NULL );
+    if (m_flag)
+        strarray_add( args, "-m", m_flag, as_flags, NULL );
     spawn( args );
     strarray_free( args );
 




More information about the wine-cvs mailing list