Alexandre Julliard : winegcc: Add support for the --sysroot option to allow out-of-tree cross-compiling.

Alexandre Julliard julliard at winehq.org
Mon Jun 1 10:00:59 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Feb  2 15:11:13 2009 +0100

winegcc: Add support for the --sysroot option to allow out-of-tree cross-compiling.

---

 Make.rules.in           |    2 +-
 tools/winegcc/winegcc.c |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index db84e90..a259da9 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -71,7 +71,7 @@ MAKECTESTS   = $(TOOLSDIR)/tools/make_ctests
 WRC          = $(TOOLSDIR)/tools/wrc/wrc
 WMC          = $(TOOLSDIR)/tools/wmc/wmc
 WIDL         = $(TOOLSDIR)/tools/widl/widl
-WINEGCC      = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild
+WINEGCC      = $(TOOLSDIR)/tools/winegcc/winegcc $(TARGETFLAGS) -B$(TOOLSDIR)/tools/winebuild --sysroot=$(TOPOBJDIR)
 RELPATH      = $(TOOLSDIR)/tools/relpath
 SFNT2FNT     = $(TOOLSDIR)/tools/sfnt2fnt
 FNT2FON      = $(TOOLSDIR)/tools/fnt2fon
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 491a733..4e41033 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1154,6 +1154,12 @@ int main(int argc, char **argv)
                 case '-':
                     if (strcmp("-static", argv[i]+1) == 0)
                         linking = -1;
+                    else if (!strncmp("--sysroot", argv[i], 9) && opts.wine_objdir)
+                    {
+                        if (argv[i][9] == '=') opts.wine_objdir = argv[i] + 10;
+                        else opts.wine_objdir = argv[++i];
+                        raw_compiler_arg = raw_linker_arg = 0;
+                    }
                     break;
             }
 




More information about the wine-cvs mailing list