From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id BA4563858D1E for ; Wed, 19 Apr 2023 01:29:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA4563858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1a6762fd23cso22517195ad.3 for ; Tue, 18 Apr 2023 18:29:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1681867790; x=1684459790; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date:message-id :reply-to; bh=NPd7jJ6puw6vk0nDFxYREiFECjs2JdgdfVTjBVHqkvs=; b=Db3PfJheuCGu3lC98lqOC7rtlzzmZ1fZSIGoqN2pFAYhMoVPm5/pUsBXkXq5KUq223 fvHMcwWn4DrM8O2DERI9RSORG1mNGomJJXiu4HCYmkuhrgrx5j+FWRTg/IZjeWLVd09j 4SgHWPhCE8xOg6iUmRQYJ9SG1AVTtq7AmDwrPwXULGfnd/NG9duqL8QTMVGl9fw70aFD nb1+yzILBiFFeR5fkQVrz9T/2WhCnBNNuz/Y8bKcg3/d++UHwcu/zlrhI9zBRnKV4beP 0ZQBR1YHfWth4wpz9PGvokoCyFjrVXZKZI3EMGpb1fDv8O8A42TKmXYrJcfwNi/vXnhr mx+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681867790; x=1684459790; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=NPd7jJ6puw6vk0nDFxYREiFECjs2JdgdfVTjBVHqkvs=; b=PXgP4OkkBEEvd7WjtU1AdvQbxKhwIwxo6XSfLindto70ehKPq3TqaVyRFFMCnZdXmM R9PcqXpW0ZJnX/tM4rAQinI8M4mVH4IZo0OEIldg3g3Q2QmAyjwnTFlceugDfYcJCESd wIqnMNsXpHtfiNlV5V3pgTSYAbMDOB4ENLY2VcX0fqvlSJR0cJ1+9NOvDHRPOeburnmj CZkEnDSdR6/6NxoKPaxBMA2D1oPQ65g2h/DgEwtXKc0gzQGwzakB/uwp4d/JJOb370u9 aVp5FyHxjMX/uybybMyxYJg2IFdXJLgZYwQ9w8Qt+oAAKFw8Oepf+VzJ01HPH7rWVvdm MMrA== X-Gm-Message-State: AAQBX9ciDo4Tvx7q6VI+43luBAP1GJezkIVjtpn2g/v3ny8NZmupBNj9 QCfW6ZX5pfyp+qkQ2HugoHKuIGer2AZ14VMO9Qo= X-Google-Smtp-Source: AKy350bbqrQ0UAC/x0XnTiGU0ya3gIKdhFd8X8F3MNZP+53Hvpegt0s+MJK4WaSNxdkTKOmapjSY2g== X-Received: by 2002:a17:902:f689:b0:1a6:82a7:6e60 with SMTP id l9-20020a170902f68900b001a682a76e60mr4893936plg.47.1681867790265; Tue, 18 Apr 2023 18:29:50 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id t10-20020a170902bc4a00b001a525b082a5sm10141509plz.199.2023.04.18.18.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Apr 2023 18:29:49 -0700 (PDT) Date: Tue, 18 Apr 2023 18:29:49 -0700 (PDT) X-Google-Original-Date: Tue, 18 Apr 2023 18:29:39 PDT (-0700) Subject: Re: [PATCH] RISC-V: Update multilib-generator to handle V In-Reply-To: CC: gcc-patches@gcc.gnu.org From: Palmer Dabbelt To: Kito Cheng Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: On Tue, 18 Apr 2023 18:26:18 PDT (-0700), Kito Cheng wrote: > And which -march -mabi you used will got issue? > > On Wed, Apr 19, 2023 at 8:51 AM Palmer Dabbelt wrote: >> >> On Tue, 18 Apr 2023 17:47:31 PDT (-0700), Kito Cheng wrote: >> > Do you mind shared gcc configure and the option you tried? >> >> Just riscv-gnu-toolchain with "--enbale-multilib --enable-linux". >> >> > On Wed, Apr 19, 2023 at 4:01 AM Palmer Dabbelt wrote: >> >> >> >> On Tue, 18 Apr 2023 08:44:24 PDT (-0700), gcc-patches@gcc.gnu.org wrote: >> >> >> Yep, if I drop the non-canonicial strings via >> >> >> >> >> >> diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator >> >> >> index 58b7198b243..a63a4d69c18 100755 >> >> >> --- a/gcc/config/riscv/multilib-generator >> >> >> +++ b/gcc/config/riscv/multilib-generator >> >> >> @@ -174,7 +174,7 @@ for cmodel in cmodels: >> >> >> ext_combs = expand_combination(ext) >> >> >> alts = sum([[x] + [x + y for y in ext_combs] for x in [arch] + extra], []) >> >> >> alts = filter(lambda x: len(x) != 0, alts) >> >> >> - alts = alts + list(map(lambda a : arch_canonicalize(a, args.misa_spec), alts)) >> >> >> + alts = list(map(lambda a : arch_canonicalize(a, args.misa_spec), alts)) >> >> >> >> >> >> # Drop duplicated entry. >> >> >> alts = unique(alts) >> >> >> >> >> >> then I can't link `-march=rv32imafdcv`, I need >> >> >> `-march=rv32imacv_zicsr_zve32f_zve32x_zve64x_zvl128b_zvl32b_zvl64b`. That's >> >> >> kind of a headache for users to type in. >> >> > >> >> > Yes, that's a headache for users, but arch string canonicalization is >> >> > hiddened at the process, >> >> > so the user could still just use rv32imafdcv at compile time and >> >> > multi-lib config. >> >> > >> >> > And the driver and multilib-generator (with arch_canonicalize) script >> >> > will handle those headache in the background. >> >> >> >> Sorry, I'm not exactly sure what you're trying to say. I just rebuilt >> >> GCC with this patch (and t-linux-multilib regenerated from it), it's not >> >> resolving multlibs for the short names. `-march=rv32imafdcv` is the broken one, `-march=rv32imacv_zicsr_zve32f_zve32x_zve64x_zvl128b_zvl32b_zvl64b` resolves multilibs (there's a bit more above).