public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@wdc.com>
To: gcc-patches@gcc.gnu.org
Cc: Jeff Law <law@redhat.com>, Mike Stump <mikestump@comcast.net>,
	 Chung-Lin Tang <cltang@codesourcery.com>,
	 Ian Lance Taylor <iant@golang.org>
Subject: [PATCH v4 4/5] libgo/test: Complement compilation fix for build sysroot
Date: Sat, 4 Apr 2020 00:01:44 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.21.2004032156070.461@redsun52.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2004031338210.461@redsun52.ssa.fujisawa.hgst.com>

Complement commit b72813a68c94 ("libgo: fix DejaGNU testsuite compiler 
when using build sysroot") and move testsuite/libgo-test-support.exp.in 
to testsuite/libgo-site-extra.exp.in.  Update testsuite/lib/libgo.exp to 
handle the `--tool_exec' option to `runtest' as with other top-level GCC 
target libraries, by using the TOOL_EXECUTABLE TCL variable.

	libgo/
	* configure.ac: Produce testsuite/libgo-site-extra.exp rather 
	than testsuite/libgo-test-support.exp.
	* configure: Regenerate.
	* testsuite/libgo-test-support.exp.in: Rename file to...
	* testsuite/libgo-site-extra.exp.in: ... this.
	* testsuite/Makefile.am: Use libgo-site-extra.exp rather than 
	libgo-test-support.exp.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/lib/libgo.exp: Handle TOOL_EXECUTABLE.
---
No changes from v3.

Changes from v2:

- Rename testsuite/libgo-test-support.exp.in to 
  testsuite/libgo-site-extra.exp.in.

Applies on top of v1.
---
 libgo/configure                           |    4 ++--
 libgo/configure.ac                        |    2 +-
 libgo/testsuite/Makefile.am               |    2 +-
 libgo/testsuite/Makefile.in               |    6 +++---
 libgo/testsuite/lib/libgo.exp             |   12 ++++++++----
 libgo/testsuite/libgo-site-extra.exp.in   |   17 +++++++++++++++++
 libgo/testsuite/libgo-test-support.exp.in |   17 -----------------
 7 files changed, 32 insertions(+), 28 deletions(-)

gcc-test-libgo-site-extra.diff
Index: gcc/libgo/configure
===================================================================
--- gcc.orig/libgo/configure
+++ gcc/libgo/configure
@@ -15893,7 +15893,7 @@ else
   multilib_arg=
 fi
 
-ac_config_files="$ac_config_files Makefile testsuite/Makefile testsuite/libgo-test-support.exp"
+ac_config_files="$ac_config_files Makefile testsuite/Makefile testsuite/libgo-site-extra.exp"
 
 
 ac_config_commands="$ac_config_commands default"
@@ -17074,7 +17074,7 @@ do
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
-    "testsuite/libgo-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgo-test-support.exp" ;;
+    "testsuite/libgo-site-extra.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgo-site-extra.exp" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Index: gcc/libgo/configure.ac
===================================================================
--- gcc.orig/libgo/configure.ac
+++ gcc/libgo/configure.ac
@@ -895,7 +895,7 @@ else
   multilib_arg=
 fi
 
-AC_CONFIG_FILES(Makefile testsuite/Makefile testsuite/libgo-test-support.exp)
+AC_CONFIG_FILES(Makefile testsuite/Makefile testsuite/libgo-site-extra.exp)
 
 AC_CONFIG_COMMANDS([default],
 [if test -n "$CONFIG_FILES"; then
Index: gcc/libgo/testsuite/Makefile.am
===================================================================
--- gcc.orig/libgo/testsuite/Makefile.am
+++ gcc/libgo/testsuite/Makefile.am
@@ -11,7 +11,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja
 	       echo $(top_srcdir)/../dejagnu/runtest ; \
 	    else echo runtest; fi`
 
-EXTRA_DEJAGNU_SITE_CONFIG = libgo-test-support.exp
+EXTRA_DEJAGNU_SITE_CONFIG = libgo-site-extra.exp
 
 # When running the tests we set GCC_EXEC_PREFIX to the install tree so that
 # files that have already been installed there will be found.  The -B option
Index: gcc/libgo/testsuite/Makefile.in
===================================================================
--- gcc.orig/libgo/testsuite/Makefile.in
+++ gcc/libgo/testsuite/Makefile.in
@@ -107,7 +107,7 @@ am__configure_deps = $(am__aclocal_m4_de
 DIST_COMMON = $(srcdir)/Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = libgo-test-support.exp
+CONFIG_CLEAN_FILES = libgo-site-extra.exp
 CONFIG_CLEAN_VPATH_FILES =
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -300,7 +300,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja
 	       echo $(top_srcdir)/../dejagnu/runtest ; \
 	    else echo runtest; fi`
 
-EXTRA_DEJAGNU_SITE_CONFIG = libgo-test-support.exp
+EXTRA_DEJAGNU_SITE_CONFIG = libgo-site-extra.exp
 
 # When running the tests we set GCC_EXEC_PREFIX to the install tree so that
 # files that have already been installed there will be found.  The -B option
@@ -340,7 +340,7 @@ $(top_srcdir)/configure: @MAINTAINER_MOD
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-libgo-test-support.exp: $(top_builddir)/config.status $(srcdir)/libgo-test-support.exp.in
+libgo-site-extra.exp: $(top_builddir)/config.status $(srcdir)/libgo-site-extra.exp.in
 	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
 mostlyclean-libtool:
Index: gcc/libgo/testsuite/lib/libgo.exp
===================================================================
--- gcc.orig/libgo/testsuite/lib/libgo.exp
+++ gcc/libgo/testsuite/lib/libgo.exp
@@ -17,11 +17,15 @@
 set TESTING_IN_BUILD_TREE 1
 
 if ![info exists GOC_UNDER_TEST] then {
-    set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
-    if {$gccdir != ""} {
-	set gccdir [file dirname $gccdir]
+    if [info exists TOOL_EXECUTABLE] {
+	set GOC_UNDER_TEST $TOOL_EXECUTABLE
+    } else {
+	set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
+	if {$gccdir != ""} {
+	    set gccdir [file dirname $gccdir]
+	}
+	set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
     }
-    set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/"
 }
 
 if [info exists GOTEST_TMPDIR] {
Index: gcc/libgo/testsuite/libgo-site-extra.exp.in
===================================================================
--- /dev/null
+++ gcc/libgo/testsuite/libgo-site-extra.exp.in
@@ -0,0 +1,17 @@
+# Copyright (C) 2019 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+set GOC_UNDER_TEST {@GOC@}
Index: gcc/libgo/testsuite/libgo-test-support.exp.in
===================================================================
--- gcc.orig/libgo/testsuite/libgo-test-support.exp.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2019 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-
-set GOC_UNDER_TEST {@GOC@}

  parent reply	other threads:[~2020-04-03 23:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 23:00 [PATCH v4 0/5] Fix library testsuite compilation " Maciej W. Rozycki
2020-04-03 23:00 ` [PATCH v4 1/5] libatomic/test: Fix " Maciej W. Rozycki
2020-04-06 18:10   ` Jeff Law
2020-04-06 22:34     ` Maciej W. Rozycki
2023-09-12 11:03   ` libatomic: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951] (was: [PATCH v4 1/5] libatomic/test: Fix compilation for build sysroot) Thomas Schwinge
2023-10-25  8:32     ` [PING] " Thomas Schwinge
2023-10-26 13:34       ` [PING] libatomic: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951] Jeff Law
2020-04-03 23:01 ` [PATCH v4 GCC 2/5] libffi/test: Fix compilation for build sysroot Maciej W. Rozycki
2020-04-06 18:06   ` Jeff Law
2020-04-06 20:21     ` Maciej W. Rozycki
2020-04-03 23:01 ` [PATCH v4 GCC 3/5] libffi/test: Make `libffi-init' use $CC_FOR_TARGET Maciej W. Rozycki
2020-04-03 23:01 ` Maciej W. Rozycki [this message]
2020-04-03 23:01 ` [PATCH v4 5/5] libgomp/test: Remove a build sysroot fix regression Maciej W. Rozycki
2020-04-06 18:11   ` Jeff Law
2020-04-06 22:34     ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2004032156070.461@redsun52.ssa.fujisawa.hgst.com \
    --to=macro@wdc.com \
    --cc=cltang@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@golang.org \
    --cc=law@redhat.com \
    --cc=mikestump@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).