Skip to content

Commit 20e03f5

Browse files
anchaoxiaoxiang781216
authored andcommitted
toolchain/tasking: fix build break on tasking toolchain
1. Tasking only support preprocess link script on linker phase 2. Remove executable suffix (.elf) Signed-off-by: chao an <anchao@lixiang.com>
1 parent e3689cb commit 20e03f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ endif()
579579
get_property(ldscript GLOBAL PROPERTY LD_SCRIPT)
580580

581581
# Pre-compile linker script
582-
if(NOT CONFIG_ARCH_SIM)
582+
if(NOT CONFIG_ARCH_SIM AND NOT CONFIG_ARCH_TOOLCHAIN_TASKING)
583583
get_filename_component(LD_SCRIPT_NAME ${ldscript} NAME)
584584
set(LD_SCRIPT_TMP "${CMAKE_BINARY_DIR}/${LD_SCRIPT_NAME}.tmp")
585585

@@ -623,6 +623,8 @@ if(NOT CONFIG_ARCH_SIM)
623623
# TODO: nostart/nodefault not applicable to nuttx toolchain
624624
if(CONFIG_ARCH_TOOLCHAIN_TASKING)
625625
target_link_libraries(nuttx PRIVATE --lsl-file=${ldscript} ${nuttx_libs})
626+
# Remove executable suffix
627+
set(CMAKE_EXECUTABLE_SUFFIX "")
626628
else()
627629
target_link_libraries(
628630
nuttx

0 commit comments

Comments
 (0)