You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/31 07:34:04 UTC

[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #992: Application.mk: Link the compiler runtime for ELF modules

yamt commented on a change in pull request #992:
URL: https://github.com/apache/incubator-nuttx-apps/pull/992#discussion_r795401698



##########
File path: Application.mk
##########
@@ -69,6 +69,18 @@ ifneq ($(CONFIG_BUILD_KERNEL),y)
   endif
 endif
 
+# When building a module, link with the compiler runtime.
+# This should be linked after libapps. Consider that mbedtls in libapps
+# uses __udivdi3.
+ifeq ($(BUILD_MODULE),y)
+  # Revisit: This only works for gcc and clang.
+  # Do other compilers have similar?
+  COMPILER_RT_LIB = $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)
+  ifneq ($(COMPILER_RT_LIB),)
+    LDLIBS += $(COMPILER_RT_LIB)

Review comment:
       iirc EXTRA_LIBS is to build the nuttx image and contains other things like proprietary drivers for esp32.
   
   




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