public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-11480] go: Update usage of TARGET_AIX to TARGET_AIX_OS
@ 2023-06-29  3:04 Peter Bergner
  0 siblings, 0 replies; only message in thread
From: Peter Bergner @ 2023-06-29  3:04 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:93c937b0f64fdf840ba954c7e0f4e233bb0137a6

commit r10-11480-g93c937b0f64fdf840ba954c7e0f4e233bb0137a6
Author: Paul E. Murphy <murphyp@linux.ibm.com>
Date:   Thu Jun 22 17:53:46 2023 -0500

    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)

Diff:
---
 gcc/go/go-backend.c | 6 +++---
 gcc/go/go-lang.c    | 6 +++---
 2 files changed, 6 insertions(+), 6 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);
     }
 
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 387694e4f56..92c65df4624 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -39,8 +39,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "go-c.h"
 #include "go-gcc.h"
 
-#ifndef TARGET_AIX
-#define TARGET_AIX 0
+#ifndef TARGET_AIX_OS
+#define TARGET_AIX_OS 0
 #endif
 
 /* Language-dependent contents of a type.  */
@@ -117,7 +117,7 @@ go_langhook_init (void)
   args.compiling_runtime = go_compiling_runtime;
   args.debug_escape_level = go_debug_escape_level;
   args.debug_escape_hash = go_debug_escape_hash;
-  args.nil_check_size_threshold = TARGET_AIX ? -1 : 4096;
+  args.nil_check_size_threshold = TARGET_AIX_OS ? -1 : 4096;
   args.debug_optimization = go_debug_optimization;
   args.linemap = go_get_linemap();
   args.backend = go_get_backend();

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-29  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29  3:04 [gcc r10-11480] go: Update usage of TARGET_AIX to TARGET_AIX_OS Peter Bergner

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