Module: wine Branch: master Commit: 00198c4084a61f65f18574d16833d945e50c0614 URL: https://gitlab.winehq.org/wine/wine/-/commit/00198c4084a61f65f18574d16833d94...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Apr 8 23:35:25 2024 +0200
winegcc: Add -marm64x option for linking ARM64X images.
---
tools/winegcc/winegcc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 694242542ad..fb759063da9 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -191,6 +191,7 @@ struct options const char* entry_point; const char* debug_file; const char* out_implib; + const char* native_arch; struct strarray prefix; struct strarray lib_dirs; struct strarray args; @@ -1232,6 +1233,13 @@ static void build(struct options* opts)
build_spec_obj( opts, spec_file, output_file, opts->target_alias, files, resources, lib_dirs, entry_point, &spec_objs ); + if (opts->native_arch) + { + const char *suffix = strchr( opts->target_alias, '-' ); + if (!suffix) suffix = ""; + build_spec_obj( opts, spec_file, output_file, strmake( "%s%s", opts->native_arch, suffix ), + files, empty_strarray, lib_dirs, entry_point, &spec_objs ); + }
if (opts->fake_module) return; /* nothing else to do */
@@ -1707,6 +1715,11 @@ int main(int argc, char **argv) { raw_linker_arg = 1; } + else if (!strcmp("-marm64x", opts.args.str[i] )) + { + raw_linker_arg = 1; + opts.native_arch = "aarch64"; + } else if (!strncmp("-mcpu=", opts.args.str[i], 6) || !strncmp("-mfpu=", opts.args.str[i], 6) || !strncmp("-march=", opts.args.str[i], 7))