This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 02acf2d2a47393b7d8921e414be1a6b453f4115d
Author: chao an <anc...@lixiang.com>
AuthorDate: Thu Jan 18 13:55:39 2024 +0800

    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 <anc...@lixiang.com>
---
 arch/risc-v/src/cmake/Toolchain.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/cmake/Toolchain.cmake 
b/arch/risc-v/src/cmake/Toolchain.cmake
index 0965c88e86..a8abb18460 100644
--- a/arch/risc-v/src/cmake/Toolchain.cmake
+++ b/arch/risc-v/src/cmake/Toolchain.cmake
@@ -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)

Reply via email to