Message ID | 20230616160002.1854983-1-murphyp@linux.ibm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1445443vqr; Fri, 16 Jun 2023 09:01:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Oiui32i4bS7a0e0k8QEG6b3tm5PkaJxwe0nGK42qO3BZziU4rEVMo5nrKArcDcqIQTnia X-Received: by 2002:a05:6402:395:b0:51a:2705:702f with SMTP id o21-20020a056402039500b0051a2705702fmr1521930edv.15.1686931262167; Fri, 16 Jun 2023 09:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686931262; cv=none; d=google.com; s=arc-20160816; b=zOliBwuamc5V/UEjyUETFHKl8gV3voFXtS1D1VyXB6rjF8FMcaRZaIp7PTEG7z9xnI P/IsQQj/69GHExHdFObiPGA25r1V34+N8iM6nzyI+ANblYYrvl1lKsqaF71lYeRJ9aI3 o1MpmqKkNWn5PQaXcnuFruxFK156Gv2lJz8Lit4eiHyKQgRv6UwN+YwMJ0L20blue84Y 9q0cDizn3nzEe3H6rSGGHDce1FPN6ZHcZb58rNk8QbtIrLT72RQPMPe0AqPppK+DnQP/ cJDTRyAy5wgSrvXN4b3ASoVO4iwVkefXNrRuBamI79fO02TJhrPy2Uq54uJlv/EmM7U6 8paw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Sztds7GG15VLqfLFg2NprsLVXGi9t+56toGc1xjHE2g=; b=wv/k2AUhpCCN3xhtxrL9rzks7Ea428YetZh8yVyVD9Rx3TBQvF7SPYiYj7dX6OMzT4 wDA0QwTMAApyziLS1fAcmskkHcYCFeyFzrCxGCol3P63n8SohK5PF+GC5F8IQG8y7wiZ FsT7sQJROdNgzMbR9uJSYk/DgoIr8jHmCLFpvhG8mby8efo5ueuwfA6/i/vTMBU9gGpW 0zkdxA5H+xpGHx5v5jP9USRKjBjPgyRnVgm+ZGQWQjtMOBPuCsD/V3K0uf95a+yd+vEK Kj9VadKcq7ciPtAvVgj9M0DD6z2dfI6iZ/697HStKAswuMmRRppSHXveJqH+v97yQzhh RqEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KQeyIpYX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id z3-20020aa7d403000000b005187910e766si5088932edq.191.2023.06.16.09.01.01 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 09:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KQeyIpYX; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F245385735A for <ouuuleilei@gmail.com>; Fri, 16 Jun 2023 16:00:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F245385735A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686931249; bh=Sztds7GG15VLqfLFg2NprsLVXGi9t+56toGc1xjHE2g=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KQeyIpYXvpRCiKpQMQz+URTW0FKLkL+nZDyyL78kRj++6/HC6k/ZiEgQ3MNWc/JDU OJJw2VmzMKspx7rB7aCAPXy8U5Y0AJusLC1wHG6HjUwdC/dViA9+WDZZhrGP1nHYO4 KcKRiRsh2vDp4/9e6lIFkijbynj3dvNO3cWyxJ1I= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 868A23858D35 for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 868A23858D35 Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35GFkl9L007384 for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:05 GMT Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3r8tp7r925-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:05 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 35GF0unE002819 for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:04 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([9.208.129.114]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3r4gt60gky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:03 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 35GG02D636503846 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:02 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 56D745806E for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:02 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4DD1E58061 for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:02 +0000 (GMT) Received: from trout.aus.stglabs.ibm.com (unknown [9.40.194.100]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP for <gcc-patches@gcc.gnu.org>; Fri, 16 Jun 2023 16:00:02 +0000 (GMT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS Date: Fri, 16 Jun 2023 11:00:01 -0500 Message-Id: <20230616160002.1854983-1-murphyp@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: PXjnbsV4FWEFE0qn9IODeUxww067dLZz X-Proofpoint-ORIG-GUID: PXjnbsV4FWEFE0qn9IODeUxww067dLZz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-16_10,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0 bulkscore=0 adultscore=0 priorityscore=1501 clxscore=1011 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306160139 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: "Paul E. Murphy via Gcc-patches" <gcc-patches@gcc.gnu.org> Reply-To: "Paul E. Murphy" <murphyp@linux.ibm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768875635400747814?= X-GMAIL-MSGID: =?utf-8?q?1768875635400747814?= |
Series |
[1/2] go: update usage of TARGET_AIX to TARGET_AIX_OS
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Paul E Murphy
June 16, 2023, 4 p.m. UTC
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. gcc/go/ChangeLog: * go-backend.cc [TARGET_AIX]: Rename and update usage to TARGET_AIX_OS. * go-lang.cc: Likewise. --- gcc/go/go-backend.cc | 6 +++--- gcc/go/go-lang.cc | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
Comments
On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > 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. > > gcc/go/ChangeLog: > > * go-backend.cc [TARGET_AIX]: Rename and update usage to > TARGET_AIX_OS. > * go-lang.cc: Likewise. This is OK. Thanks. Ian
On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote: > On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: >> >> 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. >> >> gcc/go/ChangeLog: >> >> * go-backend.cc [TARGET_AIX]: Rename and update usage to >> TARGET_AIX_OS. >> * go-lang.cc: Likewise. > > This is OK. > > Thanks. > > Ian I pushed this to trunk for Paul. Peter
On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote: > On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote: >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches >> <gcc-patches@gcc.gnu.org> wrote: >>> >>> 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. >>> >>> gcc/go/ChangeLog: >>> >>> * go-backend.cc [TARGET_AIX]: Rename and update usage to >>> TARGET_AIX_OS. >>> * go-lang.cc: Likewise. >> >> This is OK. >> >> Thanks. >> >> Ian > > I pushed this to trunk for Paul. I see this is broken on the release branches too. Are backports ok after some burn-in on trunk? Peter
On Thu, Jun 22, 2023, 4:47 PM Peter Bergner <bergner@linux.ibm.com> wrote: > On 6/22/23 6:37 PM, Peter Bergner via Gcc-patches wrote: > > On 6/16/23 12:01 PM, Ian Lance Taylor via Gcc-patches wrote: > >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches > >> <gcc-patches@gcc.gnu.org> wrote: > >>> > >>> 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. > >>> > >>> gcc/go/ChangeLog: > >>> > >>> * go-backend.cc [TARGET_AIX]: Rename and update usage to > >>> TARGET_AIX_OS. > >>> * go-lang.cc: Likewise. > >> > >> This is OK. > >> > >> Thanks. > >> > >> Ian > > > > I pushed this to trunk for Paul. > > I see this is broken on the release branches too. Are backports ok > after some burn-in on trunk? > Yes. Thanks. Ian >
On 6/22/23 10:30 PM, Ian Lance Taylor wrote: > On Thu, Jun 22, 2023, 4: 47 PM Peter Bergner <bergner@ linux. ibm. com> wrote: On 6/22/23 6: 37 PM, Peter Bergner via Gcc-patches wrote: > On 6/16/23 > >> On Fri, Jun 16, 2023 at 9:00 AM Paul E. Murphy via Gcc-patches > >> <gcc-patches@gcc.gnu.org <mailto:gcc-patches@gcc.gnu.org>> wrote: > >>> > >>> 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. > >>> > >>> gcc/go/ChangeLog: > >>> > >>> * go-backend.cc [TARGET_AIX]: Rename and update usage to > >>> TARGET_AIX_OS. > >>> * go-lang.cc: Likewise. > >> > >> This is OK. > >> > >> Thanks. > >> > >> Ian > > > > I pushed this to trunk for Paul. > > I see this is broken on the release branches too. Are backports ok > after some burn-in on trunk? > > Yes. Thanks. Ok, I backported the Go fix to GCC 13, 12, 11 and 10 (before the 10.5 freeze). I also backported to the rust change to GCC 13, which was the first release with rust. Thanks. Peter
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);