Skip to content
This repository was archived by the owner on Feb 9, 2025. It is now read-only.

Commit c09d0f7

Browse files
committed
cmake: Add riscv32 toolchain file
1 parent 344b449 commit c09d0f7

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

cmake/toolchains/riscv32.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# evmone: Ethereum Virtual Machine
2+
# Copyright 2023 Pawel Bylica.
3+
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
4+
5+
set(RISCV /usr/local/riscv)
6+
7+
set(CMAKE_SYSTEM_PROCESSOR riscv32)
8+
set(CMAKE_SYSTEM_NAME Linux)
9+
set(CMAKE_C_COMPILER ${RISCV}/bin/clang)
10+
set(CMAKE_CXX_COMPILER ${RISCV}/bin/clang++)
11+
12+
set(CMAKE_CXX_FLAGS_INIT -stdlib=libc++)
13+
14+
set(CMAKE_FIND_ROOT_PATH ${RISCV}/sysroot)
15+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
16+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
17+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
18+
19+
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-riscv32-static;-L;${CMAKE_FIND_ROOT_PATH})

0 commit comments

Comments
 (0)