aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-backend.c
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.ibm.com>2023-06-22 17:53:46 -0500
committerPeter Bergner <bergner@linux.ibm.com>2023-06-28 22:03:50 -0500
commit93c937b0f64fdf840ba954c7e0f4e233bb0137a6 (patch)
treef7833da05b55653881aedf372d1a6b3322f56ace /gcc/go/go-backend.c
parent5b803d14e04cce2aaae7c135a3d7ab46a0656370 (diff)
go: Update usage of TARGET_AIX to TARGET_AIX_OS
TARGET_AIX is defined to a non-zero value on linux and maybe other powerpc64le targets. This leads to unexpected behavior such as dropping the .go_export section when linking a shared library on linux/powerpc64le. Instead, use TARGET_AIX_OS to toggle AIX specific behavior. Fixes golang/go#60798. 2023-06-22 Paul E. Murphy <murphyp@linux.ibm.com> gcc/go/ * go-backend.c [TARGET_AIX]: Rename and update usage to TARGET_AIX_OS. * go-lang.c: Likewise. (cherry picked from commit b76cd1ec361712e1ac9ca5e0246da24ea2b78916)
Diffstat (limited to 'gcc/go/go-backend.c')
-rw-r--r--gcc/go/go-backend.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index 5d1aaf0e63a..d94468fd52d 100644
--- a/gcc/go/go-backend.c
+++ b/gcc/go/go-backend.c
@@ -45,8 +45,8 @@ along with GCC; see the file COPYING3. If not see
#define GO_EXPORT_SECTION_NAME ".go_export"
#endif
-#ifndef TARGET_AIX
-#define TARGET_AIX 0
+#ifndef TARGET_AIX_OS
+#define TARGET_AIX_OS 0
#endif
/* This file holds all the cases where the Go frontend needs
@@ -107,7 +107,7 @@ go_write_export_data (const char *bytes, unsigned int size)
{
gcc_assert (targetm_common.have_named_sections);
sec = get_section (GO_EXPORT_SECTION_NAME,
- TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
+ TARGET_AIX_OS ? SECTION_EXCLUDE : SECTION_DEBUG,
NULL);
}