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:
parent
2fd95611cb
commit
02acf2d2a4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue