Clean regression test

Hello,
I have built RISCV tools. The regression is run and get error:
stat /riscv-gnu-toolchain/test/gcc-newlib/rv32ima-ilp32.log || exit 1
stat: cannot stat ‘/riscv-gnu-toolchain/test/gcc-newlib/rv32ima-ilp32.log’: such file or directory
Makefile:784: recipe for target ‘report-gcc-newlib’ failed
make: *** [report-gcc-newlib] Error 1

I want to clean only the test/dejagnu files and not the build tools.
How can this be done?

‘make clean’ removes all the build-* directories.

Thanks!

What exact version of the toolchain do you have? This looks like some sort of path name problem. Did you build this directly in the source tree? You could try checking the makefile to see why the path name is wrong.

There is no Makefile rule to clean only the test/dejagnu files. If you want to rerun the tests, you only need to remove the corresponding stamp files. If you want to recover the disk space, then something “rm -rf build//build-gcc--stage2/gcc/testsuite” should work.

Thanks Jim.
I’m using riscv32-unknown-elf-gcc 8.2.0.
I have modified configure.ac and Makefile.in to add newlib config options (–enable-newlib-io-float and --enable-newlib-io-longdouble).

When run ‘configure --with-arch=rv32imafd --with-abi=ilp32d’ get error:
stat /home/deepa/work/RISCV/sifive_newlib_config_fix/riscv-gnu-toolchain/test/gcc-newlib/rv32imafd-ilp32d.log || exit 1
stat: cannot stat ‘/home/deepa/work/RISCV/sifive_newlib_config_fix/riscv-gnu-toolchain/test/gcc-newlib/rv32imafd-ilp32d.log’: No such file or directory
Makefile:784: recipe for target ‘report-gcc-newlib’ failed
make: *** [report-gcc-newlib] Error 1

Is something missing?Please advise.

However, when run ‘configure --with-arch=rv32imafc --with-abi=ilp32f’ ,the regression tests pass.

Source File changes:
diff --git a/Makefile.in b/Makefile.in
index f4d771c…edbc5a3 100644
— a/Makefile.in
+++ b/Makefile.in
@@ -44,6 +44,8 @@ MULTILIB_FLAGS := @multilib_flags@
NEWLIB_MULTILIB_NAMES := @newlib_multilib_names@
GLIBC_MULTILIB_NAMES := @glibc_multilib_names@
GCC_CHECKING_FLAGS := @gcc_checking@
+NEWLIB_IO_FLOAT_FLAG := @newlib_io_float@
+NEWLIB_IO_LONG_DOUBLE_FLAG := @newlib_io_long_double@

XLEN := $(shell echo $(WITH_ARCH) | tr A-Z a-z | sed ‘s/.rv([0-9]).*/\1/’)
ifneq ($(XLEN),32)
@@ -468,7 +470,8 @@ stamps/build-newlib: $(srcdir)/riscv-newlib stamps/build-gcc-newlib-stage1
–target=$(NEWLIB_TUPLE)
$(CONFIGURE_HOST)
–prefix=$(INSTALL_DIR) \

  •           --enable-newlib-io-long-double \
    
  •           $(NEWLIB_IO_FLOAT_FLAG) \
    
  •           $(NEWLIB_IO_LONG_DOUBLE_FLAG) \
              --enable-newlib-io-long-long \
              --enable-newlib-io-c99-formats \
              CFLAGS_FOR_TARGET="-Os $(CFLAGS_FOR_TARGET)" \
    

diff --git a/configure.ac b/configure.ac
index af3ee85…5e90f25 100644
— a/configure.ac
+++ b/configure.ac
@@ -166,4 +166,20 @@ AS_IF([test “x$enable_gdb” != xno],
[AC_SUBST(enable_gdb, --enable-gdb)],
[AC_SUBST(enable_gdb, --disable-gdb)])

+AC_ARG_ENABLE([newlib-io-float],

  • AS_HELP_STRING([–enable-newlib-io-float], [enable float type support in IO functions printf/scanf]))

+AS_IF([test “x$enable_newlib_io_float” = “xyes”],

  •   [AC_SUBST(newlib_io_float, --enable-newlib-io-float=yes)]
    

+)
+
+AC_ARG_ENABLE(newlib-io-long-double,

  • [AS_HELP_STRING([–disable-newlib-io-long-double], [disable long double type support in IO functions printf/scanf])],
  • [],
  • [enable_newlib_io_long_double=yes]
    +)
    +AS_IF([test “x$enable_newlib_io_long_double” != “xno”],
  •   [AC_SUBST(newlib_io_long_double, --enable-newlib-io-long-double=yes)],
    
  •   [AC_SUBST(newlib_io_long_double, --enable-newlib-io-long-double=no)]
    

+)
AC_OUTPUT
(END)

Thanks!

When you said you were running regressions, I assumed you meant the regression directory. But you are doing something different, you are configuring and running make report. make report is only supported for the 26 targets listed in regression/Makefile. With a potentially infinite number of arch/abi targets, we can’t have a potentially infinite number of saved log files, so we have 13 to support 26 sets of configure options. The one you are using is not one of them. So the error you got is expected.

You can run make check to generate a log file, and then you could save your own log file and use it for future testsuite runs.