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: John Ericson
Subject: Re: [PATCH] Add "riscv" as an alias for "riscv32"
Date: Thu, 21 Jun 2018 14:46:21 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Ah OK. So this boils down to the difference between configs for targets and configs for toolchains. Configs for targets should be precise as possible [1], and `riscv-*` makes no sense. Configs for tools are actually the *set* of configs the tool targets and so `riscv-` does indeed make make perfect sense [2]. So we can add a flag to gnu config (with sensible default) to only allow stuff like this for the latter tool case. We could also choose to add another shell script answering "does (tool) config a cover config b", codifying that relation. I would volunteer to do both of these things if a RISC-V person can give me a table with the intend relation.

I agree with the gist of what Earnie says. To preserve symmetry and not surprise the user with weird defaults, I'd say a `riscv-*` tool-chain shouldn't default to 32-bit, 64-bit, or anything else. So the `-m64` or whatever is required. Or perhaps to make native compilation a bit easier a RISC-V tool chain should *only* default to a specific variant of RISC-V if that platform is the host platform, so cross compilation must be explicit, but native compilation with explicit-config tools can be implicit.

John

[1] Configs for targets are more known with LLVM than GNU tools, and their `-target` flag. But certain GNU binutils (e.g. objdump) do support `--target` so it's not just an LLVMism. [2] Yet another example of autotools and friends forcing a single target platform muddying the waters.

On 06/21/18 13:49, Earnie wrote:
On 6/20/2018 7:55 PM, Palmer Dabbelt wrote:
The one saving grace here is that most of the RISC-V toolchains support
generating code for all targets -- in other words "riscv32-*-gcc
-march=rv64gc" is a valid thing to do, and will generate 64-bit code
(and links against a 64-bit libc).  As a result, none of this actually
matters.

Given this I can understand the frustration of needing the 32/64
specifier.  I would then suggest the patch removes riscv32 and riscv64
specifics and use riscv* instead.  I.E. use riscv*-* as the filter.





reply via email to

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