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/04/15 07:01:45 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6076: arch/armv[7|8]m: enhance the clang support
xiaoxiang781216 commented on code in PR #6076:
URL: https://github.com/apache/incubator-nuttx/pull/6076#discussion_r851099240
##########
arch/arm/src/armv8-m/Toolchain.defs:
##########
@@ -161,26 +222,21 @@ ifneq ($(CONFIG_CXX_RTTI),y)
ARCHCXXFLAGS += -fno-rtti
endif
-# Default toolchain
-
-CC = $(CROSSDEV)gcc
-CXX = $(CROSSDEV)g++
-CPP = $(CROSSDEV)gcc -E -P -x c
-LD = $(CROSSDEV)ld
-STRIP = $(CROSSDEV)strip --strip-unneeded
-AR = $(CROSSDEV)ar rcs
-NM = $(CROSSDEV)nm
-OBJCOPY = $(CROSSDEV)objcopy
-OBJDUMP = $(CROSSDEV)objdump
-
# Add the builtin library
-EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name}}
+LIBGCC = $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)
+ifeq ($(wildcard $(LIBGCC)),)
+ # if "--print-libgcc-file-name" unable to find the correct libgcc PATH
+ # then go ahead and try "--print-file-name"
+ LIBGCC := $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name $(notdir $(LIBGCC))))
+endif
+
+EXTRA_LIBS += $(LIBGCC)
ifneq ($(CONFIG_LIBM),y)
- EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}}
+ EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a))
endif
ifeq ($(CONFIG_LIBSUPCXX),y)
- EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a}}
+ EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libsupc++.a))
Review Comment:
let's create a new patch to replace all ${/$} with $(/$).
--
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