RISC-V: Fix `test' operand error with soft-float ABI being configured
diff mbox series

Message ID alpine.DEB.2.20.1903271407380.17164@tpp
State New
Headers show
  • RISC-V: Fix `test' operand error with soft-float ABI being configured
Related show

Commit Message

Maciej Rozycki March 29, 2019, 12:42 a.m. UTC
From: Maciej W. Rozycki <macro@wdc.com>

Fix a:

.../sysdeps/unix/sysv/linux/riscv/configure: line 181: test: =: unary operator expected

message produced by the RISC-V configure fragment with the soft-float 
ABI selected, caused by $libc_cv_riscv_float_abi evaluating to nil in 
the invocation of `test $libc_cv_riscv_float_abi = no'.

	* sysdeps/unix/sysv/linux/riscv/configure.ac: Quote 
	$libc_cv_riscv_float_abi in `test' invocation.
	* sysdeps/unix/sysv/linux/riscv/configure: Regenerate.

 NB my WDC copyright assignment with FSF hasn't been sorted yet, however 
this change, being under 15 lines, falls into the legally-insignificant 
category I believe, and therefore should be OK to apply right away.

 I believe it is obviously correct as well, and therefore I will commit it 
shortly.  The change has been verified by reconfiguring glibc and ensuring 
that the message has gone away.


 sysdeps/unix/sysv/linux/riscv/configure    |    2 +-
 sysdeps/unix/sysv/linux/riscv/configure.ac |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff mbox series

Index: glibc/sysdeps/unix/sysv/linux/riscv/configure
--- glibc.orig/sysdeps/unix/sysv/linux/riscv/configure
+++ glibc/sysdeps/unix/sysv/linux/riscv/configure
@@ -178,7 +178,7 @@  if (eval "$ac_cpp conftest.$ac_ext") 2>&
 rm -f conftest*
-if test $libc_cv_riscv_float_abi = no; then
+if test "$libc_cv_riscv_float_abi" = no; then
   as_fn_error $? "Unable to determine floating-point ABI" "$LINENO" 5
Index: glibc/sysdeps/unix/sysv/linux/riscv/configure.ac
--- glibc.orig/sysdeps/unix/sysv/linux/riscv/configure.ac
+++ glibc/sysdeps/unix/sysv/linux/riscv/configure.ac
@@ -20,7 +20,7 @@  AC_EGREP_CPP(yes, [#ifdef __riscv_float_
-if test $libc_cv_riscv_float_abi = no; then
+if test "$libc_cv_riscv_float_abi" = no; then
   AC_MSG_ERROR([Unable to determine floating-point ABI])