From 15fb70cb00ee64a5543d784d1f48210524d38a08 Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Wed, 18 Aug 2021 19:31:06 +0200 Subject: [PATCH] libs/libxx: Download C++ libraries during context. Signed-off-by: Abdelatif Guettouche --- libs/libxx/Makefile | 4 ++-- libs/libxx/libcxx.defs | 2 +- libs/libxx/uClibc++.defs | 2 +- tools/Directories.mk | 3 +++ tools/Makefile.unix | 1 - tools/Makefile.win | 1 - 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/libs/libxx/Makefile b/libs/libxx/Makefile index 2415130682..8b7ce21d43 100644 --- a/libs/libxx/Makefile +++ b/libs/libxx/Makefile @@ -58,7 +58,7 @@ OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS) BIN = libxx$(LIBEXT) all: $(BIN) -.PHONY: depend clean distclean dirlinks +.PHONY: depend clean distclean context $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -75,7 +75,7 @@ $(CPPOBJS): %$(OBJEXT): %.cpp $(BIN): $(OBJS) $(call ARCHIVE, $@, $(OBJS)) -dirlinks:: +context:: makedepfile: $(CXXSRCS:.cxx=.ddx) $(CPPSRCS:.cpp=.ddp) $(call CATFILE, Make.dep, $^) diff --git a/libs/libxx/libcxx.defs b/libs/libxx/libcxx.defs index c0c6fda787..9ade657016 100644 --- a/libs/libxx/libcxx.defs +++ b/libs/libxx/libcxx.defs @@ -33,7 +33,7 @@ libcxx: libcxx-$(VERSION).src.tar.xz $(TOPDIR)/include/libcxx: libcxx $(Q) $(DIRLINK) $(CURDIR)/libcxx/include $(TOPDIR)/include/libcxx -dirlinks:: $(TOPDIR)/include/libcxx +context:: $(TOPDIR)/include/libcxx distclean:: $(Q) $(DELFILE) libcxx-$(VERSION).src.tar.xz diff --git a/libs/libxx/uClibc++.defs b/libs/libxx/uClibc++.defs index f9505fccfe..368de892b3 100644 --- a/libs/libxx/uClibc++.defs +++ b/libs/libxx/uClibc++.defs @@ -28,7 +28,7 @@ $(TOPDIR)/include/uClibc++: $(Q) $(DIRLINK) $(CURDIR)/uClibc++/include $(TOPDIR)/include/uClibc++ $(Q) $(COPYFILE) $(CURDIR)/system_configuration.h $(TOPDIR)/include/uClibc++ -dirlinks:: $(TOPDIR)/include/uClibc++ +context:: $(TOPDIR)/include/uClibc++ distclean:: $(Q) $(DELFILE) $(TOPDIR)/include/uClibc++/system_configuration.h diff --git a/tools/Directories.mk b/tools/Directories.mk index 8eb0584725..4213a0bfbf 100644 --- a/tools/Directories.mk +++ b/tools/Directories.mk @@ -97,6 +97,9 @@ endif endif CONTEXTDIRS += libs$(DELIM)libc +ifeq ($(CONFIG_HAVE_CXX),y) +CONTEXTDIRS += libs$(DELIM)libxx +endif ifeq ($(CONFIG_NX),y) KERNDEPDIRS += graphics diff --git a/tools/Makefile.unix b/tools/Makefile.unix index 549d1be484..2c20ba1efe 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -326,7 +326,6 @@ endif $(Q) touch $@ dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip drivers/platform - $(Q) $(MAKE) -C libs/libxx dirlinks $(Q) $(MAKE) -C boards dirlinks $(Q) $(MAKE) -C openamp dirlinks $(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks diff --git a/tools/Makefile.win b/tools/Makefile.win index 9ab3427eee..9d755f9fee 100644 --- a/tools/Makefile.win +++ b/tools/Makefile.win @@ -305,7 +305,6 @@ endif $(Q) touch $@ dirlinks: include\arch include\arch\board include\arch\chip $(ARCH_SRC)\board $(ARCH_SRC)\chip drivers\platform - $(Q) $(MAKE) -C libs/libxx dirlinks $(Q) $(MAKE) -C boards dirlinks $(Q) $(MAKE) -C openamp dirlinks $(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks