Allow overriding EXPECT

While investigating possible race conditions in the GCC testsuites
caused by bufferization issues, I wanted to investigate workarounds
similar to GDB's READ1 [1], and I noticed it was not always possible
to override EXPECT when running 'make check'.

This patch adds the missing support in various Makefiles.

I was not able to test the patch for all the libraries updated here,
but I confirmed it works as intended/needed for libstdc++.

libatomic, libitm, libgomp already work as intended because their
Makefiles do not have:
MAKEOVERRIDES=

Tested on (native) aarch64-linux-gnu, confirmed the patch introduces
the behaviour I want in gcc, g++, gfortran and libstdc++.

I updated (but could not test) libgm2, libphobos, libquadmath and
libssp for consistency since their Makefiles have MAKEOVERRIDES=

libffi, libgo, libsanitizer seem to need a similar update, but they
are imported from their respective upstream repo, so should not be
patched here.

[1] https://github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/README#L269

2023-12-21  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* Makefile.in: Allow overriding EXEPCT.

	libgm2/
	* Makefile.am: Allow overriding EXEPCT.
	* Makefile.in: Regenerate.

	libphobos/
	* Makefile.am: Allow overriding EXEPCT.
	* Makefile.in: Regenerate.

	libquadmath/
	* Makefile.am: Allow overriding EXEPCT.
	* Makefile.in: Regenerate.

	libssp/
	* Makefile.am: Allow overriding EXEPCT.
	* Makefile.in: Regenerate.

	libstdc++-v3/
	* Makefile.am: Allow overriding EXEPCT.
	* Makefile.in: Regenerate.
This commit is contained in:
Christophe Lyon 2023-12-21 10:51:10 +00:00
parent c4d1d1adf7
commit 05d353b794
11 changed files with 13 additions and 0 deletions

View File

@ -4304,6 +4304,7 @@ $(lang_checks_parallel): site.exp
vardots=`echo "$$variant" | sed 's,/,.,g'`; \
$(MAKE) TESTSUITEDIR="testsuite.$$vardots" \
RUNTESTFLAGS="--target_board=$$variant $(RUNTESTFLAGS)" \
EXPECT=$(EXPECT) \
"$$target"
TESTSUITEDIR = testsuite
@ -4369,6 +4370,7 @@ $(lang_checks_parallelized): check-% : site.exp
GCC_RUNTEST_PARALLELIZE_DIR=`${PWD_COMMAND}`/$(TESTSUITEDIR)/$(check_p_tool)-parallel ; \
export GCC_RUNTEST_PARALLELIZE_DIR ; \
$(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
EXPECT=$(EXPECT) \
check-parallel-$* \
$(patsubst %,check-parallel-$*_%, $(check_p_subdirs)); \
sums= ; logs= ; \
@ -4387,6 +4389,7 @@ $(lang_checks_parallelized): check-% : site.exp
rm -rf $(TESTSUITEDIR)/$*-parallel || true; \
else \
$(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \
EXPECT=$(EXPECT) \
check_$*_parallelize= check-parallel-$*; \
fi

View File

@ -69,6 +69,7 @@ AM_MAKEFLAGS = \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"CFLAGS_LONGDOUBLE=$(CFLAGS_LONGDOUBLE)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -371,6 +371,7 @@ AM_MAKEFLAGS = \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"CFLAGS_LONGDOUBLE=$(CFLAGS_LONGDOUBLE)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -38,6 +38,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
"GDC=$(GDC)" \
"GDCFLAGS=$(GDCFLAGS)" \

View File

@ -365,6 +365,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
"GDC=$(GDC)" \
"GDCFLAGS=$(GDCFLAGS)" \

View File

@ -88,6 +88,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -512,6 +512,7 @@ AUTOMAKE_OPTIONS = foreign info-in-builddir
@BUILD_LIBQUADMATH_TRUE@ "CXXFLAGS=$(CXXFLAGS)" \
@BUILD_LIBQUADMATH_TRUE@ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
@BUILD_LIBQUADMATH_TRUE@ "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
@BUILD_LIBQUADMATH_TRUE@ "EXPECT=$(EXPECT)" \
@BUILD_LIBQUADMATH_TRUE@ "INSTALL=$(INSTALL)" \
@BUILD_LIBQUADMATH_TRUE@ "INSTALL_DATA=$(INSTALL_DATA)" \
@BUILD_LIBQUADMATH_TRUE@ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -77,6 +77,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -403,6 +403,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -142,6 +142,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \

View File

@ -460,6 +460,7 @@ AM_MAKEFLAGS = \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"EXPECT=$(EXPECT)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \