From: Lancelot SIX <lancelot.six@amd.com>
To: <gdb-patches@sourceware.org>
Cc: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com>
Subject: [PATCH v2 5/5] gdb/testsuite: look for hipcc in env(ROCM_PATH)
Date: Thu, 9 Feb 2023 11:26:13 +0000 [thread overview]
Message-ID: <20230209112613.922098-6-lancelot.six@amd.com> (raw)
In-Reply-To: <20230209112613.922098-1-lancelot.six@amd.com>
If the hipcc compiler cannot be found in dejagnu's tool_root_dir, look
for it in $::env(ROCM_PATH) (if set). If hipcc is still not found,
fallback to "hipcc" so the compiler will be searched in the PATH. This
removes the fallback to the hard-coded "/opt/rocm/bin" prefix.
This change is done so ROCM tools are searched in a uniform manner.
---
gdb/testsuite/lib/future.exp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
index 5720d3837d5..fa839fcd12b 100644
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -125,8 +125,11 @@ proc gdb_find_hipcc {} {
global tool_root_dir
if {![is_remote host]} {
set hipcc [lookfor_file $tool_root_dir hipcc]
- if {$hipcc == ""} {
- set hipcc [lookfor_file /opt/rocm/bin hipcc]
+ if {$hipcc eq "" && [info exists ::env(ROCM_PATH)]} {
+ set hipcc [lookfor_file $::env(ROCM_PATH)/bin hipcc]
+ }
+ if {$hipcc eq ""} {
+ set hipcc hipcc
}
} else {
set hipcc ""
--
2.34.1
next prev parent reply other threads:[~2023-02-09 11:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 11:26 [PATCH v2 0/5] Fix gdb.rocm/simple.exp on hosts without ROCm Lancelot SIX
2023-02-09 11:26 ` [PATCH v2 1/5] gdb: 'show config' shows --with[out]-amd-dbgapi Lancelot SIX
2023-02-09 11:26 ` [PATCH v2 2/5] gdb/testsuite: Rename skip_hipcc_tests to allow_hipcc_tests Lancelot SIX
2023-02-09 11:26 ` [PATCH v2 3/5] gdb/testsuite: require amd-dbgapi support to run rocm tests Lancelot SIX
2023-02-09 11:26 ` [PATCH v2 4/5] gdb/testsuite: allow_hipcc_tests tests the hipcc compiler Lancelot SIX
2023-02-09 11:26 ` Lancelot SIX [this message]
2023-02-10 19:52 ` [PATCH v2 0/5] Fix gdb.rocm/simple.exp on hosts without ROCm Simon Marchi
2023-02-13 9:53 ` Lancelot SIX
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=20230209112613.922098-6-lancelot.six@amd.com \
--to=lancelot.six@amd.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.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).