From: Alexandr Nedvedicky Date: Wed, 15 Jan 2025 15:41:33 +0000 (+0100) Subject: Work around to get llvm-mingw working on aarch64 X-Git-Tag: openssl-3.5.0-alpha1~727 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42aced5c9f0d7b5c90eecc3684b76762d7f64886;p=thirdparty%2Fopenssl.git Work around to get llvm-mingw working on aarch64 It looks like llvm-mingw tool chain does not understand `.previous` asm directive (see https://sourceware.org/binutils/docs/as/Previous.html). As a workaround for win64 flavor (llvm-mingw toolchain) we let xlate to emit .text instead of emitting .previous. We also need to revisit usage of win64 flavor here in aarch64. We should perhaps introduce a mingw flavour on aarch64 as well. win assembly flavour should be used for microsoft assembler. Fixes #26415 Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/26428) --- diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl index aef9595a5e0..e07ce2c5c16 100755 --- a/crypto/perlasm/arm-xlate.pl +++ b/crypto/perlasm/arm-xlate.pl @@ -33,6 +33,15 @@ my $rodata = sub { SWITCH: for ($flavour) { /linux/ && return ".section\t.rodata"; /ios/ && return ".section\t__TEXT,__const"; + /win64/ && return ".section\t.rodata"; + last; + } +}; +my $previous = sub { + SWITCH: for ($flavour) { + /linux/ && return ".previous"; + /ios/ && return ".previous"; + /win64/ && return ".text"; last; } };