From patchwork Tue May 9 12:39:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 91582 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2848619vqo; Tue, 9 May 2023 05:40:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kq56+dKJa/q6/lGkTJgLUL1JgxzzqwBPFr621LPcaJYYW85l04nW6nyW1xij+ZdZ63cT5 X-Received: by 2002:a05:6402:1353:b0:50b:d57c:2a7c with SMTP id y19-20020a056402135300b0050bd57c2a7cmr11918713edw.18.1683636032917; Tue, 09 May 2023 05:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683636032; cv=none; d=google.com; s=arc-20160816; b=WlMxgdmIDL6qD6fvYOixEk0JXZR31h5dOk/YkzLoqNsmWREJfbBokyZdN/bFDiwjRG NEkgzW6Xrl4H2427xIVEArtd81ECG7RaLZXUGsRm1yoXWWqlPcDUBf3xfvJxHaIfVfhE SWOAj2suZYIwtp6n+JC4n57HWRID+N/QfPWm+AolXcgLZ/auO92eYvCTL1W6RIwmtvKm tD7hsodHDA35LBt/WNN6gVL+L/LaR7qmw6MnjMNau+C4sjeWx9n9T89x2Q9FWu07npqZ mD1FKFhSerbvu2ijiDwqef9JRcda3MkXfBIDLgztwyKLsvGJ/MapNUrm9GIIjD2ohgVD 1nIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:ironport-sdr :dmarc-filter:delivered-to; bh=QAZJh0FzEgtjGAqXNDooj6KjPCcQZe+2cpxZKbaESa4=; b=rHokY+dVj0KGdcgaA40/pgwdNHtfMpPa9PTYM9/Ssls7YK1B85HyDA4YXj3Qh96g1X Wk3BWF8s6YXv4+IuHxKNTzERaUHH39FMOfQ5ro77rH7r3rCwIPc0jq/76zSs6P4diU1y t9VYw4t6ZaMdjxn/oxyvFHEHyW3BnUS/xYCymXUpEWbYpUC8e3svP7aV2FLIFXG3zsNR Ca0Of/ytFtmPM0f2aTBf4untk23/1Ah7Wv+vZbC0K2EVA7oaaXw6fz9TLbicDu47Pxoa eWM5Ksvre3kO/G7bjNjJldnAgAgkkUZFdTSXW4jQF3UzwCBfIvoQskIsp/gsKbpqJIpB 2Sdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id t8-20020aa7d708000000b0050bc4bf0a9csi1093613edq.296.2023.05.09.05.40.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 05:40:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 71852385735C for ; Tue, 9 May 2023 12:40:27 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 4E8783858D37 for ; Tue, 9 May 2023 12:40:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4E8783858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,262,1677571200"; d="scan'208,223";a="4728261" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 09 May 2023 04:40:00 -0800 IronPort-SDR: I+R0e1LXX51JoMpXfRO9+XaKRDH434zSxYDdCzq0BfP3bIO6t6Tw0qHdSf1tLdFXx0K4C5y3+x Xw8IK7a76xck8isiWzqFr65oUc50vGbuZAyydwWbPJZeBfxC8mak8iw7SON8rNXq0tSKJ6xBP4 e5i40zrGQwaJe6xbKozzMC7SV06KxXa6stw1a+O12x+oaFkQNjHdv7s1QWbl8/reQmgUerlrGy DtWf1xFLLwa+71Kf5xU0akZu4jV8Qt5Vt5LGpcLwxH7J8NovPI100XMptcLt8bS+LWK4KAaEWK Ddg= From: Thomas Schwinge To: CC: Mike Stump , Jakub Jelinek , Tobias Burnus , Rainer Orth 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?)) In-Reply-To: <873545bs0q.fsf@euler.schwinge.homeip.net> References: <87h9z5wd1z.fsf@schwinge.name> <87y4rrrwnc.fsf@schwinge.name> <873545bs0q.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Tue, 9 May 2023 14:39:53 +0200 Message-ID: <87zg6dadba.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765420336636350858?= X-GMAIL-MSGID: =?utf-8?q?1765420336636350858?= Hi! On 2023-05-09T14:36:53+0200, I wrote: > On 2014-11-04T10:31:37-0800, Mike Stump wrote: >> On Nov 4, 2014, at 4:13 AM, Thomas Schwinge 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 From fed3dbbfd1b707d7386b14e724056bfe2234e3a5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge 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