|
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 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |