From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 101AA3858D28; Mon, 19 Jun 2023 08:39:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 101AA3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,254,1681200000"; d="scan'208";a="9199390" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 19 Jun 2023 00:39:51 -0800 IronPort-SDR: X1mL0RlCC82L2QSMytz6k01/vOWBugEjl18/PBgvsQzKVaCLKTDUt3/PXOJ2P3n+S7OiBm8iE9 OL/1lOlsnAL+9mld8BEZF2mrjXrnWGJiUxlPxN5bOvZGrGrj07eoTCY8AmMC2HtQXQJS8YAfC8 Ql5QfTbXWN70OAjhudNoA0RnO1FUCCm1qXBFlubcw/pi/pGWLa9hgBFQSwzBL0GHoX07IkhxcG RRddd+nUip0uOrlRHeasrZWQxjmC05NYDb55VcHc2rMP3RHXwsej4Boq5nOYz5ap2qPyqGaRg6 Na4= From: Thomas Schwinge To: "Paul E. Murphy" CC: , Subject: Re: [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS In-Reply-To: <20230616160002.1854983-2-murphyp@linux.ibm.com> References: <20230616160002.1854983-1-murphyp@linux.ibm.com> <20230616160002.1854983-2-murphyp@linux.ibm.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 19 Jun 2023 10:39:42 +0200 Message-ID: <87a5wv3kxd.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-15.mgc.mentorg.com (139.181.222.15) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Paul! On 2023-06-16T11:00:02-0500, "Paul E. Murphy via Gcc-patches" wrote: > This was noticed when fixing the gccgo usage of the macro, the > rust usage is very similar. > > TARGET_AIX is defined as a non-zero value on linux/powerpc64le > which may cause unexpected behavior. TARGET_AIX_OS should be > used to toggle AIX specific behavior. > > gcc/rust/ChangeLog: > > * rust-object-export.cc [TARGET_AIX]: Rename and update > usage to TARGET_AIX_OS. I don't have rights to formally approve this GCC/Rust change, but I'll note that it follows "as obvious" (see , "Obvious fixes") to the corresponding GCC/Go change, which has been approved: , and which is where this GCC/Rust code has been copied from, so I suggest you push both patches at once. Gr=C3=BC=C3=9Fe Thomas > --- > gcc/rust/rust-object-export.cc | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/rust/rust-object-export.cc b/gcc/rust/rust-object-export= .cc > index 1143c767784..f9a395f6964 100644 > --- a/gcc/rust/rust-object-export.cc > +++ b/gcc/rust/rust-object-export.cc > @@ -46,8 +46,8 @@ > #define RUST_EXPORT_SECTION_NAME ".rust_export" > #endif > > -#ifndef TARGET_AIX > -#define TARGET_AIX 0 > +#ifndef TARGET_AIX_OS > +#define TARGET_AIX_OS 0 > #endif > > /* Return whether or not GCC has reported any errors. */ > @@ -91,7 +91,7 @@ rust_write_export_data (const char *bytes, unsigned int= size) > { > gcc_assert (targetm_common.have_named_sections); > sec =3D get_section (RUST_EXPORT_SECTION_NAME, > - TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL= ); > + TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG, N= ULL); > } > > switch_to_section (sec); > -- > 2.31.1 ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955