Message ID | 20230321073849.21470-1-zhusonghe@eswincomputing.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1639353wrt; Tue, 21 Mar 2023 00:39:26 -0700 (PDT) X-Google-Smtp-Source: AK7set/fpauOk8Mervm4m2tdehtZTeRZNKZPqNbqCDlHYuIG2WTDpH/fByV9SGbFbn745NRS8G2s X-Received: by 2002:a17:906:7c9:b0:8b2:8876:6a3c with SMTP id m9-20020a17090607c900b008b288766a3cmr1894139ejc.29.1679384366290; Tue, 21 Mar 2023 00:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679384366; cv=none; d=google.com; s=arc-20160816; b=pKefGzoPS/KnZMswTfiBkbZdc6feOvGTB4TcglsUPQS6KV3f2Vh0klv2QqVq/QAxbr YyuXuDStpKuaiqtBubkQBeRiMf7Hn1z4ON5BGFKSMyh8wmnAqzBeGQNfMYpUL5Mkjntv oQB0I9iNrLRQsihYzpBJTvy1wf7ctYpAB53yDK5AJH/0qV5aNyP9dMxuunxBVfMw1UP6 UWA1s20sA/6gftTU81XGiOBhat0Ixre9Jk4kVpc2UHByVUXCshpXGh8wuSypNmEnX+z5 A1boR48Aq5hxHATQOaZTd6Gozyf8TA85ADLioPZS0Ohy3Z0Jio7Uj3IBniB1rMS0EKSe gglQ== 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:message-id:date:subject:cc:to :from:dmarc-filter:delivered-to; bh=/G77HLeCPzLulocJEwItADSpLanrT55UUjIWmqTDUYw=; b=PnSyBhzRCBTg0YtoXEVEl+UDRtCCkSVL/ExUNCU+gd4h6TfQi+gX5wgxZgjJFd3pY/ ZNxVxFK2nyqAqbDNdbdzTBJQ6iQCo6KbBEsmA3zc1cA+3qUYjtk3YiilCb02EHrKZYLv 8hCSSNMhMqgWh9LFc7rZ04+++vycbu179p5g3cMHQLMO0rI59daJMogaI5bnjRzWW4P7 WogqiLkN4OvKjcG8PAN9MUw76YGsH6SsZfL5iOVFOm6Mcq7Wlbuen7hDk7GntNgxOgfF ZGBcLmbIEJc4lA+hJ32gA3J7Lf0Pt776SzVHjlLoaq7NkDdAq8Q8dcEMZ0y81Fl8IbPj 0qOg== 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id qw41-20020a1709066a2900b009351546e521si4714159ejc.706.2023.03.21.00.39.26 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 00:39:26 -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; 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 D726D3858433 for <ouuuleilei@gmail.com>; Tue, 21 Mar 2023 07:39:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from zg8tmja2lje4os4yms4ymjma.icoremail.net (zg8tmja2lje4os4yms4ymjma.icoremail.net [206.189.21.223]) by sourceware.org (Postfix) with ESMTP id 55AF53858D37 for <gcc-patches@gcc.gnu.org>; Tue, 21 Mar 2023 07:38:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55AF53858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=eswincomputing.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=eswincomputing.com Received: from host039-ubuntu-1804.lxd (unknown [10.12.130.38]) by app1 (Coremail) with SMTP id EwgMCgDnUZUKXxlk_64HAA--.24896S4; Tue, 21 Mar 2023 15:38:50 +0800 (CST) From: Songhe Zhu <zhusonghe@eswincomputing.com> To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, palmer@dabbelt.com, Songhe Zhu <zhusonghe@eswincomputing.com> Subject: [PATCH] RISC-V: Fix loss of function to script 'multilib-generator' Date: Tue, 21 Mar 2023 15:38:49 +0800 Message-Id: <20230321073849.21470-1-zhusonghe@eswincomputing.com> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: EwgMCgDnUZUKXxlk_64HAA--.24896S4 X-Coremail-Antispam: 1UD129KBjvdXoWrKFWxuw4rZF1DGw4kJr48tFb_yoWkArg_uw 1xJrnrurWfGr4kCF1DKFZY9F1rKas5Wr13GFyDtr17tr17G3ZrX3s0kF9rA3yrCFy3KayU Aan3XryIyrnrKjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbIAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr1j 6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY1x0262kKe7AKxVWU AVWUtwCY02Avz4vE-syl42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2 IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v2 6r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2 IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv 67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyT uYvjfUehL0UUUUU X-CM-SenderInfo: 52kx20pqjkvqphvzx0xfrp13pwlqwhhfrp/ X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, 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 <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> 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?1760962141523717537?= X-GMAIL-MSGID: =?utf-8?q?1760962141523717537?= |
Series |
RISC-V: Fix loss of function to script 'multilib-generator'
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Songhe Zhu
March 21, 2023, 7:38 a.m. UTC
The arch 'rv32imac' will not be created when excuting
'./multilib-generator rv32imc-ilp32--a'
The output is:
MULTILIB_OPTIONS = march=rv32imc mabi=ilp32
MULTILIB_DIRNAMES = rv32imc ilp32
MULTILIB_REQUIRED = march=rv32imc/mabi=ilp32
MULTILIB_REUSE =
Analysis : The alts:['rv32imc', 'rv32imac'] will change
to ['rv32imac', 'rv32imc'] through function:unique(alts) processing,
This is the wrong alts should not be changed.
This patch fix it.
gcc/ChangLog:
* config/riscv/multilib-generator: Adjusting the loop of 'alt' in 'alts'.
Signed-off-by: Songhe Zhu <zhusonghe@eswincomputing.com>
---
gcc/config/riscv/multilib-generator | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Nice catch, committed to the trunk! On Tue, Mar 21, 2023 at 3:39 PM Songhe Zhu <zhusonghe@eswincomputing.com> wrote: > > The arch 'rv32imac' will not be created when excuting > './multilib-generator rv32imc-ilp32--a' > > The output is: > MULTILIB_OPTIONS = march=rv32imc mabi=ilp32 > MULTILIB_DIRNAMES = rv32imc ilp32 > MULTILIB_REQUIRED = march=rv32imc/mabi=ilp32 > MULTILIB_REUSE = > > Analysis : The alts:['rv32imc', 'rv32imac'] will change > to ['rv32imac', 'rv32imc'] through function:unique(alts) processing, > This is the wrong alts should not be changed. > This patch fix it. > > gcc/ChangLog: > * config/riscv/multilib-generator: Adjusting the loop of 'alt' in 'alts'. > > Signed-off-by: Songhe Zhu <zhusonghe@eswincomputing.com> > --- > gcc/config/riscv/multilib-generator | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator > index 9a6ce0223c9..0a3d4c07757 100755 > --- a/gcc/config/riscv/multilib-generator > +++ b/gcc/config/riscv/multilib-generator > @@ -175,7 +175,7 @@ for cmodel in cmodels: > # Drop duplicated entry. > alts = unique(alts) > > - for alt in alts[1:]: > + for alt in alts: > if alt == arch: > continue > arches[alt] = 1 > -- > 2.17.1 >
diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator index 9a6ce0223c9..0a3d4c07757 100755 --- a/gcc/config/riscv/multilib-generator +++ b/gcc/config/riscv/multilib-generator @@ -175,7 +175,7 @@ for cmodel in cmodels: # Drop duplicated entry. alts = unique(alts) - for alt in alts[1:]: + for alt in alts: if alt == arch: continue arches[alt] = 1