]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rust: Update usage of TARGET_AIX to TARGET_AIX_OS
authorPaul E. Murphy <murphyp@linux.ibm.com>
Thu, 22 Jun 2023 22:57:23 +0000 (17:57 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Thu, 22 Jun 2023 22:57:23 +0000 (17:57 -0500)
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  <murphyp@linux.ibm.com>

gcc/rust/
* rust-object-export.cc [TARGET_AIX]: Rename and update usage to
TARGET_AIX_OS.

gcc/rust/rust-object-export.cc

index 1143c767784114902772f4d7e8ee519a7f86fe06..f9a395f69648420289f478ef9ba95d8d4e9d3ac5 100644 (file)
@@ -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);