From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id E169D385840A for ; Fri, 29 Jul 2022 03:18:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E169D385840A Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 1C96666944; Thu, 28 Jul 2022 23:18:21 -0400 (EDT) Message-ID: Subject: Re: [PATCH v1] LoongArch: Define the macro ASM_PREFERRED_EH_DATA_FORMAT by checking the assembler's support for eh_frame encoding. From: Xi Ruoyao To: Lulu Cheng , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Fri, 29 Jul 2022 11:18:19 +0800 In-Reply-To: <20220729024337.4182683-1-chenglulu@loongson.cn> References: <20220729024337.4182683-1-chenglulu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 03:18:29 -0000 On Fri, 2022-07-29 at 10:43 +0800, Lulu Cheng wrote: > .eh_frame DW_EH_PE_pcrel encoding format is not supported by gas <=3D 2.3= 9. > Check if the assembler support DW_EH_PE_PCREL encoding and define .eh_fra= me > encoding type. >=20 > gcc/ChangeLog: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* config.in: Regenerate. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* config/loongarch/loonga= rch.h (ASM_PREFERRED_EH_DATA_FORMAT): > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Select the value of the m= acro definition according to whether > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0HAVE_AS_EH_FRAME_PCREL_EN= CODING_SUPPORT is defined. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* configure: Regenerate. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* configure.ac: Reinstate= HAVE_AS_EH_FRAME_PCREL_ENCODING_SUPPORT test. To me it looks a little strange to list regenerated config.in & configure before configure.ac. But maybe I'm wrong here if a lexicographical order is preferred... /* snip */ > +=C2=A0=C2=A0=C2=A0 gcc_GAS_CHECK_FEATURE([eh_frame pcrel encoding suppor= t], > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gcc_cv_as_loongarch_eh_frame_pcrel_encodi= ng_support,, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [.LFB1780 =3D . > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .cfi_startproc > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .cfi_personality 0x9b,DW.ref.__gxx_= personality_v0 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .cfi_lsda 0x1b,.LLSDA1780 > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 .cfi_endproc],, I think the conftest content can be simplified to: .cfi_startproc .cfi_personality 0x9b,a .cfi_lsda 0x1b,b .cfi_endproc > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [AC_DEFINE(HAVE_AS_EH_FRAME_PCREL_ENCODIN= G_SUPPORT, 1, > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [Define if your assembl= er supports eh_frame pcrel encoding.])]) > =C2=A0=C2=A0=C2=A0=C2=A0 ;; > =C2=A0=C2=A0=C2=A0=C2=A0 s390*-*-*) > =C2=A0=C2=A0=C2=A0=C2=A0 gcc_GAS_CHECK_FEATURE([.gnu_attribute support], --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University