1# 2# Copyright (C) 2023 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); you may not 5# use this file except in compliance with the License. You may obtain a copy of 6# the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13# License for the specific language governing permissions and limitations under 14# the License. 15# 16 17if(UHDR_BUILD_CMAKE_TOOLCHAINS_RISCV64_LINUX_GNU_CMAKE_) 18 return() 19endif() 20 21set(UHDR_BUILD_CMAKE_TOOLCHAINS_RISCV64_LINUX_GNU_CMAKE_ 1) 22 23set(CMAKE_SYSTEM_NAME "Linux") 24set(CMAKE_SYSTEM_PROCESSOR "riscv64") 25 26if("${CROSS}" STREQUAL "") 27 set(CROSS riscv64-linux-gnu-) 28endif() 29 30if(NOT CMAKE_C_COMPILER) 31 set(CMAKE_C_COMPILER ${CROSS}gcc) 32endif() 33if(NOT CMAKE_CXX_COMPILER) 34 set(CMAKE_CXX_COMPILER ${CROSS}g++) 35endif() 36if(NOT AS_EXECUTABLE) 37 set(AS_EXECUTABLE ${CROSS}as) 38endif() 39 40set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 41set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 42set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 43set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 44