public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@rivosinc.com>
To: Kito Cheng <kito.cheng@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] RISC-V: Update multilib-generator to handle V
Date: Tue, 18 Apr 2023 18:29:49 -0700 (PDT)	[thread overview]
Message-ID: <mhng-d1efddfa-1084-4262-b76a-94c7cbc7d10a@palmer-ri-x1c9a> (raw)
In-Reply-To: <CA+yXCZDgrXMEJck3pSjRsrT=sVmdJ7RG+DWEdCh+A4p6-u+MKQ@mail.gmail.com>

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 <palmer@rivosinc.com> 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 <palmer@rivosinc.com> 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).

  reply	other threads:[~2023-04-19  1:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 20:52 Palmer Dabbelt
2023-04-14  1:53 ` Kito Cheng
2023-04-14  7:15 ` Kito Cheng
2023-04-17 15:24   ` Palmer Dabbelt
2023-04-17 17:57     ` Palmer Dabbelt
2023-04-18 15:44       ` Kito Cheng
2023-04-18 20:01         ` Palmer Dabbelt
2023-04-19  0:47           ` Kito Cheng
2023-04-19  0:51             ` Palmer Dabbelt
2023-04-19  1:26               ` Kito Cheng
2023-04-19  1:29                 ` Palmer Dabbelt [this message]
2023-04-19  1:38                   ` Kito Cheng
2023-04-19  3:57                     ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mhng-d1efddfa-1084-4262-b76a-94c7cbc7d10a@palmer-ri-x1c9a \
    --to=palmer@rivosinc.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).