public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@wdc.com>
To: cltang@codesourcery.com
Cc: Julian Brown <julian@codesourcery.com>,
	Mike Stump <mikestump@comcast.net>,
	    gcc-patches@gcc.gnu.org,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PING^4][PATCH 0/4] Fix library testsuite compilation for build sysroot
Date: Fri, 31 Jan 2020 22:36:00 -0000	[thread overview]
Message-ID: <alpine.LFD.2.21.2001271814260.14118@redsun52.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <alpine.LFD.2.21.2001210221460.15714@redsun52.ssa.fujisawa.hgst.com>

On Tue, 21 Jan 2020, Maciej W. Rozycki wrote:

>  I'll give your proposal a shot and I'm lucky enough to have a build 
> configuration where I can have no compiler preinstalled, so at least I can 
> check if testing with your change applied correctly picks the newly built 
> uninstalled compiler in that case.

 So it does seem to pick the right uninstalled compiler, however without 
the sysroot option and therefore all tests fail either like:

.../bin/riscv64-linux-gnu-ld: cannot find crt1.o: No such file or directory
.../bin/riscv64-linux-gnu-ld: cannot find -lm
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: libgomp.c/../libgomp.c-c++-common/depend-iterator-2.c (test for excess errors)

or like:

.../libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/cancel-parallel-1.c:4:10: fatal error: stdlib.h: No such file or directory
compilation terminated.
compiler exited with status 1
FAIL: libgomp.c/../libgomp.c-c++-common/cancel-parallel-1.c (test for excess errors)

I am somewhat wary about picking the compiler options to pass selectively 
anyway.  However the change below does not do that and works for me and I 
think it should be fine for your use case too.  Please confirm.

 I'm yet verifying the other libraries with corresponding changes and will 
formally submit v2 of this series once that has completed.

 Apologies for the slightly long RTT with this update.

  Maciej

---
 libgomp/testsuite/Makefile.am                 |    1 +
 libgomp/testsuite/Makefile.in                 |    1 +
 libgomp/testsuite/libgomp-test-support.exp.in |    2 --
 3 files changed, 2 insertions(+), 2 deletions(-)

gcc-test-libgomp-runtestflags-tool-exec.diff
Index: gcc/libgomp/testsuite/Makefile.am
===================================================================
--- gcc.orig/libgomp/testsuite/Makefile.am
+++ gcc/libgomp/testsuite/Makefile.am
@@ -11,6 +11,7 @@ EXPECT = $(shell if test -f $(top_buildd
 _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \
 	     echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+AM_RUNTESTFLAGS = --tool_exec "$(CC)"
 
 # Instead of directly in ../testsuite/libgomp-test-support.exp.in, the
 # following variables have to be "routed through" this Makefile, for expansion
Index: gcc/libgomp/testsuite/Makefile.in
===================================================================
--- gcc.orig/libgomp/testsuite/Makefile.in
+++ gcc/libgomp/testsuite/Makefile.in
@@ -308,6 +308,7 @@ _RUNTEST = $(shell if test -f $(top_srcd
 	     echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi)
 
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
+AM_RUNTESTFLAGS = --tool_exec "$(CC)"
 all: all-am
 
 .SUFFIXES:
Index: gcc/libgomp/testsuite/libgomp-test-support.exp.in
===================================================================
--- gcc.orig/libgomp/testsuite/libgomp-test-support.exp.in
+++ gcc/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@"

  reply	other threads:[~2020-01-31 21:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 18:12 [PATCH " Maciej W. Rozycki
2019-11-11 18:12 ` [PATCH 1/4] libatomic/test: Fix " Maciej W. Rozycki
2019-11-11 18:12 ` [PATCH 2/4] libffi/test: " Maciej W. Rozycki
2019-11-11 18:23 ` [golang-dev] [PATCH 0/4] Fix library testsuite " Ulderico Cirello
2019-11-11 18:29   ` Kaz Kylheku (libffi)
2019-11-11 18:42     ` Ian Lance Taylor
2019-11-11 18:35   ` Ian Lance Taylor
2019-11-11 18:45     ` Maciej W. Rozycki
2019-11-11 23:29       ` Ian Lance Taylor
2019-11-11 18:44   ` Maciej W. Rozycki
2019-11-26 15:56 ` [PING][PATCH " Maciej W. Rozycki
2019-12-02 14:49 ` [PING^2][PATCH " Maciej W. Rozycki
2019-12-09 21:30 ` [PING^3][PATCH " Maciej W. Rozycki
2019-12-17  0:06 ` [PING^4][PATCH " Maciej W. Rozycki
2019-12-21  1:30   ` Mike Stump
2019-12-22  1:34     ` Maciej W. Rozycki
2020-01-03 11:34       ` Julian Brown
2020-01-06 15:25         ` Maciej W. Rozycki
2020-01-09 21:00           ` Tobias Burnus
2020-01-14 13:43           ` Chung-Lin Tang
2020-01-21  3:21             ` Maciej W. Rozycki
2020-01-31 22:36               ` Maciej W. Rozycki [this message]
2020-02-11  8:35                 ` Chung-Lin Tang
2020-02-11 21:31                   ` Maciej W. Rozycki
2023-06-02  9:52             ` Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951] Thomas Schwinge
2023-06-03 20:32               ` Maciej W. Rozycki
2023-09-12  9:35                 ` libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] (was: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951]) Thomas Schwinge
2023-09-12  9:35               ` Pass 'SYSROOT_CFLAGS_FOR_TARGET' down to target libraries [PR109951] " Thomas Schwinge
2020-01-06 15:47     ` [PING^5][PATCH 0/4] Fix library testsuite compilation for build sysroot Maciej W. Rozycki
2020-01-13 21:20     ` [PING^6][PATCH " Maciej W. Rozycki
2020-01-21  2:44     ` [PING^7][PATCH " Maciej W. Rozycki
2020-01-26 21:07       ` Jeff Law
2020-02-13 23:37         ` 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.2001271814260.14118@redsun52.ssa.fujisawa.hgst.com \
    --to=macro@wdc.com \
    --cc=cltang@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=julian@codesourcery.com \
    --cc=mikestump@comcast.net \
    --cc=thomas@codesourcery.com \
    /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).