|
|
@ -35,8 +35,8 @@ elseif (${ARCH} STREQUAL riscv32)
|
|
|
|
set(PREFIX riscv64-unknown-elf-)
|
|
|
|
set(PREFIX riscv64-unknown-elf-)
|
|
|
|
set(CMAKE_C_FLAGS "-march=rv32imac -mabi=ilp32 -mcmodel=medany")
|
|
|
|
set(CMAKE_C_FLAGS "-march=rv32imac -mabi=ilp32 -mcmodel=medany")
|
|
|
|
elseif (${ARCH} STREQUAL riscv64)
|
|
|
|
elseif (${ARCH} STREQUAL riscv64)
|
|
|
|
set(PREFIX riscv64-unknown-elf-)
|
|
|
|
set(PREFIX riscv64-linux-musl-)
|
|
|
|
set(CMAKE_C_FLAGS "-march=rv64imac -mabi=lp64 -mcmodel=medany")
|
|
|
|
set(CMAKE_C_FLAGS "-march=rv64imafdc -mabi=lp64d -mcmodel=medany")
|
|
|
|
elseif (${ARCH} STREQUAL aarch64)
|
|
|
|
elseif (${ARCH} STREQUAL aarch64)
|
|
|
|
set(PREFIX aarch64-linux-musl-)
|
|
|
|
set(PREFIX aarch64-linux-musl-)
|
|
|
|
else ()
|
|
|
|
else ()
|
|
|
@ -54,8 +54,10 @@ if (KERNEL_HEADERS_DIR)
|
|
|
|
include_directories(${KERNEL_HEADERS_DIR}/include/uapi)
|
|
|
|
include_directories(${KERNEL_HEADERS_DIR}/include/uapi)
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
# Execuatble
|
|
|
|
# Executable
|
|
|
|
foreach (PATH ${SRCS})
|
|
|
|
foreach (PATH ${SRCS})
|
|
|
|
|
|
|
|
if (NOT ${ARCH} STREQUAL riscv64 OR NOT "${PATH}" MATCHES "^c/(usertests).c$")
|
|
|
|
get_filename_component(NAME ${PATH} NAME_WE)
|
|
|
|
get_filename_component(NAME ${PATH} NAME_WE)
|
|
|
|
add_executable(${NAME} ${PATH})
|
|
|
|
add_executable(${NAME} ${PATH})
|
|
|
|
|
|
|
|
endif ()
|
|
|
|
endforeach ()
|
|
|
|
endforeach ()
|
|
|
|