[PATCH] D67508: [RISCV] support mutilib in baremetal environment

Kuan Hsu Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 23 22:11:14 PDT 2019


khchen marked 2 inline comments as done.
khchen added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1547
+  else if (IsRV64)
+    MArch = "rv64i";
+  else
----------------
lenary wrote:
> I think this line is the issue: where someone doesn't specify `-march`, you choose a default `-march` that does not appear in the list of multilib arches in `RISCVMultilibSet` above.
> 
> I think this issue probably didn't arise when you had `rv64i/lp64` in the list, but given that's not in the riscv-gcc `t-elf-multilib`, so this code should choose a new default. I don't know how this new default will affect defaults chosen in other parts of the clang codebase.
oh it's why I added rv64i/lp64 in previous version, but it's wrong default.
in riscv gcc if configure only with --enable-multilib, the default march/abi is rv64imafdc/lp64d
The option 1 is aligning to gcc, but the default abi is lp64 in clang,
maybe chosing rv64imac as default is less side effect? what do you think?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67508/new/

https://reviews.llvm.org/D67508





More information about the cfe-commits mailing list