if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.arch/amd64-entry-value-param-dwarf5.exp COMPILE=1"
standard_testfile .c .c
- lappend opts optimize=-O2 additional_flags=-gdwarf-5
+ lappend opts optimize=-O2 dwarf5
} else {
require is_x86_64_m64_target
}
# we let that be the test of whether the target supports it.
if { [prepare_for_testing "failed to prepare" "${testfile}" \
- $srcfile {debug c++ additional_flags=-gdwarf-5 \
- additional_flags=-O0}] } {
+ $srcfile {debug c++ dwarf5 additional_flags=-O0}] } {
return -1
}
# - no-build-id: Ensure the final binary does not include a build-id.
# - column-info/no-column-info: Enable/Disable generation of column table
# information.
+# - dwarf5: Force compilation with dwarf-5 debug information.
#
# And here are some of the not too obscure options understood by DejaGnu that
# influence the compilation:
error "Option gno-column-info not supported by compiler."
}
+ } elseif { $opt == "dwarf5" } {
+ if {[test_compiler_info {gcc-*}] \
+ || [test_compiler_info {clang-*}]} {
+ lappend new_options "additional_flags=-gdwarf-5"
+ } else {
+ error "No idea how to force DWARF-5 in this compiler"
+ }
} else {
lappend new_options $opt
}