From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id jtxvEio9oF8HFQAAWB0awg (envelope-from ) for ; Mon, 02 Nov 2020 12:08:58 -0500 Received: by simark.ca (Postfix, from userid 112) id 3F41C1F08B; Mon, 2 Nov 2020 12:08:58 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 986A61E58F for ; Mon, 2 Nov 2020 12:08:57 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 748E0382D83C; Mon, 2 Nov 2020 17:08:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 748E0382D83C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1604336936; bh=c7P91bPI+KylgdxbpTUZqNzmcERVtoiy39wwEO6vMVI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=lh1KZk/C0klLH2ZhXUNfMZ5XuUlukEoyg/q3uHAMxYlPvNSuaCY3kJLUZfvc35nlr dcsga5cNp9l2loMwnQnS6jIFcx3DtpSLWhdi34s4rqkClZfP70B3YFGx4c1EZpRWkT MVE1mgH4bCM8xueuf6+wU5Ko69gjgCpA0+bcgF84= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 8D49B3836C09 for ; Mon, 2 Nov 2020 17:08:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8D49B3836C09 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-415-FGCTxe61N7OUVtEXuOiHhg-1; Mon, 02 Nov 2020 12:08:52 -0500 X-MC-Unique: FGCTxe61N7OUVtEXuOiHhg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A75D418A6282 for ; Mon, 2 Nov 2020 17:08:51 +0000 (UTC) Received: from blade.nx (ovpn-115-15.ams2.redhat.com [10.36.115.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7797D60CCC for ; Mon, 2 Nov 2020 17:08:51 +0000 (UTC) Received: from blade.com (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id B9B72816CD2E for ; Mon, 2 Nov 2020 17:08:50 +0000 (GMT) To: gdb-patches@sourceware.org Subject: [PATCH] Fix gdb.dwarf2/clztest.exp with Clang Date: Mon, 2 Nov 2020 17:08:49 +0000 Message-Id: <1604336929-1338-1-git-send-email-gbenson@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="US-ASCII" 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: , From: Gary Benson via Gdb-patches Reply-To: Gary Benson Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi all, Clang fails to compile gdb.dwarf2/clztest.S, with the following error: gdb compile failed, /gdbtest/src/gdb/testsuite/gdb.dwarf2/clztest.S:181:2: error: changed section flags for .eh_frame, expected: 0x2 This commit fixes the testcase by defining .eh_frame's flags as Clang expects, when building with Clang (i.e. as "a" rather than as "aw".) Checked on Fedora 32 x86_64, with GCC and Clang. Ok to commit? Cheers, Gary --- gdb/testsuite/ChangeLog: * gdb.dwarf2/clztest.S (EH_FRAME_SH_FLAGS): New macro. (.eh_frame): Use the above. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.dwarf2/clztest.S | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.dwarf2/clztest.S b/gdb/testsuite/gdb.dwarf2/clztest.S index a904fee..08a8bac 100644 --- a/gdb/testsuite/gdb.dwarf2/clztest.S +++ b/gdb/testsuite/gdb.dwarf2/clztest.S @@ -22,6 +22,12 @@ */ +#if defined(__clang__) +# define EH_FRAME_SH_FLAGS "a" +#else +# define EH_FRAME_SH_FLAGS "aw" +#endif + .file "clztest.c" .text .Ltext0: @@ -178,7 +184,7 @@ _start: .LEFDE4: #NO_APP #APP - .section .eh_frame,"aw",@progbits + .section .eh_frame,EH_FRAME_SH_FLAGS,@progbits .Lframe1: .long .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: -- 1.8.3.1