From b8638cafabd36bc9316591da3c8326e10277372a Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Tue, 7 Feb 2023 15:13:47 +0000 Subject: [PATCH] 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. --- gdb/testsuite/lib/future.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp index 5720d3837d5..2e8315bbfe1 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 == "" && [info exists ::env(ROCM_PATH)]} { + set hipcc [lookfor_file $::env(ROCM_PATH)/bin hipcc] + } if {$hipcc == ""} { - set hipcc [lookfor_file /opt/rocm/bin hipcc] + set hipcc hipcc } } else { set hipcc "" -- 2.34.1