risc-v/cmake: set nostdlib to c compiler

To avoid build break:

ld: riscv-none-elf/lib/rv64imafdc_zicsr/lp64d/crt0.o: in function `.L0 ':
(.text+0x8): undefined reference to `__bss_start'
ld: (.text+0x10): undefined reference to `_end'
ld: (.text+0x36): undefined reference to `main'
collect2: error: ld returned 1 exit status

Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
chao an 2024-01-18 13:55:39 +08:00 committed by Alin Jerpelea
parent 2fd95611cb
commit 02acf2d2a4
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ if(CONFIG_DEBUG_OPT_UNUSED_SECTIONS)
add_compile_options(-ffunction-sections -fdata-sections)
endif()
add_link_options(-Wl,-nostdlib)
add_link_options(-nostdlib)
add_link_options(-Wl,--entry=__start)
if(CONFIG_DEBUG_LINK_MAP)