Alexandre Julliard : winegcc: Support the --target option like winebuild does.
Alexandre Julliard
julliard at winehq.org
Tue Sep 10 16:49:29 CDT 2019
Module: wine
Branch: master
Commit: ab871dc4d8e4ae0aa897142305800803a6623b16
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ab871dc4d8e4ae0aa897142305800803a6623b16
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Sep 10 12:14:30 2019 +0200
winegcc: Support the --target option like winebuild does.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/winegcc/winegcc.c | 7 +++++++
tools/winegcc/winegcc.man.in | 3 +++
2 files changed, 10 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index db46cf6d5d..9d5828e612 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -1429,6 +1429,7 @@ int main(int argc, char **argv)
case '-':
next_is_arg = (strcmp("--param", argv[i]) == 0 ||
strcmp("--sysroot", argv[i]) == 0 ||
+ strcmp("--target", argv[i]) == 0 ||
strcmp("--lib-suffix", argv[i]) == 0);
break;
}
@@ -1656,6 +1657,12 @@ int main(int argc, char **argv)
else opts.sysroot = argv[i + 1];
if (opts.wine_objdir) raw_compiler_arg = raw_linker_arg = 0;
}
+ else if (!strncmp("--target", argv[i], 8))
+ {
+ if (argv[i][8] == '=') parse_target_option( &opts, argv[i] + 9 );
+ else parse_target_option( &opts, argv[i + 1] );
+ raw_compiler_arg = raw_linker_arg = 0;
+ }
else if (!strncmp("--lib-suffix", argv[i], 12) && opts.wine_objdir)
{
if (argv[i][12] == '=') opts.lib_suffix = argv[i] + 13;
diff --git a/tools/winegcc/winegcc.man.in b/tools/winegcc/winegcc.man.in
index 5bbb2fd58f..3fcd6f95f3 100644
--- a/tools/winegcc/winegcc.man.in
+++ b/tools/winegcc/winegcc.man.in
@@ -35,6 +35,9 @@ enters a special mode for building Wine itself. Developers should
avoid prefixes ending with the magic suffix, or if that is not
possible, simply express it differently, such as '/tools/winebuild/',
to avoid the special behaviour.
+.IP "\fB-b,--target \fItarget\fR"
+Specify the target architecture triplet for cross-compiling. winegcc
+will then invoke \fItarget\fR-gcc instead of gcc.
.IP \fB-fno-short-wchar\fR
Override the underlying type for wchar_t to be the default for the
target, instead of using short unsigned int, which is the default
More information about the wine-cvs
mailing list