[v2] gdb/testsuite: Disable gdb.compile when testing with clang
Commit Message
Attempting to test the gdb.compile with clang as the compiler results in
over 300 unexpected errors, due to a segmentation fault and several
handshake failures. Since the whole feature is designed around a gcc
plugin, and even the gcc testing is shaky at best, this commit restricts
those tests to only running under gcc. If that gets fixed, this commit
can be reverted.
---
Changes for v2:
* Used require instead of "if" when checking compiler
gdb/testsuite/gdb.compile/compile-cplus-anonymous.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-array-decay.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-inherit.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-member.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-method.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-nested.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-print.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus-virtual.exp | 2 ++
gdb/testsuite/gdb.compile/compile-cplus.exp | 2 ++
gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 ++
gdb/testsuite/gdb.compile/compile-ops.exp | 2 ++
gdb/testsuite/gdb.compile/compile-print.exp | 2 ++
gdb/testsuite/gdb.compile/compile-setjmp.exp | 2 ++
gdb/testsuite/gdb.compile/compile-tls.exp | 2 ++
gdb/testsuite/gdb.compile/compile.exp | 6 ++----
16 files changed, 32 insertions(+), 4 deletions(-)
Comments
>>>>> "Bruno" == Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> writes:
Bruno> Ping!
Thanks for the patch.
I don't remember seeing it, maybe I missed it somehow.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++ additional_flags=-std=c++11}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -17,6 +17,8 @@ load_lib compile-support.exp
standard_testfile
+require is_c_compiler_gcc
+
set options {}
if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
@@ -21,6 +21,8 @@ standard_testfile .cc
require allow_cplus_tests
+require is_c_compiler_gcc
+
if {[prepare_for_testing $testfile $testfile $srcfile \
{debug nowarnings c++}]} {
return -1
@@ -17,6 +17,8 @@ load_lib compile-support.exp
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
+require is_c_compiler_gcc
+
set options {}
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
lappend options additional_flags=-g3
@@ -19,6 +19,8 @@ require allow_ifunc_tests
standard_testfile
+require is_c_compiler_gcc
+
set flags ""
if [test_compiler_info gcc*] {
set flags additional_flags=-Wno-attribute-alias
@@ -22,6 +22,8 @@ load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
require dwarf2_support
+require is_c_compiler_gcc
+
standard_testfile .c -dbg.S
#
@@ -17,6 +17,8 @@ load_lib compile-support.exp
standard_testfile
+require is_c_compiler_gcc
+
if { [prepare_for_testing "failed to prepare" "$testfile"] } {
return -1
}
@@ -17,6 +17,8 @@ load_lib compile-support.exp
standard_testfile .c compile-setjmp-mod.c
+require is_c_compiler_gcc
+
if { [prepare_for_testing "failed to prepare" $testfile] } {
return -1
}
@@ -17,6 +17,8 @@ load_lib compile-support.exp
standard_testfile .c
+require is_c_compiler_gcc
+
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
return -1
@@ -17,10 +17,8 @@ load_lib compile-support.exp
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
-set options {}
-if [test_compiler_info gcc*] {
- lappend options additional_flags=-g3
-}
+require is_c_compiler_gcc
+set options {additional_flags=-g3}
if { ![is_x86_64_m64_target] } {
verbose "Skipping x86_64 LOC_CONST test."