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/25 22:30:49 UTC

[GitHub] [incubator-nuttx] AlanRosenthal commented on a change in pull request #5332: arch/Toolchain.defs: Simplify addition builtin library to EXTRA_LIBS

AlanRosenthal commented on a change in pull request #5332:
URL: https://github.com/apache/incubator-nuttx/pull/5332#discussion_r792173427



##########
File path: arch/arm/src/arm/Toolchain.defs
##########
@@ -103,21 +103,12 @@ OBJDUMP = $(CROSSDEV)objdump
 
 # Add the builtin library
 
-EXTRA_LIBS += -lgcc
-EXTRA_LIBPATHS += -L "${shell dirname "`$(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name`"}"
+EXTRA_LIBS := ${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libgcc.a}
 
 ifneq ($(CONFIG_LIBM),y)
-  LIBM_PATH = "${shell dirname "`$(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a`"}"
-  
-  # Check if libm is provided by the compiler
-  
-  ifneq ($(LIBM_PATH),".")
-    EXTRA_LIBS += -lm
-    EXTRA_LIBPATHS += -L $(LIBM_PATH)
-  endif
+  EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}}

Review comment:
       why wildcard on this line, but not the others?




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