From 749bd22ddc50b5112e5ed506ffef7249bf8e6fb3 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Mon, 6 Apr 2020 23:32:45 +0100 Subject: [PATCH] libgomp/test: Remove a build sysroot fix regression Fix a problem with commit c8e759b4215b ("libgomp/test: Fix compilation for build sysroot") that caused a regression in some standalone test environments where testsuite/libgomp-test-support.exp is used, but the compiler is expected to be determined by `[find_gcc]', and set the GCC_UNDER_TEST TCL variable in testsuite/libgomp-site-extra.exp instead. libgomp/ * configure.ac: Add testsuite/libgomp-site-extra.exp to output files. * configure: Regenerate. * testsuite/libgomp-site-extra.exp.in: New file. * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): Remove variable. * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New variable. * testsuite/Makefile.in: Regenerate. --- libgomp/ChangeLog | 12 ++++++++++++ libgomp/configure | 3 +++ libgomp/configure.ac | 1 + libgomp/testsuite/Makefile.am | 2 ++ libgomp/testsuite/Makefile.in | 6 +++++- libgomp/testsuite/libgomp-site-extra.exp.in | 1 + libgomp/testsuite/libgomp-test-support.exp.in | 2 -- 7 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 libgomp/testsuite/libgomp-site-extra.exp.in diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 3716f559aa1..6f7327ab4a7 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,15 @@ +2020-04-06 Maciej W. Rozycki + + * configure.ac: Add testsuite/libgomp-site-extra.exp to output + files. + * configure: Regenerate. + * testsuite/libgomp-site-extra.exp.in: New file. + * testsuite/libgomp-test-support.exp.in (GCC_UNDER_TEST): Remove + variable. + * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): New + variable. + * testsuite/Makefile.in: Regenerate. + 2020-04-03 Thomas Schwinge PR tree-optimization/89713 diff --git a/libgomp/configure b/libgomp/configure index b0efd87642e..d8d98f182d4 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -17047,6 +17047,8 @@ ac_config_files="$ac_config_files Makefile testsuite/Makefile libgomp.spec" ac_config_files="$ac_config_files testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in" +ac_config_files="$ac_config_files testsuite/libgomp-site-extra.exp" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -18200,6 +18202,7 @@ do "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "libgomp.spec") CONFIG_FILES="$CONFIG_FILES libgomp.spec" ;; "testsuite/libgomp-test-support.pt.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in" ;; + "testsuite/libgomp-site-extra.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgomp-site-extra.exp" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/libgomp/configure.ac b/libgomp/configure.ac index be53881f449..ef5d293c31e 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -436,4 +436,5 @@ GCC_BASE_VER AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h) AC_CONFIG_FILES(Makefile testsuite/Makefile libgomp.spec) AC_CONFIG_FILES([testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in]) +AC_CONFIG_FILES([testsuite/libgomp-site-extra.exp]) AC_OUTPUT diff --git a/libgomp/testsuite/Makefile.am b/libgomp/testsuite/Makefile.am index 62b1855695c..655a413c160 100644 --- a/libgomp/testsuite/Makefile.am +++ b/libgomp/testsuite/Makefile.am @@ -12,6 +12,8 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXTRA_DEJAGNU_SITE_CONFIG = libgomp-site-extra.exp + # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the # following variables have to be "routed through" this Makefile, for expansion # of the several (Makefile) variables used therein. diff --git a/libgomp/testsuite/Makefile.in b/libgomp/testsuite/Makefile.in index bf1776117f7..52aa6c5fbc9 100644 --- a/libgomp/testsuite/Makefile.in +++ b/libgomp/testsuite/Makefile.in @@ -111,7 +111,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ DIST_COMMON = $(srcdir)/Makefile.am mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = libgomp-test-support.pt.exp +CONFIG_CLEAN_FILES = libgomp-test-support.pt.exp \ + libgomp-site-extra.exp CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -310,6 +311,7 @@ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir +EXTRA_DEJAGNU_SITE_CONFIG = libgomp-site-extra.exp all: all-am .SUFFIXES: @@ -344,6 +346,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): libgomp-test-support.pt.exp: $(top_builddir)/config.status $(srcdir)/libgomp-test-support.exp.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +libgomp-site-extra.exp: $(top_builddir)/config.status $(srcdir)/libgomp-site-extra.exp.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo diff --git a/libgomp/testsuite/libgomp-site-extra.exp.in b/libgomp/testsuite/libgomp-site-extra.exp.in new file mode 100644 index 00000000000..c0d26660bad --- /dev/null +++ b/libgomp/testsuite/libgomp-site-extra.exp.in @@ -0,0 +1 @@ +set GCC_UNDER_TEST {@CC@} diff --git a/libgomp/testsuite/libgomp-test-support.exp.in b/libgomp/testsuite/libgomp-test-support.exp.in index 6ec10c728a3..98fb442b537 100644 --- a/libgomp/testsuite/libgomp-test-support.exp.in +++ b/libgomp/testsuite/libgomp-test-support.exp.in @@ -1,5 +1,3 @@ -set GCC_UNDER_TEST {@CC@} - set cuda_driver_include "@CUDA_DRIVER_INCLUDE@" set cuda_driver_lib "@CUDA_DRIVER_LIB@" set hsa_runtime_lib "@HSA_RUNTIME_LIB@" -- 2.30.2