public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Paul E. Murphy" <murphyp@linux.ibm.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 2/2] rust: update usage of TARGET_AIX to TARGET_AIX_OS
Date: Fri, 16 Jun 2023 11:00:02 -0500	[thread overview]
Message-ID: <20230616160002.1854983-2-murphyp@linux.ibm.com> (raw)
In-Reply-To: <20230616160002.1854983-1-murphyp@linux.ibm.com>

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.
---
 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);
-- 
2.31.1


  reply	other threads:[~2023-06-16 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-16 16:00 [PATCH 1/2] go: " Paul E. Murphy
2023-06-16 16:00 ` Paul E. Murphy [this message]
2023-06-19  8:39   ` [PATCH 2/2] rust: " Thomas Schwinge
2023-06-21 16:20     ` Paul E Murphy
2023-06-22 23:38       ` Peter Bergner
2023-06-16 17:01 ` [PATCH 1/2] go: " Ian Lance Taylor
2023-06-22 23:37   ` Peter Bergner
2023-06-22 23:46     ` Peter Bergner
2023-06-23  3:30       ` Ian Lance Taylor
2023-06-30 17:28         ` Peter Bergner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230616160002.1854983-2-murphyp@linux.ibm.com \
    --to=murphyp@linux.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).