Hi, Thanks for the detailed explanation. I understand the concern regarding the breaking change and the lack of ISA-based dynamic multilib resolution. To address this, I have experimented with alternative approaches and laid out the multilibs in the sysroot using the following directory structure in my local environment: They're: usr/lib<xlen>/<arch>/<abi>
Could you please share your thoughts on this sysroot layout? Do you think this structure could serve as a practical workaround or a step towards better multilib organization? [email protected] From: Palmer Dabbelt Date: 2026-08-22 00:23 To: Kito Cheng CC: panciyan; gcc-patches; Richard.Earnshaw; jeffreyalaw Subject: Re: [PATCH] RISC-V: Fix glibc multilib configure On Fri, 21 Aug 2026 00:22:42 PDT (-0700), Kito Cheng wrote: > This seems more like a patch for riscv-gnu-toolchain rather than GCC? Ya, I agree this is basically just a distro problem: if you're building binaries you need to know what's implemented on the systems you're going to be running them on. That said: we did change the default behavior here so it's going to break some users. We also don't have a great way to fix that, as we're not doing ISA-based dynamic multilib resolution. So if I understand how this all works, we've basically changed the default multilib to include V when it didn't on older releases. We've talked about trying to fix this ISA-dependent multilib resolution stuff a few times. Last round we sort of got hung up on the "what should the supported set of multilibs actually be", and I suspect we'd end up there again (and likely will continue to end up there until someone makes hardware that's actually interesting in these binary-compatible use cases). > panciyan <[email protected]> 於 2026年8月19日週三 下午1:48寫道: >> >> Building glibc with -march=rv64gcv causes GCC to auto-vectorize generic >> C code (e.g. calc_state_hash in regex), generating RVV instructions. On >> hardware without the V extension, this results in SIGILL. >> >> Signed-off-by: Ciyan Pan <[email protected]> >> ChangeLog: >> >> * configure: Regenerate. >> * configure.ac: Remove rv64gcv-lp64d. >> >> --- >> configure | 5 ----- >> configure.ac | 2 +- >> 2 files changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/configure b/configure >> index d610aa16..6328fcee 100755 >> --- a/configure >> +++ b/configure >> @@ -4159,11 +4159,6 @@ fi >> if test "x$enable_multilib" = xyes >> then : >> glibc_multilib_names="rv32imac-ilp32 rv32gc-ilp32d rv64imac-lp64 >> rv64gc-lp64d" >> - # Vector extension is currently not supported on Big-endian systems. >> - if test "x$endian" = xlittle >> - then : >> - glibc_multilib_names+=" rv64gcv-lp64d" >> - fi >> >> else $as_nop >> glibc_multilib_names="$with_arch-$with_abi" >> diff --git a/configure.ac b/configure.ac >> index 4e534faa..dd32ec6c 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -158,7 +158,7 @@ AS_IF([test "x$enable_multilib" = xyes || test >> "x$with_multilib_generator" != xn >> [AC_SUBST(multilib_flags,--disable-multilib)]) >> >> AS_IF([test "x$enable_multilib" = xyes], >> - [AC_SUBST(glibc_multilib_names,"rv32imac-ilp32 rv32gc-ilp32d >> rv64imac-lp64 rv64gc-lp64d rv64gcv-lp64d")], >> + [AC_SUBST(glibc_multilib_names,"rv32imac-ilp32 rv32gc-ilp32d >> rv64imac-lp64 rv64gc-lp64d")], >> [AC_SUBST(glibc_multilib_names,"$with_arch-$with_abi")]) >> >> AS_IF([test "x$enable_multilib" = xyes], >> -- >> 2.43.0 >>
