Compare commits
2 commits
147349868d
...
1b1a288ef6
Author | SHA1 | Date | |
---|---|---|---|
|
1b1a288ef6 | ||
|
62008cb67b |
2 changed files with 13 additions and 2 deletions
10
README.md
10
README.md
|
@ -32,8 +32,14 @@ git submodule update --init --recursive
|
|||
|
||||
mkdir ./build && cd ./build
|
||||
|
||||
# Setup to build newlib.
|
||||
./configure --prefix=/usr/local/
|
||||
# Create needed dir for the output.
|
||||
mkdir /usr/local/riscv && chmod -R 0775 /usr/local/riscv
|
||||
|
||||
# Setup to build newlib for 32bit embedded and compressed cpus.
|
||||
./configure --prefix=/usr/local/riscv --with-arch=rv32ec \
|
||||
--with-arch=rv32ec \
|
||||
--with-abi=ilp32e \
|
||||
--with-multilib
|
||||
make -j4 newlib
|
||||
|
||||
# Some Example options below.
|
||||
|
|
|
@ -41,6 +41,11 @@ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|||
|
||||
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
||||
message("OS:: LINUX")
|
||||
set(NEWLIB /opt/riscv/riscv32-unknown-elf/include)
|
||||
set(CMAKE_C_COMPILER riscv32-unknown-elf-gcc)
|
||||
set(CMAKE_CXX_COMPILER riscv32-unknown-elf-g++)
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT GNU)
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT GNU)
|
||||
else()
|
||||
message("OS:: UNKNOWN?")
|
||||
message("Please add your OS details to the toolchain file.")
|
||||
|
|
Loading…
Add table
Reference in a new issue