You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Siviuze (via GitHub)" <gi...@apache.org> on 2023/08/25 07:43:12 UTC

[GitHub] [nuttx] Siviuze opened a new pull request, #10398: Add a toolchaine file for CMake in exported archive.

Siviuze opened a new pull request, #10398:
URL: https://github.com/apache/nuttx/pull/10398

   ## Summary
   Add a CMake toolchain in the exported archive so that application can use it directly.
   
   ## Impact
   
   ## Testing
   
   


-- 
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


[GitHub] [nuttx] trns1997 commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "trns1997 (via GitHub)" <gi...@apache.org>.
trns1997 commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307147962


##########
tools/toolchainfile.cmake:
##########
@@ -0,0 +1,36 @@
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_SYSTEM_VERSION 1)
+
+include(${CMAKE_CURRENT_LIST_DIR}/target.cmake)

Review Comment:
   small suggestion set nuttx path before include like this:
   ```
   set(NUTTX_PATH ${CMAKE_CURRENT_LIST_DIR}/..)
   
   include(${NUTTX_PATH}/scripts/target.cmake)
   ```



-- 
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


[GitHub] [nuttx] Siviuze commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1308278712


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   File renamed :)



-- 
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


[GitHub] [nuttx] Siviuze commented on pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#issuecomment-1695563304

   > > @Siviuze could you fix the warning reported by ci: https://github.com/apache/nuttx/actions/runs/5973272863/job/16205220666?pr=10398
   > 
   > Fixed :)
   
   Fixed again : I messed up with my previous try.


-- 
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


[GitHub] [nuttx] Siviuze commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307486348


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   Standard suffix for CMake toolchain files is .cmake. I choose to add 'export' suffix in the tool folder to emphasis that the file is related to the export step and is not usable as-is (I didn't find a place for exported files). I can name it .cmake if you prefer?



-- 
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


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10398:
URL: https://github.com/apache/nuttx/pull/10398


-- 
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


[GitHub] [nuttx] Siviuze commented on pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#issuecomment-1695192724

   > @Siviuze could you fix the warning reported by ci: https://github.com/apache/nuttx/actions/runs/5973272863/job/16205220666?pr=10398
   
   Fixed :)


-- 
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


[GitHub] [nuttx] Siviuze commented on pull request #10398: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#issuecomment-1692917093

   Should I create then link an issue to this PR?


-- 
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


[GitHub] [nuttx] Siviuze commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307511894


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   I took the name from buildroot project: I can rename it if you prefer.
   
   P.S. My previous comment missed the point of your question so I deleted/updated it.



-- 
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


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#issuecomment-1692952013

   > Should I create then link an issue to this PR?
   
   Yes, it's better to have an issue.


-- 
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


[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307476071


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   should we name it toolchain.cmake.export?



-- 
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


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#issuecomment-1695047660

   @Siviuze could you fix the warning reported by ci:
   https://github.com/apache/nuttx/actions/runs/5973272863/job/16205220666?pr=10398


-- 
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


[GitHub] [nuttx] Siviuze commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "Siviuze (via GitHub)" <gi...@apache.org>.
Siviuze commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307486348


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   Standard suffix for CMake toolchain files is .cmake. I choose to add 'export' suffix in the tool folder to emphasis that the file is related to the export step and is not usable as-is (I didn't find a place for exported files). I can name it .cmake if you prefer?



-- 
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


[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #10398: RFC: Add a toolchaine file for CMake in exported archive.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #10398:
URL: https://github.com/apache/nuttx/pull/10398#discussion_r1307798171


##########
tools/mkexport.sh:
##########
@@ -265,8 +292,19 @@ if [ "X${USRONLY}" != "Xy" ]; then
   echo "LDENDGROUP       = ${LDENDGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDFLAGS          = ${LDFLAGS}" >>"${EXPORTDIR}/scripts/Make.defs"
   echo "LDSTARTGROUP     = ${LDSTARTGROUP}" >>"${EXPORTDIR}/scripts/Make.defs"
+
+  echo "set(EXTRA_LIBS       \"${EXTRA_LIBS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(EXTRA_OBJS       \"${EXTRA_OBJS}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(HEAD_OBJ         \"${HEAD_OBJ}\")"     >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDENDGROUP       \"${LDENDGROUP}\")"   >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDFLAGS          \"${LDFLAGS}\")"      >>"${EXPORTDIR}/scripts/target.cmake"
+  echo "set(LDSTARTGROUP     \"${LDSTARTGROUP}\")" >>"${EXPORTDIR}/scripts/target.cmake"
 fi
 
+# Copy the CMake toolchain file
+
+cp "${TOPDIR}/tools/toolchainfile.cmake.export" "${EXPORTDIR}/scripts/toolchainfile.cmake"

Review Comment:
   sorry, I mean toolchain.cmake.



-- 
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