You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2024/04/22 08:30:18 UTC

Re: [PR] tools/export: fix app entry and linker script names [nuttx]

xiaoxiang781216 commented on code in PR #12201:
URL: https://github.com/apache/nuttx/pull/12201#discussion_r1574316505


##########
tools/toolchain.cmake.export:
##########
@@ -23,11 +23,16 @@ file(GLOB STARTUP_OBJS ${NUTTX_PATH}/startup/*)
 add_compile_options(-nostdlib)
 add_compile_options(-ffunction-sections -fdata-sections)
 
+set(ENTRY_NAME "__start")
+if("${NUTTX_MODE}" STREQUAL "k")
+  set(ENTRY_NAME "_start")

Review Comment:
   could we modify the code  to make the entry point consistent?



##########
tools/Export.mk:
##########
@@ -90,6 +90,15 @@ ifdef CONFIG_ARCH_BOARD
 	@echo "NUTTX_BOARD=\"$(CONFIG_ARCH_BOARD)\"" >> $(EXPORTDIR)/makeinfo.sh
 else
 	@echo "NUTTX_BOARD=\"$(CONFIG_ARCH_BOARD_CUSTOM_NAME)\"" >> $(EXPORTDIR)/makeinfo.sh
+endif
+ifdef CONFIG_BUILD_FLAT
+	@echo "NUTTX_MODE=\"f\"" >> $(EXPORTDIR)/makeinfo.sh

Review Comment:
   can we use the full name instead f/p/k?



##########
tools/mkexport.sh:
##########
@@ -255,11 +262,12 @@ echo "HOSTINCLUDES     = ${HOSTINCLUDES}" >>"${EXPORTDIR}/scripts/Make.defs"
 echo "HOSTCFLAGS       = ${HOSTCFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
 echo "HOSTLDFLAGS      = ${HOSTLDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
 echo "HOSTEXEEXT       = ${HOSTEXEEXT}" >>"${EXPORTDIR}/scripts/Make.defs"
-echo "LDNAME           = ${LDNAME}" >>"${EXPORTDIR}/scripts/Make.defs"
+echo "LDNAME           = ${APPLD}"      >>"${EXPORTDIR}/scripts/Make.defs"

Review Comment:
   should we expose both script?



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org