public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-3909] libgo: fix DejaGNU testsuite compiler when using build sysroot
@ 2023-09-12 20:20 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2023-09-12 20:20 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:08dfde5a30ca818715e6d2bc2f2b592f8a98af77
commit r14-3909-g08dfde5a30ca818715e6d2bc2f2b592f8a98af77
Author: Ian Lance Taylor <iant@golang.org>
Date: Tue Sep 12 09:11:48 2023 -0700
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
Diff:
---
gcc/go/gofrontend/MERGE | 2 +-
libgo/Makefile.in | 1 +
libgo/configure | 7 +++++--
libgo/configure.ac | 2 ++
libgo/testsuite/Makefile.in | 1 +
libgo/testsuite/lib/libgo.exp | 8 ++++++++
libgo/testsuite/libgo-test-support.exp.in | 2 +-
7 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 30710e856cba..d24054e0d930 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-53cdfab53ce79d8dfc1df01a696d4ffc43f17c3d
+967a215d6419c3db58f8f59a0c252c458abce395
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 40340bfb7a5a..8dcb6d6a3548 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -474,6 +474,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/configure b/libgo/configure
index a607dbff68eb..2f1609b42b56 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -633,6 +633,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+SYSROOT_CFLAGS_FOR_TARGET
HAVE_STATIC_LINK_FALSE
HAVE_STATIC_LINK_TRUE
HAVE_STAT_TIMESPEC_FALSE
@@ -11544,7 +11545,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11547 "configure"
+#line 11548 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11650,7 +11651,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11653 "configure"
+#line 11654 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16147,6 +16148,8 @@ else
fi
+
+
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
diff --git a/libgo/configure.ac b/libgo/configure.ac
index a59aa091d1dc..54c35c0903c6 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -913,6 +913,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(,)],
LDFLAGS=$LDFLAGS_hold])
AM_CONDITIONAL(HAVE_STATIC_LINK, test "$libgo_cv_ld_static" = yes)
+AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+
AC_CACHE_SAVE
if test ${multilib} = yes; then
diff --git a/libgo/testsuite/Makefile.in b/libgo/testsuite/Makefile.in
index 7869265851cb..7c2e2e62fcf3 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 b5833bbafe27..638bf8696025 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 aaa6c5ef91d4..effd6f1caca5 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@}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-12 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 20:20 [gcc r14-3909] libgo: fix DejaGNU testsuite compiler when using build sysroot Ian Lance Taylor
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).