diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-09-12 09:11:48 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-09-12 13:19:42 -0700 |
commit | 08dfde5a30ca818715e6d2bc2f2b592f8a98af77 (patch) | |
tree | e8b0bae224682fd071d9953ee38d457aafb8c74e /libgo/testsuite | |
parent | f73d2d61a5926f42e9e5d771d23868787ef9d800 (diff) | |
download | gcc-08dfde5a30ca818715e6d2bc2f2b592f8a98af77.zip gcc-08dfde5a30ca818715e6d2bc2f2b592f8a98af77.tar.gz gcc-08dfde5a30ca818715e6d2bc2f2b592f8a98af77.tar.bz2 |
libgo: fix DejaGNU testsuite compiler when using build sysroot
Patch from Thomas Schwinge.
PR testsuite/109951
* configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'.
* Makefile.in: Regenerate.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
* testsuite/lib/libgo.exp (libgo_init): If
'--with-build-sysroot=[...]' was specified, use it for build-tree
testing.
* testsuite/libgo-test-support.exp.in (GOC_UNDER_TEST): Don't set.
(SYSROOT_CFLAGS_FOR_TARGET): Set.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/527755
Diffstat (limited to 'libgo/testsuite')
-rw-r--r-- | libgo/testsuite/Makefile.in | 1 | ||||
-rw-r--r-- | libgo/testsuite/lib/libgo.exp | 8 | ||||
-rw-r--r-- | libgo/testsuite/libgo-test-support.exp.in | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/libgo/testsuite/Makefile.in b/libgo/testsuite/Makefile.in index 7869265..7c2e2e6 100644 --- a/libgo/testsuite/Makefile.in +++ b/libgo/testsuite/Makefile.in @@ -223,6 +223,7 @@ SPLIT_STACK = @SPLIT_STACK@ STRINGOPS_FLAG = @STRINGOPS_FLAG@ STRIP = @STRIP@ STRUCT_EPOLL_EVENT_FD_OFFSET = @STRUCT_EPOLL_EVENT_FD_OFFSET@ +SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ USE_DEJAGNU = @USE_DEJAGNU@ VERSION = @VERSION@ WARN_FLAGS = @WARN_FLAGS@ diff --git a/libgo/testsuite/lib/libgo.exp b/libgo/testsuite/lib/libgo.exp index b5833bb..638bf86 100644 --- a/libgo/testsuite/lib/libgo.exp +++ b/libgo/testsuite/lib/libgo.exp @@ -53,5 +53,13 @@ load_gcc_lib timeout.exp load_gcc_lib go.exp proc libgo_init { args } { + global TESTING_IN_BUILD_TREE + if { [info exists TESTING_IN_BUILD_TREE] } { + # If '--with-build-sysroot=[...]' was specified, use it for build-tree + # testing. + global TEST_ALWAYS_FLAGS SYSROOT_CFLAGS_FOR_TARGET + set TEST_ALWAYS_FLAGS $SYSROOT_CFLAGS_FOR_TARGET + } + go_init $args } diff --git a/libgo/testsuite/libgo-test-support.exp.in b/libgo/testsuite/libgo-test-support.exp.in index aaa6c5e..effd6f1 100644 --- a/libgo/testsuite/libgo-test-support.exp.in +++ b/libgo/testsuite/libgo-test-support.exp.in @@ -14,4 +14,4 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -set GOC_UNDER_TEST {@GOC@} +set SYSROOT_CFLAGS_FOR_TARGET {@SYSROOT_CFLAGS_FOR_TARGET@} |