-- v2: winebuild: spec32.c: A couple changes to get a build on Linux ARM64
From: Mike slavo5150@yahoo.com
--- tools/winebuild/spec32.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index fb2ce884e28..7c570374a49 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -98,6 +98,7 @@ static int has_relays( struct exports *exports ) { int i;
+ if (target.cpu == CPU_ARM64) return 0; if (target.cpu == CPU_ARM64EC) return 0;
for (i = exports->base; i <= exports->limit; i++) @@ -762,7 +763,10 @@ void output_module( DLLSPEC *spec ) break; default: output( "\n\t.section ".init","ax"\n" ); - output( "\tjmp 1f\n" ); + if (target.cpu == CPU_i386 || target.cpu == CPU_x86_64) + { + output( "\tjmp 1f\n" ); + } output( "__wine_spec_pe_header:\n" ); output( "\t.skip %u\n", 65536 + page_size ); output( "1:\n" );
There are 2 issues when attempting to use winebuild on ARM64 1. It generates Intel `jmp` instructions which are invalid in aarch64 2. It attempts to generate `.seh_x` which gcc's assembler cannot handle
This merge request resolves both of those so the build succeeds.
While I agree with changing that region, I don't think removing the jump instruction is much of an improvement. It's there for a reason.
The ARM jump instruction is called `b`.
GCC’s support for ARM64 MinGW is not yet complete enough to build Wine. For now, you’ll need to use Clang.