[PATCH] makefiles: Only generate proxy code for the target architecture.

Zebediah Figura z.figura12 at gmail.com
Sun Sep 30 22:24:32 CDT 2018


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 Makefile.in     | 1 +
 configure.ac    | 5 +++++
 tools/makedep.c | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index 6b65fdf..c1242af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49,6 +49,7 @@ MSVCRTFLAGS     = @BUILTINFLAG@
 TARGETFLAGS     = @TARGETFLAGS@
 UNWINDFLAGS     = @UNWINDFLAGS@
 LDEXECFLAGS     = @LDEXECFLAGS@
+WIDLFLAGS       = @WIDLFLAGS@
 LIBS            = @LIBS@
 BISON           = @BISON@
 FLEX            = @FLEX@
diff --git a/configure.ac b/configure.ac
index 70532b2..31ec935 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,7 @@ case $host in
       host_cpu="i386"
       notice_platform="32-bit "
       AC_SUBST(TARGETFLAGS,"-m32")
+      AC_SUBST(WIDLFLAGS,"--win32")
       PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib/pkgconfig}
       export PKG_CONFIG_PATH
       enable_win16=${enable_win16:-yes}
@@ -174,6 +175,7 @@ case $host in
       host_cpu="x86_64"
       notice_platform="64-bit "
       AC_SUBST(TARGETFLAGS,"-m64")
+      AC_SUBST(WIDLFLAGS,"--win64")
     fi
     ;;
   arm*)
@@ -205,6 +207,7 @@ case $host in
     esac
     CFLAGS="$CFLAGS -marm -mfloat-abi=$float_abi"
     AC_SUBST(TARGETFLAGS,"-marm -mfloat-abi=$float_abi")
+    AC_SUBST(WIDLFLAGS,"--win32")
     ;;
   aarch64*)
     AC_MSG_CHECKING([whether $CC supports __builtin_ms_va_list])
@@ -212,9 +215,11 @@ case $host in
                       [AC_MSG_RESULT([yes])],
                       [AC_MSG_RESULT([no])
                        AC_MSG_ERROR([You need clang >= 5.0 to build Wine for arm64.])])
+    AC_SUBST(WIDLFLAGS,"--win64")
     ;;
   i[[3456789]]86*)
     enable_win16=${enable_win16:-yes}
+    AC_SUBST(WIDLFLAGS,"--win32")
     ;;
 esac
 
diff --git a/tools/makedep.c b/tools/makedep.c
index 4fcc99e..66b21db 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -133,6 +133,7 @@ static struct strarray msvcrt_flags;
 static struct strarray extra_cflags;
 static struct strarray cpp_flags;
 static struct strarray unwind_flags;
+static struct strarray widl_flags;
 static struct strarray libs;
 static struct strarray enable_tests;
 static struct strarray cmdline_vars;
@@ -2641,6 +2642,7 @@ static void output_source_idl( struct makefile *make, struct incl_file *source,
     output_filenames_obj_dir( make, targets );
     output( ": %s\n", tools_path( make, "widl" ));
     output( "\t%s -o $@", tools_path( make, "widl" ) );
+    output_filenames( widl_flags );
     output_filenames( target_flags );
     output_filenames( make->include_args );
     output_filenames( make->define_args );
@@ -4208,6 +4210,7 @@ int main( int argc, char *argv[] )
     extra_cflags = get_expanded_make_var_array( top_makefile, "EXTRACFLAGS" );
     cpp_flags    = get_expanded_make_var_array( top_makefile, "CPPFLAGS" );
     unwind_flags = get_expanded_make_var_array( top_makefile, "UNWINDFLAGS" );
+    widl_flags   = get_expanded_make_var_array( top_makefile, "WIDLFLAGS" );
     libs         = get_expanded_make_var_array( top_makefile, "LIBS" );
     enable_tests = get_expanded_make_var_array( top_makefile, "ENABLE_TESTS" );
 
-- 
2.7.4




More information about the wine-devel mailing list