You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by GitBox <gi...@apache.org> on 2019/12/31 16:24:40 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull
request #19: Unify the c++ standard library name to libxx
xiaoxiang781216 commented on a change in pull request #19: Unify the c++ standard library name to libxx
URL: https://github.com/apache/incubator-nuttx/pull/19#discussion_r362243316
##########
File path: tools/LibTargets.mk
##########
@@ -188,10 +188,10 @@ $(ARCH_SRC)$(DELIM)libuarch$(LIBEXT): context
staging$(DELIM)libuarch$(LIBEXT): $(ARCH_SRC)$(DELIM)libuarch$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
-libs$(DELIM)libxx$(DELIM)$(LIBXX)$(LIBEXT): context
- $(Q) $(MAKE) -C libs$(DELIM)libxx TOPDIR="$(TOPDIR)" $(LIBXX)$(LIBEXT) KERNEL=n
+libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT): context
+ $(Q) $(MAKE) -C libs$(DELIM)libxx TOPDIR="$(TOPDIR)" libxx$(LIBEXT) KERNEL=n
-staging$(DELIM)$(LIBXX)$(LIBEXT): libs$(DELIM)libxx$(DELIM)$(LIBXX)$(LIBEXT)
+staging$(DELIM)libxx$(LIBEXT): libs$(DELIM)libxx$(DELIM)libxx$(LIBEXT)
$(Q) $(call INSTALL_LIB,$<,$@)
Review comment:
Yes, the different C++ library install into the different folder. Make.defs in each folder can only control which C++ source files need to compile, but the final achieved library is controlled by libs/libxx/Makefile:
ifeq ($(CONFIG_UCLIBCXX),y)
include uClibc++/Make.defs
endif
ifeq ($(CONFIG_LIBCXX),y)
include libcxx/Make.defs
endif
# Object Files
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
CXXOBJS = $(CXXSRCS:.cxx=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS)
OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
BIN = libxx$(LIBEXT)
all: $(BIN)
So the final library is determinated by BIN variable. It's more simple to make BIN equal libxx.
I test this patch with two configuration:
1.sim with uClibc++
2.m4 with libcxx
Both build without error.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services