Re: [PATCH] configure.ac: perform RISC-V vector crypto intrinsics bug checks without LTO
Sam James via Gcrypt-devel <[email protected]> Sat, 20 Sep 2025 22:30:47 +0100
| Newsgroups | gmane.comp.encryption.gpg.libgcrypt.devel |
|---|---|
| Organization | Gentoo |
| Message-ID | <[email protected]> |
Jussi Kivilinna <[email protected]> writes: > * configure.ac (gcry_cv_riscv_vsha2cl_intrinsics_work) > (gcry_cv_riscv_vaes_vs_intrinsics_work): Run check with '-fno-lto' compiler > flag. I assume this is because of https://gcc.gnu.org/PR110812? If so, a comment referencing it would be nice. > -- > > 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