It seems useful, I've backported to GCC 9/10/11.

Without this patch:
$ riscv64-unknown-elf-gcc -march=rv32imafd ~/hello.c -march=rv64gc
/scratch1/kitoc/riscv-gnu-workspace/rv64gc/install/bin/../lib/gcc/riscv64-unknown-elf/11.1.0/../../../../riscv64-unknown-elf/bin/ld:
unrecognised
emulation mode: elf3264lriscv
Supported emulations: elf64lriscv elf32lriscv elf64briscv elf32briscv
collect2: error: ld returned 1 exit status

With this patch:
$ riscv64-unknown-elf-gcc -march=rv32imafd ~/hello.c -march=rv64gc
// No error!

On Fri, Apr 30, 2021 at 11:42 AM Jim Wilson <j...@sifive.com> wrote:
>
> On Wed, Apr 28, 2021 at 1:30 AM Geng Qi via Gcc-patches <
> gcc-patches@gcc.gnu.org> wrote:
>
> > gcc/ChangeLog:
> >         * config/riscv/riscv.opt (march=,mabi=): Negative itself.
> >
>
> Thanks.  I committed this.
>
> Do we need to backport to release branches?  This looks like an uncommon
> problem, or we would have noticed this before.
>
> Jim

Reply via email to