From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1464) id 912213858D37; Thu, 22 Jun 2023 23:36:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 912213858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687476984; bh=+dJ6RfBzcjL6Vs7W8ehRnmDFEct97Hf9i9hzYOD3tVk=; h=From:To:Subject:Date:From; b=fefZWr86XGcHliNjkcrjqVlVE7MTxa4Bk7oit19fY1RiYZ22U3dNlJcPAIKL3fHdS IMsFWNSrPVKwvAAEoDl23aZ9kjgSSJx+RGLxFaZTsnFTg3D4kKqoXwBUDnvQ5nbkrh lJhhYsty2ZfCcSoHBPh9QJMiD1U4/F/wnAPu6gn4= 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-2035] go: 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: 33ebb0dff9bb022f1e0709e0e73faabfc3df7931 X-Git-Newrev: b76cd1ec361712e1ac9ca5e0246da24ea2b78916 Message-Id: <20230622233624.912213858D37@sourceware.org> Date: Thu, 22 Jun 2023 23:36:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:b76cd1ec361712e1ac9ca5e0246da24ea2b78916 commit r14-2035-gb76cd1ec361712e1ac9ca5e0246da24ea2b78916 Author: Paul E. Murphy 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 gcc/go/ * go-backend.cc [TARGET_AIX]: Rename and update usage to TARGET_AIX_OS. * go-lang.cc: Likewise. Diff: --- gcc/go/go-backend.cc | 6 +++--- gcc/go/go-lang.cc | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/go/go-backend.cc b/gcc/go/go-backend.cc index c6a1a2b7c18..6e2c919e829 100644 --- a/gcc/go/go-backend.cc +++ b/gcc/go/go-backend.cc @@ -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.cc b/gcc/go/go-lang.cc index b6e8c37bf22..c6c147b20a5 100644 --- a/gcc/go/go-lang.cc +++ b/gcc/go/go-lang.cc @@ -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. */ @@ -116,9 +116,9 @@ 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.need_eqtype = TARGET_AIX ? true : false; + args.need_eqtype = TARGET_AIX_OS ? true : false; args.linemap = go_get_linemap(); args.backend = go_get_backend(); go_create_gogo (&args);