xuxin930 opened a new pull request, #11421: URL: https://github.com/apache/nuttx/pull/11421
## Summary the current CMake link stage uses gcc/g++ as the linker, which may cause unexpected issues such as link options do not taking effect, so it is better to be switched to ld. the behavior of link will be consistent with Makefile ```shell aarch64-none-elf-g++ -Wl,--entry=__start -Wl,-nostdlib -Wl,--gc-sections -Wl,--cref -Wl,-Map=nuttx.map CMakeFiles/nuttx.dir/empty.cxx.obj -o nuttx -Wl,--script=/home/data/vela/vela-all/nuttx/build/dramboot.ld.tmp -Wl,--start-group arch/libarch.a binfmt/libbinfmt.a drivers/libdrivers.a fs/libfs.a libs/libc/libc.a mm/libmm.a sched/libsched.a boards/libboard.a libs/libxx/liblibcxxmini.a apps/libapps.a apps/builtin/libapps_builtin.a apps/system/nsh/libapps_nsh.a apps/system/nsh/libapps_sh.a -Wl,--end-group ``` ```shell aarch64-none-elf-ld --entry=__start -nostdlib --gc-sections --cref -Map=nuttx.map --nostartfiles CMakeFiles/nuttx.dir/empty.cxx.obj -o nuttx --script=/home/data/vela/vela-all/nuttx/build/dramboot.ld.tmp --start-group arch/libarch.a binfmt/libbinfmt.a drivers/libdrivers.a fs/libfs.a libs/libc/libc.a mm/libmm.a sched/libsched.a boards/libboard.a libs/libxx/liblibcxxmini.a apps/libapps.a apps/builtin/libapps_builtin.a apps/system/nsh/libapps_nsh.a apps/system/nsh/libapps_sh.a --end-group ``` ## Impact ## Testing CI build -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org