aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2020-08-25 15:25:04 +0100
committerGary Benson <gbenson@redhat.com>2020-08-25 15:25:04 +0100
commitb04aa1fc8c9d4a79e6293a3a1df7507052afedf3 (patch)
tree9b095430024a8e411bbcdfc61cfc6d1b1c68225a
parent9f68b4534846660ad07f988815523ce75dc8f78a (diff)
downloadbinutils-b04aa1fc8c9d4a79e6293a3a1df7507052afedf3.zip
binutils-b04aa1fc8c9d4a79e6293a3a1df7507052afedf3.tar.gz
binutils-b04aa1fc8c9d4a79e6293a3a1df7507052afedf3.tar.bz2
Disable Clang's integrated assembler for two testcases
gdb.dwarf2/dw2-dir-file-name.exp fails to build using Clang because the generated assembly language contains .ascii directives with more than one string literal. gdb.dwarf2/dw2-restore.exp fails to build using Clang because it contains .func and .endfunc directives. This commit causes Clang to invoke the system assembler to assemble the relevant files. gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-dir-file-name.exp: Use system assembler when compiling with clang. * gdb.dwarf2/dw2-restore.exp: Likewise
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp6
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-restore.exp9
3 files changed, 20 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 93df7f9..a945a57 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2020-08-25 Gary Benson <gbenson@redhat.com>
+ * gdb.dwarf2/dw2-dir-file-name.exp: Use system assembler
+ when compiling with clang.
+ * gdb.dwarf2/dw2-restore.exp: Likewise
+
+2020-08-25 Gary Benson <gbenson@redhat.com>
+
* gdb.cp/ambiguous.exp: Enable test when compiling with GCC.
Add additional_flags=-Wno-inaccessible-base when compiling
with GCC >= 10.1 or clang. Add additional_flags=-w when
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
index 0de71f2..973325f 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp
@@ -333,6 +333,12 @@ lappend opts "additional_flags=-DFDIR=\"fdir\""
# CU's DW_AT_name and .debug_line's filename.
lappend opts "additional_flags=-DFILE=\"${srctmpfile}\""
+# Clang's integrated assembler doesn't support .ascii directives
+# with multiple string literals.
+if { [test_compiler_info clang*] } {
+ lappend opts "additional_flags=-fno-integrated-as"
+}
+
if { [gdb_compile "${asmsrcfile} ${srcdir}/${subdir}/$srcfile" "${binfile}" executable $opts] != "" } {
untested "failed to compile"
return -1
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
index 993f79f..04887db 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restore.exp
@@ -21,8 +21,15 @@ if {![istarget x86_64-*] || ![is_lp64_target]} {
}
standard_testfile .S
+set opts [list {additional_flags=-nostdlib}]
+
+# Clang's integrated assembler doesn't support .func or .endfunc.
+if { [test_compiler_info clang*] } {
+ lappend opts [list {additional_flags=-fno-integrated-as}]
+}
+
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile] \
- [list {additional_flags=-nostdlib}]]} {
+ $opts]} {
return -1
}