From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id E4CFF3857C4D for ; Wed, 19 Aug 2020 14:56:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E4CFF3857C4D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-420-8kEzXq00OMOi4gyxZyTqqQ-1; Wed, 19 Aug 2020 10:55:57 -0400 X-MC-Unique: 8kEzXq00OMOi4gyxZyTqqQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE04F801AAD for ; Wed, 19 Aug 2020 14:55:56 +0000 (UTC) Received: from blade.nx (ovpn-114-188.ams2.redhat.com [10.36.114.188]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0797100AE5A for ; Wed, 19 Aug 2020 14:55:56 +0000 (UTC) Received: from blade.com (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id C015B816CCA9 for ; Wed, 19 Aug 2020 15:55:55 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH] Disable Clang's integrated assembler for two testcases Date: Wed, 19 Aug 2020 15:55:54 +0100 Message-Id: <1597848954-21937-1-git-send-email-gbenson@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Aug 2020 14:56:02 -0000 Hi all, 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 patch causes Clang to invoke the system assembler to assemble the relevant files. Checked on Fedora 32 x86_64, GCC and clang. Ok to commit? Cheers, Gary -- gdb/testsuite/ChangeLog: * gdb.dwarf2/dw2-dir-file-name.exp: Use system assembler when compiling with clang. * gdb.dwarf2/dw2-restore.exp: Likewise --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp | 6 ++++++ gdb/testsuite/gdb.dwarf2/dw2-restore.exp | 9 ++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) 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 } -- 1.8.3.1