asb added a comment.

In https://reviews.llvm.org/D46822#1098764, @efriedma wrote:

> Could you include some documentation for how to construct a baremetal 
> environment like the one this code expects?  It's not clear what exactly you 
> expect to be installed where.


Thanks for taking a look Eli.

Building gcc+binutils+newlib will spit out a directory tree with the expected 
setup. e.g. a while ago I wrote a blog post 
<http://www.lowrisc.org/blog/2017/09/building-upstream-risc-v-gccbinutilsnewlib-the-quick-and-dirty-way/>
 trying to show how to build upstream RISC-V gcc+binutils+newlib in the 
simplest way possible. You need a multistage build for C++ support and other 
features, but those instructions are enough to get a baremetal cross compiler. 
The directory layout is the same as if you use the build script in the 
riscv-gnu-toolchain repo <https://github.com/riscv/riscv-gnu-toolchain>, doing 
`./configure --prefix=/my/target/path --with-arch=rv32i --with-abi=ilp32; make 
-j$(nproc)`. This is a more advanced multi-stage build.

Would you like to see more information on this added to the commit message, as 
comments in the code, or elsewhere?

e.g. this is the directory listing of the build output if you follow the linked 
blog instructions: https://pastebin.com/8HeCMpxF


Repository:
  rC Clang

https://reviews.llvm.org/D46822



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to