[PATCH] configure.ac: perform RISC-V vector crypto intrinsics bug checks without LTO
Jussi Kivilinna <[email protected]> Sat, 20 Sep 2025 16:59:28 +0300
| Newsgroups | gmane.comp.encryption.gpg.libgcrypt.devel |
|---|---|
| Message-ID | <[email protected]> |
* configure.ac (gcry_cv_riscv_vsha2cl_intrinsics_work) (gcry_cv_riscv_vaes_vs_intrinsics_work): Run check with '-fno-lto' compiler flag. -- Signed-off-by: Jussi Kivilinna <[email protected]> --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 80d38496..90c513be 100644 --- a/configure.ac +++ b/configure.ac @@ -2934,6 +2934,9 @@ if test "$gcry_cv_cc_riscv_vector_crypto_intrinsics" = "yes" || CFLAGS="$CFLAGS -O2 -march=$MARCH_RVA23U64_WITH_VEC_CRYPTO -mstrict-align" fi + # Disable LTO optimization to generate target instructions + CFLAGS="$CFLAGS -fno-lto" + AC_CACHE_CHECK([whether compiler has working RISC-V __riscv_vsha2cl intrinsics], [gcry_cv_riscv_vsha2cl_intrinsics_work], [gcry_cv_riscv_vsha2cl_intrinsics_work=no @@ -2981,6 +2984,9 @@ if test "$gcry_cv_cc_riscv_vector_crypto_intrinsics" = "yes" || CFLAGS="$CFLAGS -O2" fi + # Disable LTO optimization to generate target instructions + CFLAGS="$CFLAGS -fno-lto" + AC_CACHE_CHECK([whether compiler has working RISC-V __riscv_vaes*_vs intrinsics], [gcry_cv_riscv_vaes_vs_intrinsics_work], [gcry_cv_riscv_vaes_vs_intrinsics_work=no -- 2.48.1