diff options
author | Lancelot SIX <lancelot.six@amd.com> | 2023-02-07 15:13:47 +0000 |
---|---|---|
committer | Lancelot SIX <lancelot.six@amd.com> | 2023-02-13 09:42:14 +0000 |
commit | f9767e607d7fc0063556b5f2650dd7162d5af91a (patch) | |
tree | ec6f7e42a6af40d12865752efb35b9d7ae423a6c /gdb | |
parent | 39f6d7c6b06b06a0372284f30c86417a8c0d6ba5 (diff) | |
download | gdb-f9767e607d7fc0063556b5f2650dd7162d5af91a.zip gdb-f9767e607d7fc0063556b5f2650dd7162d5af91a.tar.gz gdb-f9767e607d7fc0063556b5f2650dd7162d5af91a.tar.bz2 |
gdb/testsuite: look for hipcc in env(ROCM_PATH)
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.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/lib/future.exp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp index 5720d38..fa839fc 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 "" |