config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add "riscv" as an alias for "riscv32"


From: Liviu Ionescu
Subject: Re: [PATCH] Add "riscv" as an alias for "riscv32"
Date: Thu, 21 Jun 2018 23:47:14 +0300

On 6/21/2018 13:49:51 -0400, Earnie wrote:

> I would then suggest the patch removes riscv32 and riscv64
> specifics and use riscv* instead. 

Fully agree.

Actually this is what I suggested from the very beginning, and what I used in 
the GNU MCU Eclipse RISC-V Embedded GCC distribution, where the prefix is 
`riscv-none-embed-`.

This avoids confusing use cases like: 

        riscv32-unknown-elf-gcc -march=rv64i -mabi=lp64

With the new prefix, the invocations look like:

        riscv-none-embed-gcc -march=rv32i -mabi=ilp32
        riscv-none-embed-gcc -march=rv64i -mabi=lp64

which, to respond to John, look even more pleasing to the eye, are even more 
clear to the beginner, and for me it was quite easy to implement (a few lines 
changed in the configure files)


And, at least for the embedded toolchain, making the `-march` & `-mabi` 
mandatory is the way to go.

Anyway, in the RISC-V embedded world these pairs are mandatory, no sane user 
risks to not pass them, since no one knows the defaults, and no one knows if 
those defaults will be the same in a future release or with a different 
distribution.

Interestingly enough, this issue does not occur for Linux users, since they do 
not build for multiple architectures/ABIs, so using the provided 
riscv64-unknown-linux-gnu-gcc without any -march/-mabi is enough for them, the 
riscv64- toolchain will generate 64-bit applications and riscv32- will 
obviously generate 32-bit applications, no questions about this. Unfortunately 
Linux users do not understand that the embedded use cases are different.

Is brief: fully agree with `riscv*-` and mandatory `-march` & `-mabi`.


Regards,

Liviu
(maintainer of GNU MCU Eclipse)









reply via email to

[Prev in Thread] Current Thread [Next in Thread]