ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 16:07:06 up 4 days 3:13, 2 users, load average: 1.07, 1.12, 1.07
34 lines
897 B
CMake
34 lines
897 B
CMake
include(nemu-settings)
|
|
include(riscv-settings)
|
|
|
|
add_library(am-${ISA}-nemu
|
|
cte.c
|
|
start.S
|
|
trap.S
|
|
vme.c
|
|
${NEMU_SOURCES}
|
|
)
|
|
|
|
target_compile_options(am-${ISA}-nemu PRIVATE
|
|
${NEMU_COMPILE_OPTIONS}
|
|
${RISCV_COMPILE_OPTIONS})
|
|
target_link_options(am-${ISA}-nemu PRIVATE
|
|
${NEMU_LINK_OPITIONS}
|
|
${RISCV_LINK_OPTIONS})
|
|
target_include_directories(am-${ISA}-nemu PRIVATE
|
|
${NEMU_INCLUDE_DIRECTORIES})
|
|
target_link_options(am-${ISA}-nemu INTERFACE
|
|
LINKER:--defsym=_pmem_start=0x80000000
|
|
LINKER:--defsym=_entry_offset=0x0
|
|
LINKER:--gc-sections
|
|
LINKER:-e _start
|
|
-nostartfiles)
|
|
|
|
target_compile_definitions(am-${ISA}-nemu PUBLIC
|
|
ARCH_H="arch/riscv.h")
|
|
target_compile_definitions(am-${ISA}-nemu PRIVATE
|
|
ISA_H="riscv/riscv.h")
|
|
|
|
set_target_properties(am-${ISA}-nemu PROPERTIES
|
|
POSITION_INDEPENDENT_CODE OFF
|
|
INTERFACE_POSITION_INDEPENDENT_CODE OFF)
|