]> git.ipfire.org Git - thirdparty/openssl.git/commit
LoongArch: Fix output file name detection for Perl scripts
authorXi Ruoyao <xry111@xry111.site>
Wed, 12 Feb 2025 08:42:00 +0000 (16:42 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 14 Feb 2025 10:35:23 +0000 (11:35 +0100)
commitf48c14e94e38f543d4d2ae54c2fed51ce2e7065f
tree8f3f6f1bcba31a0685ac366856c477c8a64cf056
parent0575755eaf9e35406e4e27a00a7505b72465c08d
LoongArch: Fix output file name detection for Perl scripts

We were using the first (or second) argument containing a '.' as the
output name file, but it may be incorrect as -march=la64v1.0 may be in
the command line.  If the builder specifies -march=la64v1.0 in the
CFLAGS, the script will write to a file named "-march=la64v1.0" and
cause a build error with cryptic message:

    ld: crypto/pem/loader_attic-dso-pvkfmt.o: in function `i2b_PVK':
    .../openssl-3.4.1/crypto/pem/pvkfmt.c:1070:(.text+0x11a8): undefined reference to `OPENSSL_cleanse'

Adapt the approach of ARM and RISC-V (they have similar flags like
-march=v8.1-a or -misa-spec=2.2) to fix the issue.

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26717)
crypto/aes/asm/vpaes-loongarch64.pl
crypto/chacha/asm/chacha-loongarch64.pl
crypto/loongarch64cpuid.pl
crypto/md5/asm/md5-loongarch64.pl