]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgo: fix DejaGNU testsuite compiler when using build sysroot
authorIan Lance Taylor <iant@golang.org>
Tue, 12 Sep 2023 16:11:48 +0000 (09:11 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 12 Sep 2023 20:19:42 +0000 (13:19 -0700)
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

gcc/go/gofrontend/MERGE
libgo/Makefile.in
libgo/configure
libgo/configure.ac
libgo/testsuite/Makefile.in
libgo/testsuite/lib/libgo.exp
libgo/testsuite/libgo-test-support.exp.in

index 30710e856cba0c0dbc3a3a4867d7d7db437d8361..d24054e0d930ca7405944f52ede10c8832560acc 100644 (file)
@@ -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.
index 40340bfb7a5a159000d72353513e7215d2287ef4..8dcb6d6a35485f8731948afeffd174301f524b77 100644 (file)
@@ -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@
index a607dbff68eb2451d46f1f05c4dd0ccfb41c4943..2f1609b42b5670ff7b7ba74da2c61c82099cc2ec 100755 (executable)
@@ -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
index a59aa091d1dce507ac9a08d9103dcd393b72614d..54c35c0903c6772d432e2df27eed2cf88eed47bc 100644 (file)
@@ -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
index 7869265851cb5f1b41f218f5811b7c6d584e9473..7c2e2e62fcf3b339dc32ae083abf5d848d13c295 100644 (file)
@@ -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@
index b5833bbafe270dc5de1a3ce60d7f674c4cb0c00c..638bf86960258968e1740c78eb3d26b422fc3f72 100644 (file)
@@ -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
 }
index aaa6c5ef91d403891da5ac23890887f25ff1f00a..effd6f1caca5bad90c9f842c2aad66dfd3b9d0ae 100644 (file)
@@ -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@}