@@ -41,6 +41,9 @@ proc gcc_target_object_format { } {
} elseif { [istarget *-*-aix*] } {
# AIX doesn't necessarily have objdump, so hand-code it.
set gcc_target_object_format_saved coff
+ } elseif { [istarget *-*-amdhsa*] } {
+ # AMD GCN uses LLVM objdump which is not CLI-compatible
+ set gcc_target_object_format_saved elf
} else {
set objdump_name [find_binutils_prog objdump]
set open_file [open objfmtst.c w]
@@ -363,7 +363,7 @@ proc gcc-dg-prune { system text } {
# Complain about blank lines in the output (PR other/69006)
global allow_blank_lines
- if { !$allow_blank_lines } {
+ if { !$allow_blank_lines && ![check_effective_target_llvm_binutils]} {
set num_blank_lines [llength [regexp -all -inline "\n\n" $text]]
if { $num_blank_lines } {
global testname_with_flags
@@ -8702,6 +8702,14 @@ proc check_effective_target_offload_hsa { } {
} "-foffload=hsa" ]
}
+# Return 1 if the compiler has been configured with hsa offloading.
+
+proc check_effective_target_offload_gcn { } {
+ return [check_no_compiler_messages offload_gcn assembly {
+ int main () {return 0;}
+ } "-foffload=amdgcn-unknown-amdhsa" ]
+}
+
# Return 1 if the target support -fprofile-update=atomic
proc check_effective_target_profile_update_atomic {} {
return [check_no_compiler_messages profile_update_atomic assembly {
@@ -8992,9 +9000,16 @@ proc check_effective_target_cet { } {
} "-O2" ]
}
+
# Return 1 if target supports floating point "infinite"
proc check_effective_target_inf { } {
return [check_no_compiler_messages supports_inf assembly {
const double pinf = __builtin_inf ();
}]
}
+
+# Return 1 if this target uses an LLVM assembler and/or linker
+proc check_effective_target_llvm_binutils { } {
+ return [expr { [istarget amdgcn*-*-*]
+ || [check_effective_target_offload_gcn] } ]
+}