xref: /aosp_15_r20/external/XNNPACK/cmake/riscv64.toolchain (revision 4bdc94577ba0e567308109d787f7fec7b531ce36)
1*4bdc9457SAndroid Build Coastguard Worker# Copyright 2022 Google LLC
2*4bdc9457SAndroid Build Coastguard Worker#
3*4bdc9457SAndroid Build Coastguard Worker# This source code is licensed under the BSD-style license found in the
4*4bdc9457SAndroid Build Coastguard Worker# LICENSE file in the root directory of this source tree.
5*4bdc9457SAndroid Build Coastguard Worker
6*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_SYSTEM_NAME Linux)
7*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_SYSTEM_PROCESSOR riscv64)
8*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_CROSSCOMPILING TRUE)
9*4bdc9457SAndroid Build Coastguard Worker
10*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_C_COMPILER "riscv64-linux-gnu-gcc")
11*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_ASM_COMPILER "riscv64-linux-gnu-gcc")
12*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_CXX_COMPILER "riscv64-linux-gnu-g++")
13*4bdc9457SAndroid Build Coastguard Worker
14*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_FIND_ROOT_PATH "/usr/riscv64-linux-gnu")
15*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_INCLUDE_PATH "/usr/include/riscv64-linux-gnu")
16*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_LIBRARY_PATH "/usr/lib/riscv64-linux-gnu")
17*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_PROGRAM_PATH "/usr/bin/riscv64-linux-gnu")
18*4bdc9457SAndroid Build Coastguard Worker
19*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
20*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
21*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
22*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
23*4bdc9457SAndroid Build Coastguard Worker
24*4bdc9457SAndroid Build Coastguard WorkerSET(CMAKE_CROSSCOMPILING_EMULATOR "qemu-riscv64;-L;/usr/riscv64-linux-gnu")
25