Alexandre Julliard : configure: When cross-compiling, propagate the target specification to winebuild.

Alexandre Julliard julliard at winehq.org
Fri Dec 26 12:35:24 CST 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec 26 17:54:50 2008 +0100

configure: When cross-compiling, propagate the target specification to winebuild.

---

 Make.rules.in         |    3 ++-
 configure             |    6 ++++++
 configure.ac          |    4 ++++
 dlls/Makedll.rules.in |    2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index d49d2a3..0c86aa1 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -43,6 +43,7 @@ STRIP     = @STRIP@
 WINDRES   = @WINDRES@
 LN        = @LN@
 LN_S      = @LN_S@
+TARGET    = @TARGET@
 TOOLSDIR  = @TOOLSDIR@
 AS        = @AS@
 LD        = @LD@
@@ -61,7 +62,7 @@ EXTRACFLAGS  = @EXTRACFLAGS@
 ALLCFLAGS    = $(INCLUDES) $(DEFS) $(DLLFLAGS) $(EXTRACFLAGS) $(CPPFLAGS) $(CFLAGS) $(MODCFLAGS)
 ALLLINTFLAGS = $(INCLUDES) $(DEFS) $(LINTFLAGS)
 IDLFLAGS     = $(INCLUDES) $(DEFS) $(EXTRAIDLFLAGS)
-WINEBUILDFLAGS = $(DLLFLAGS) --as-cmd "$(AS)"
+WINEBUILDFLAGS = $(DLLFLAGS) $(TARGET:%=--target %) --as-cmd "$(AS)"
 MKINSTALLDIRS= $(TOPSRCDIR)/tools/mkinstalldirs -m 755
 WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi/winapi_check
 WINEWRAPPER  = $(TOPSRCDIR)/tools/winewrapper
diff --git a/configure b/configure
index ac42b9f..8019c1a 100755
--- a/configure
+++ b/configure
@@ -745,6 +745,7 @@ X_PRE_LIBS
 X_CFLAGS
 CPP
 XMKMF
+TARGET
 TOOLSDIR
 CPPBIN
 ac_ct_CXX
@@ -3873,6 +3874,11 @@ fi
 $as_echo "$wine_cv_toolsdir" >&6; }
 TOOLSDIR=$wine_cv_toolsdir
 
+if test "$cross_compiling" = "yes"
+then
+    TARGET="$host_alias"
+
+fi
 
 
 ac_ext=c
diff --git a/configure.ac b/configure.ac
index a84c822..a266e53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,10 @@ AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
      AC_MSG_ERROR([could not find Wine tools in $with_wine_tools.])
    fi])
 AC_SUBST(TOOLSDIR,$wine_cv_toolsdir)
+if test "$cross_compiling" = "yes"
+then
+    AC_SUBST(TARGET,"$host_alias")
+fi
 
 AC_PATH_XTRA
 
diff --git a/dlls/Makedll.rules.in b/dlls/Makedll.rules.in
index c916966..b043f9e 100644
--- a/dlls/Makedll.rules.in
+++ b/dlls/Makedll.rules.in
@@ -48,7 +48,7 @@ all implib: $(IMPORTLIBFILE) $(IMPLIB_SRCS:%=__static_implib__%)
 $(IMPLIB_SRCS:%=__static_implib__%): $(STATICIMPLIB)
 
 $(SPEC_DEF) $(IMPORTLIB:%=lib%.def): $(MAINSPEC)
-	$(WINEBUILD) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC)
+	$(WINEBUILD) $(TARGET:%=--target %) -w --def -o $@ --export $(SRCDIR)/$(MAINSPEC)
 
 $(IMPORTLIB:%=lib%.def.a): $(IMPLIB_OBJS)
 	$(RM) $@




More information about the wine-cvs mailing list