[PATCH] [PATCH] RISC-V: Fix glibc multilib configure

panciyan <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
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.
	
Change-Id: Ic80d8e1e337b2091b24cd50d4c3f4916d10f3593
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.