foss-for-synopsys-dwc-arc-processors / arc-gnu-toolchain

Scripting for building ARC toolchain
5 stars 3 forks source link

make check-newlib requires gcc tests to have been run #21

Closed BrunoASMauricio closed 1 year ago

BrunoASMauricio commented 1 year ago

Running make check-newlib after building a toolchain runs the newlib tests but only after running the gcc tests.

Is this an absolute necessity?

If one is testing newlib, this presents an unnecessary overhead at least for the first run.

Any configuration seems to trigger this, but for completeness the one I use is: ../arc-gnu-toolchain/configure --target=arc64 --prefix=/path/to/inst --disable-linux --disable-werror

luismgsilva commented 1 year ago

TLDR

If you specifically want to run only the newlib tests, you can use the following command:

$ make check-newlib-newlib

Answer

The make check-newlib command covers not only the newlib tests but also the tests associated with baremetal components such as gcc, newlib, and binutils. When you run make check-newlib, it automatically invokes check-gcc-newlib, check-newlib-newlib, and check-binutils-newlib to perform the respective tests. As we can see from the Makefile.in file:

.PHONY: check
check: check-@default_target@
.PHONY: check-linux check-newlib
check-linux: $(patsubst %,check-%-linux,$(REGRESSION_TEST_LIST))
check-newlib: $(patsubst %,check-%-newlib,$(REGRESSION_TEST_LIST))

check-gcc: check-gcc-@default_target@
check-gcc-newlib: stamps/check-gcc-newlib
check-gcc-linux: stamps/check-gcc-linux

check-binutils: check-binutils-@default_target@
check-binutils-linux: stamps/check-binutils-linux
check-binutils-newlib: stamps/check-binutils-newlib

check-newlib-newlib: stamps/check-newlib-newlib

Similarly, for Linux, executing make check-linux runs all the tests related to Linux, specifically in user mode.