public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>
Cc: Mike Stump <mikestump@comcast.net>,
	Jakub Jelinek <jakub@redhat.com>,
	Tobias Burnus <tobias@codesourcery.com>,
	Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Subject: libgomp testsuite: Only use 'blddir' if set (was: libgomp C++ testsuite: Don't compute 'blddir' twice (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?))
Date: Tue, 9 May 2023 14:39:53 +0200	[thread overview]
Message-ID: <87zg6dadba.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <873545bs0q.fsf@euler.schwinge.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

Hi!

On 2023-05-09T14:36:53+0200, I wrote:
> On 2014-11-04T10:31:37-0800, Mike Stump <mikestump@comcast.net> wrote:
>> On Nov 4, 2014, at 4:13 AM, Thomas Schwinge <thomas@codesourcery.com> wrote:
>>> On Wed, 15 Oct 2014 17:46:48 +0200, I wrote:
>>>> [...]
>>>>
>>>> Am I on the right track with the following?
>>>
>>> Nobody commented, which also means nobody disagreed
>>
>> :-)
>>
>>> OK to commit all that to trunk?
>>
>> Ok, thanks.
>
> Almost one decade later (eek...) I'm now finally getting back to this.
> First, a number of clean-up patches; rebased, adjusted, retested for
> current state of affairs (not too much changed in libgomp testsuite
> infrastructure, though).

Pushed to master branch commit fed3dbbfd1b707d7386b14e724056bfe2234e3a5
"libgomp testsuite: Only use 'blddir' if set", see attached.


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-libgomp-testsuite-Only-use-blddir-if-set.patch --]
[-- Type: text/x-diff, Size: 3091 bytes --]

From fed3dbbfd1b707d7386b14e724056bfe2234e3a5 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Mon, 3 Nov 2014 09:58:38 +0100
Subject: [PATCH] libgomp testsuite: Only use 'blddir' if set

(It is unclear to me why the current working directory needs to be in
'LD_LIBRARY_PATH'; leaving that alone for now.)

	libgomp/
	* testsuite/lib/libgomp.exp (libgomp_init): Only use 'blddir' if
	set.
	* testsuite/libgomp.c++/c++.exp: Likewise.
	* testsuite/libgomp.oacc-c++/c++.exp: Likewise.
---
 libgomp/testsuite/lib/libgomp.exp          | 5 +++--
 libgomp/testsuite/libgomp.c++/c++.exp      | 3 ++-
 libgomp/testsuite/libgomp.oacc-c++/c++.exp | 3 ++-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index e12236e9083c..92f650742290 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -66,7 +66,6 @@ proc libgomp_init { args } {
     global srcdir blddir objdir tool_root_dir
     global libgomp_initialized
     global tmpdir
-    global blddir
     global gluefile wrap_flags
     global ALWAYS_CFLAGS
     global CFLAGS
@@ -118,7 +117,7 @@ proc libgomp_init { args } {
     }
 
     # Compute what needs to be put into LD_LIBRARY_PATH
-    set always_ld_library_path ".:${blddir}/.libs"
+    set always_ld_library_path "."
 
     global offload_additional_lib_paths
     if { $offload_additional_lib_paths != "" } {
@@ -157,6 +156,8 @@ proc libgomp_init { args } {
         lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs"
         lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
         lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
+
+	append always_ld_library_path ":${blddir}/.libs"
     }
     # The top-level include directory, for gomp-constants.h.
     lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/../../include"
diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp
index 81c188e297a8..188d1a823561 100644
--- a/libgomp/testsuite/libgomp.c++/c++.exp
+++ b/libgomp/testsuite/libgomp.c++/c++.exp
@@ -62,7 +62,8 @@ if { $lang_test_file_found } {
     set_ld_library_path_env_vars
 
     set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
-    if { [file exists $flags_file] } {
+    if { $blddir != ""
+	 && [file exists $flags_file] } {
 	set lang_source_re {^.*\.[cC]$}
 	set lang_include_flags [exec sh $flags_file --build-includes]
     }
diff --git a/libgomp/testsuite/libgomp.oacc-c++/c++.exp b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
index 09001788bb42..24a4d1f67b96 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/c++.exp
+++ b/libgomp/testsuite/libgomp.oacc-c++/c++.exp
@@ -68,7 +68,8 @@ if { $lang_test_file_found } {
     set_ld_library_path_env_vars
 
     set flags_file "${blddir}/../libstdc++-v3/scripts/testsuite_flags"
-    if { [file exists $flags_file] } {
+    if { $blddir != ""
+	 && [file exists $flags_file] } {
 	set lang_source_re {^.*\.[cC]$}
 	set lang_include_flags [exec sh $flags_file --build-includes]
     }
-- 
2.39.2


  reply	other threads:[~2023-05-09 12:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 15:52 libgomp testsuite: (not) using a specific driver for C++, Fortran? Thomas Schwinge
2014-11-04 12:14 ` Thomas Schwinge
2014-11-04 18:32   ` Mike Stump
2023-05-09 12:36     ` libgomp C++ testsuite: Don't compute 'blddir' twice (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?) Thomas Schwinge
2023-05-09 12:39       ` Thomas Schwinge [this message]
2023-05-09 12:41         ` libgomp testsuite: Use 'lang_test_file_found' instead of 'lang_test_file' (was: libgomp testsuite: Only use 'blddir' if set (was: libgomp C++ testsuite: Don't compute 'blddir' twice (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?))) Thomas Schwinge
2023-05-09 12:54     ` libgomp testsuite: Localize 'lang_[...]' etc. (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?) Thomas Schwinge
2023-05-09 12:59       ` libgomp C++, Fortran testsuites: Resolve 'lang_test_file_found' first (was: libgomp testsuite: Localize 'lang_[...]' etc. (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?)) Thomas Schwinge
2023-05-09 13:05         ` libgomp testsuite: Get rid of 'lang_test_file_found' (was: libgomp C++, Fortran testsuites: Resolve 'lang_test_file_found' first (was: libgomp testsuite: Localize 'lang_[...]' etc. (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?))) Thomas Schwinge
2023-05-12  7:26     ` libgomp testsuite: Generalize 'lang_library_path' into a list of 'lang_library_paths' (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?) Thomas Schwinge
2023-05-12  8:27     ` libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] " Thomas Schwinge
2023-05-12  8:33       ` libgomp testsuite: As appropriate, use the 'gcc', 'g++', 'gfortran' driver [PR91884] (was: libgomp testsuite: Have each '*.exp' file specify the compiler to use [PR91884] (was: libgomp testsuite: (not) using a specific driver for C++, Fortran?)) Thomas Schwinge

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=87zg6dadba.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=mikestump@comcast.net \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=tobias@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).