From patchwork Sat Jan 21 09:57:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 46796 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp652618wrn; Sat, 21 Jan 2023 01:58:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXvj4uzZSCgxEU4EsmHas0c7CGuDk/03T1DDzcBvGWXMG9agzg9garlHi6wm73KfcuDblPoO X-Received: by 2002:a17:907:bd7:b0:86d:70e7:ab2c with SMTP id ez23-20020a1709070bd700b0086d70e7ab2cmr16253748ejc.15.1674295098246; Sat, 21 Jan 2023 01:58:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674295098; cv=none; d=google.com; s=arc-20160816; b=PaLSsdJE0G1dlC7BChpE2k9IbnsiJpm8ncesv79s334WKXPgaCU3r51w/HQj495xgv yBA8/ZpC+nJ2LixeHkTUZfOFxCY7hzYC+B2X+zAQnlmXgiOGN1LU3637lASy3aJhhrQz /nVxcSi0G5ZNpT9PSH5cTNtd7S1aUAVHvAXZR1VaVqA4acowhRbAWLmCYVgjItqEvhMv 1P5tWfhjRZ8JC+Rlu66tjwdAIPAtBLmlNXdwPPwUtJCdlNgz/YtUT8RkjuvYNcKYryCi RqXK0ePeRTSaEt67iQtCCAlUWewOnjQGbu1Edrg6jRnXdh/isgGgcTKmkg8EGZAyx+pr uOMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:from:cc:to :content-language:user-agent:mime-version:date:message-id :ironport-sdr:dmarc-filter:delivered-to; bh=8J6+NqULv+SVPfpVr/XVOZORSn/0/OLHk83s3QszW7o=; b=LwmjeA9t0hI7QERFAGlaqjGZ5Uhb/OVFWYi1vT8zbzy/wL9eQZIEy36kDfaslRFpX6 sz3Azde+ppw60PXKqb3QqwVzw5UxXKQ6xdT9qlBK9dtOcGg9Vz0sUFGocRmki9ima4ex eiX72MQc7/urY4nqPXMnDsIa9K21sZXCF8jeHodfLTZI2F6cMzM231egt5QdruaqC0HC ZRHJzunkRc0cXIaxd240+v7VPtlAY0BG9eXjim3NIgQvGgUdwx2XNESpP3KcELxWNzAQ 9TgdUUm20Zd55d7HnIWu7fsEMwM8oVKsv7XoP/5ZcBKLLMdqiaJAAXgfHUPB/OhheZIk 6AIQ== ARC-Authentication-Results: i=1; mx.google.com; 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" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id xa5-20020a170906fd8500b0084d7c8a4bdfsi36270064ejb.276.2023.01.21.01.58.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Jan 2023 01:58:18 -0800 (PST) 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; 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" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7EE63385C301 for ; Sat, 21 Jan 2023 09:58:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id E9AA13858D20 for ; Sat, 21 Jan 2023 09:57:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9AA13858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,235,1669104000"; d="diff'?scan'208";a="94274610" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 21 Jan 2023 01:57:35 -0800 IronPort-SDR: MCsNbzmp5LJGa/gCWBmOYyV3+tQF4SRAj3vyGnHiTTwkBn5QTmFeYme8O7AXaCUvBmBjhZKcHK bcS8eq8wJOP+gce10JPvgHJjPuUTNH8VN206kkQSnutJtywYk45rl/pw3NKMvVpLWA2jq2V4VB mlzKasS4VzQ5bGb5nhRd/GP2pHJHbpDaZ465AyECvZbv6qZMzWyUIqPSd4hYcwMB1z3cfAgL5r YHp+HZ+cZt8xzjdm7MRhe/upnl6qoxb/zEs0UdSKAvisp8yxC1q1yN3wzYvNAF9ZmZLXQ1FsPs OAY= Message-ID: <11d635d0-9798-5344-934b-969cb01974ba@codesourcery.com> Date: Sat, 21 Jan 2023 10:57:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: gcc-patches , Andrew Stubbs , Tom de Vries , Thomas Schwinge CC: =?utf-8?q?Martin_Li=C5=A1ka?= , Matthias Klose From: Tobias Burnus Subject: [Patch] install.texi: Bump newlib version for nvptx + gcn X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755625656667952675?= X-GMAIL-MSGID: =?utf-8?q?1755625656667952675?= A new newlib version has been realized yesterday: newlib-4.3.0 (yearly snapshot) https://sourceware.org/pipermail/newlib/2023/020141.html https://sourceware.org/ftp/newlib/index.html → 2023-01-20: newlib-4.3.0.20230120.tar.gz (8.8 MB) For both nvptx and GCN, the new version is recommended - mostly because of upcoming changes and not because GCC mainline already needs them currently. But soon it will, hence: The attached patch bumps the minimal version instead of keeping the old version and only recommending the newer one. Comments? Suggestions? – If there are none, I intent to commit the patch as obvious. Tobias PS: For AMDGCN, the newlib uses (if available) some new builtins: one provided by GCC 13 but having the currently same value as the hard coded registers that get used if the builtin s not available - to permit a change to non-private stack variables (required for reverse offload; will require recompilation of newlib). And to support vectorized math functions. (The gcn builtins still have to be added to GCC 13; if the builtins aren't available, newlib won't use them - hence, also will later require a rebuild with the newer newlib). For nvptx, newlib added some features to permit building a non-minimal version of libgfortran, which also permits I/O. The libgfortran changes have been approved but the GCC nvptx patches still have to be reviewed (and would also require a pending nvptx-tools pull request). BTW: The gcn vect math and the nvptx changes went into newlib in the last few days. Thus, if you have use the 'git' version it won't have the changes, unless you updated at least yesterday. ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 install.texi: Bump newlib version for nvptx + gcn Before, newlib 3.2 was required for amdgcn and 3.1 for nvptx. Now recommended is 4.3.0 which was just released on 2023-01-20. While currently the old versions would work fine, upcoming GCC changes depend on a newer newlib. Thus, the minimal version is bumped instead of just recommending the new version. For GCN, the bump is in preparation for permitting non-threadlocal stack variables and vectorized math functions - both scheduled for GCC 13 and added to newlib in 4.3.0. For nvptx, this includes an emulated clock (commit 6bb96d13a), a calloc fix (5fca4e0f1) and changes to permit libgfortran to be compiled with I/O support instead of only in minimal mode. (Patch approved for GCC 13 but pending on a nvtpx patch.) gcc/ChangeLog: * doc/install.texi (amdgcn, nvptx): Require newlib 4.3.0. diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index ccc8d15fd08..b1861a6a437 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -3855,7 +3855,7 @@ Instead of GNU Binutils, you will need to install LLVM 13.0.1, or later, and cop @file{bin/llvm-ar} to both @file{bin/amdgcn-amdhsa-ar} and @file{bin/amdgcn-amdhsa-ranlib}. -Use Newlib (3.2.0, or newer). +Use Newlib (4.3.0 or newer). To run the binaries, install the HSA Runtime from the @uref{https://rocm.github.io,,ROCm Platform}, and use @@ -4672,7 +4672,7 @@ Instead of GNU binutils, you will need to install Tell GCC where to find it: @option{--with-build-time-tools=[install-nvptx-tools]/nvptx-none/bin}. -You will need newlib 3.1.0 or later. It can be +You will need newlib 4.3.0 or later. It can be automatically built together with GCC@. For this, add a symbolic link to nvptx-newlib's @file{newlib} directory to the directory containing the GCC sources.