testsuite: Disable BTF and CTF testsuite on AIX. CTF utilizes DWARF sections, but it is a distinct debugging format. The CTF support in GCC is not implemented as a separate debugging format. AIX supports DWARF but not CTF sections.
The GCC testsuite test for target support of a debugging format checks if GCC itself emits an error message, not if the debugging output compiles correctly. Because CTF is not a distinct debugging format, GCC does not distinguish support for targets and does not have the ability to produce an error message. This patch skips the CTF and BTF debug directories, and explicitly reports that AIX doesn't support CTF. Currently the dejagnu code to skip multiple debugging levels for CTF does not ensure that CTF is a supported debugging format. The patch shifts the CTF options logic to within the test that CTF debug format is supported. I think that GCC write_symbols explicitly should know about CTF, but based on the patch that was accepted and committed, this is what is necessary for systems to disable testing the debugging format. Bootstrapped on powerpc-ibm-aix7.2.3.0 and powerpc64le-linux. Thanks, David gcc/testsuite/ChangeLog: * lib/gcc/debug/btf/btf.exp: Skip on AIX. * lib/gcc/debug/ctf/ctf.exp: Skip on AIX. * lib/gcc-dg.exp (gcc-dg-target-supports-debug-format): AIX doesn't support CTF. (gcc-dg-debug-runtest): Move CTF support within target support format test. diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf.exp b/gcc/testsuite/gcc.dg/debug/btf/btf.exp index e72a2be8516..e1735158666 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf.exp +++ b/gcc/testsuite/gcc.dg/debug/btf/btf.exp @@ -24,6 +24,11 @@ if { [istarget nvptx-*-*] } { return } +if { [istarget "powerpc-ibm-aix*"] } { + set torture_execute_xfail "powerpc-ibm-aix*" + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { diff --git a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp index 46055f8a2bf..0b650ed7406 100644 --- a/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp +++ b/gcc/testsuite/gcc.dg/debug/ctf/ctf.exp @@ -24,6 +24,11 @@ if { [istarget nvptx-*-*] } { return } +if { [istarget "powerpc-ibm-aix*"] } { + set torture_execute_xfail "powerpc-ibm-aix*" + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 51d8a11f878..81f4bb2ff79 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -641,6 +641,7 @@ proc gcc-dg-frontend-supports-ctf { target_compile trivial} { proc gcc-dg-target-supports-debug-format { target_compile trivial type } { global srcdir subdir + if {$type == "-gctf" && [istarget *-*-aix*]} { return 0 } set comp_output [$target_compile \ "$srcdir/$subdir/$trivial" "trivial.S" assembly \ "additional_flags=$type"] @@ -656,29 +657,29 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } { if ![info exists DEBUG_TORTURE_OPTIONS] { set DEBUG_TORTURE_OPTIONS "" foreach type {-gctf -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+} { - if { $type == "-gctf" } { - if [expr [gcc-dg-frontend-supports-ctf \ - $target_compile $trivial]] { - # At this time, running tests with various opt levels or - # ctf debug info levels does not add value. diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 51d8a11f878..81f4bb2ff79 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -641,6 +641,7 @@ proc gcc-dg-frontend-supports-ctf { target_compile trivial} { proc gcc-dg-target-supports-debug-format { target_compile trivial type } { global srcdir subdir + if {$type == "-gctf" && [istarget *-*-aix*]} { return 0 } set comp_output [$target_compile \ "$srcdir/$subdir/$trivial" "trivial.S" assembly \ "additional_flags=$type"] @@ -656,29 +657,29 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } { if ![info exists DEBUG_TORTURE_OPTIONS] { set DEBUG_TORTURE_OPTIONS "" foreach type {-gctf -gdwarf-2 -gstabs -gstabs+ -gxcoff -gxcoff+} { - if { $type == "-gctf" } { - if [expr [gcc-dg-frontend-supports-ctf \ - $target_compile $trivial]] { - # At this time, running tests with various opt levels or - # ctf debug info levels does not add value. - lappend DEBUG_TORTURE_OPTIONS [list "${type}"] + if [expr [gcc-dg-target-supports-debug-format \ + $target_compile $trivial $type]] { + if { $type == "-gctf" } { + if [expr [gcc-dg-frontend-supports-ctf \ + $target_compile $trivial]] { + # At this time, running tests with various opt levels or + # ctf debug info levels does not add value. + lappend DEBUG_TORTURE_OPTIONS [list "${type}"] + } + continue } - } else { - if [expr [gcc-dg-target-supports-debug-format \ - $target_compile $trivial $type]] { - foreach level {1 "" 3} { - if { ($type == "-gdwarf-2") && ($level != "") } { - lappend DEBUG_TORTURE_OPTIONS [list "${type}" "-g${level}"] - foreach opt $opt_opts { - lappend DEBUG_TORTURE_OPTIONS \ - [list "${type}" "-g${level}" "$opt" ] - } - } else { - lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"] - foreach opt $opt_opts { - lappend DEBUG_TORTURE_OPTIONS \ - [list "${type}${level}" "$opt" ] - } + foreach level {1 "" 3} { + if { ($type == "-gdwarf-2") && ($level != "") } { + lappend DEBUG_TORTURE_OPTIONS [list "${type}" "-g${level}"] + foreach opt $opt_opts { + lappend DEBUG_TORTURE_OPTIONS \ + [list "${type}" "-g${level}" "$opt" ] + } + } else { + lappend DEBUG_TORTURE_OPTIONS [list "${type}${level}"] + foreach opt $opt_opts { + lappend DEBUG_TORTURE_OPTIONS \ + [list "${type}${level}" "$opt" ] } } }