winegcc: Support the --target option like winebuild does.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-09-10 12:14:30 +02:00
parent 0c2cc9bb05
commit ab871dc4d8
2 changed files with 10 additions and 0 deletions

View File

@ -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;

View File

@ -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