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

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

commit a60c6f7b36b1a8590b37e659cfb12422664a0bb6
Author: Saravanan Sekar <[email protected]>
AuthorDate: Mon Oct 26 18:58:26 2026 +0530

    CMakeLists.txt: pass the preprocessed LSL to the TASKING linker
    
    The linker scripts are preprocessed into a list of -T and file pairs
    before the link.  The TASKING branch put --lsl-file= in front of that
    whole list, so cctc got --lsl-file=-T and the script as an input file
    it does not know.  Build the list with --lsl-file= entries for TASKING
    instead and link with it as it is.
    
    Signed-off-by: Saravanan Sekar <[email protected]>
---
 CMakeLists.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c429834e9d8..73ab3c8dbfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -794,7 +794,11 @@ if(NOT CONFIG_ARCH_SIM)
     add_custom_target(ldscript_tmp_${LD_SCRIPT_NAME} DEPENDS ${LD_SCRIPT_TMP})
     add_dependencies(nuttx ldscript_tmp_${LD_SCRIPT_NAME})
 
-    list(APPEND ldscript_tmp_list -T ${LD_SCRIPT_TMP})
+    if(CONFIG_ARCH_TOOLCHAIN_TASKING)
+      list(APPEND ldscript_tmp_list --lsl-file=${LD_SCRIPT_TMP})
+    else()
+      list(APPEND ldscript_tmp_list -T ${LD_SCRIPT_TMP})
+    endif()
   endforeach()
   set(ldscript ${ldscript_tmp_list})
 endif()
@@ -829,7 +833,7 @@ set(nuttx_libs ${nuttx_kernel_libs} ${nuttx_system_libs} 
${nuttx_apps_libs}
 if(NOT CONFIG_ARCH_SIM)
   # TODO: nostart/nodefault not applicable to nuttx toolchain
   if(CONFIG_ARCH_TOOLCHAIN_TASKING)
-    target_link_libraries(nuttx PRIVATE --lsl-file=${ldscript} ${nuttx_libs})
+    target_link_libraries(nuttx PRIVATE ${ldscript} ${nuttx_libs})
     # Remove executable suffix
     set(CMAKE_EXECUTABLE_SUFFIX "")
   else()

Reply via email to