casaroli commented on code in PR #20530:
URL: https://github.com/apache/nuttx/pull/20530#discussion_r4472234146
##########
tools/mkexport.sh:
##########
@@ -539,6 +539,99 @@ cp -f "${TOPDIR}/tools/link.sh" "${EXPORTDIR}/tools/"
cp -f "${TOPDIR}/tools/unlink.bat" "${EXPORTDIR}/tools/"
cp -f "${TOPDIR}/tools/unlink.sh" "${EXPORTDIR}/tools/"
+# Install the compiler wrapper for programs built outside the tree, and the
+# flags it needs. Warning options are left out: they are this tree's policy
+# (-Werror), not part of the ABI. -Wa, -Wl and -Wp pass options on and stay.
+# Paths into this tree (some boards put crt0.o in LDELFFLAGS) are left out:
+# they do not exist where the package is used, and the wrapper adds the
+# exported crt0.o itself.
+
+noWarnings() {
+ for flag in $1; do
+ case ${flag} in
+ -Wa,* | -Wl,* | -Wp,*) printf '%s ' "${flag}" ;;
+ -W*) ;;
+ *) printf '%s ' "${flag}" ;;
+ esac
+ done
+}
+
+noTreePaths() {
+ for flag in $1; do
+ case ${flag} in
+ "${TOPDIR}"/*) ;;
+ *) printf '%s ' "${flag}" ;;
+ esac
+ done
+}
+
+isSet() {
+ grep -q "^$1=y" "${TOPDIR}/.config"
+}
+
+CCDEFINES="-D__NuttX__"
+if isSet CONFIG_NDEBUG; then
+ CCDEFINES="${CCDEFINES} -DNDEBUG"
+fi
+
+# The C++ headers, as ARCHXXINCLUDES in tools/Config.mk has them.
+
+CCXXINCDIRS=
+if isSet CONFIG_LIBCXX; then
+ CCXXINCDIRS="libcxx"
+elif isSet CONFIG_UCLIBCXX; then
+ CCXXINCDIRS="uClibc++"
+fi
+if isSet CONFIG_LIBMINIABI; then
Review Comment:
Done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]