From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1464) id ADD5D3858C2D; Thu, 22 Jun 2023 23:36:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADD5D3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687476989; bh=Ttu0FMWTNTFkkOXPZLKQWKGq/Sm78Ykwj3Xj5i0Bc00=; h=From:To:Subject:Date:From; b=Ob5mSG1CFIQcSLHGL5MczNDHEbIKI08EtHLjVDnBkchsaC6VFIuO42QfuYu05i1VA /d75TM6IepMCFIY0R6Ko+sJFdjFghC1liWyFKNghQJxWF4zueqZgswRb9P4Kiq2Ya7 b5uLXidiUmoFGbJRnnB9UUHGB/6oI0V/VVO6mJlg= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Peter Bergner To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-2036] rust: Update usage of TARGET_AIX to TARGET_AIX_OS X-Act-Checkin: gcc X-Git-Author: Paul E. Murphy X-Git-Refname: refs/heads/master X-Git-Oldrev: b76cd1ec361712e1ac9ca5e0246da24ea2b78916 X-Git-Newrev: 8a30775b0d3037123ee540f7b65a736ad49e05ce Message-Id: <20230622233629.ADD5D3858C2D@sourceware.org> Date: Thu, 22 Jun 2023 23:36:29 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8a30775b0d3037123ee540f7b65a736ad49e05ce commit r14-2036-g8a30775b0d3037123ee540f7b65a736ad49e05ce Author: Paul E. Murphy Date: Thu Jun 22 17:57:23 2023 -0500 rust: Update usage of TARGET_AIX to TARGET_AIX_OS 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. 2023-06-22 Paul E. Murphy gcc/rust/ * rust-object-export.cc [TARGET_AIX]: Rename and update usage to TARGET_AIX_OS. Diff: --- 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 = get_section (RUST_EXPORT_SECTION_NAME, - TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL); + TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG, NULL); } switch_to_section (sec);