Skip to content

Commit db31e56

Browse files
W-M-Rxiaoxiang781216
authored andcommitted
libxx: All cxx libraries move down one level
Since there are some patches that need to be loaded manually, the original method is rather confusing. Now these patches that need to be loaded manually are classified into various cxx library folders, and each dynamically downloaded cxx library is moved down one directory to make the directory structure clearer. Signed-off-by: wangmingrong1 <[email protected]>
1 parent 6611480 commit db31e56

28 files changed

+483
-490
lines changed

libs/libxx/.gitignore

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
/uClibc++
2-
/libcxx
3-
/libcxxabi
4-
/libcxx-*.src.tar.xz
5-
/libcxxabi-*.src.tar.xz
6-
/etl
7-
/.libcxx_patch
8-
/.libcxxabi_patch
1+
*.xz
2+
*.bz2

libs/libxx/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,4 @@
2929
# the configuration problem. Refer to the README.txt file in the NuttX uClibc++
3030
# GIT repository for more information
3131

32-
if(CONFIG_HAVE_CXX)
33-
if(CONFIG_UCLIBCXX)
34-
include(uClibc++.cmake)
35-
elseif(CONFIG_LIBCXX)
36-
include(libcxx.cmake)
37-
elseif(CONFIG_LIBCXXMINI)
38-
include(libcxxmini.cmake)
39-
endif()
40-
41-
if(CONFIG_LIBCXXABI)
42-
include(libcxxabi.cmake)
43-
endif()
44-
endif()
32+
nuttx_add_subdirectory()

libs/libxx/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ include $(TOPDIR)/Make.defs
3232
# in the NuttX uClibc++ GIT repository for more information
3333

3434
ifeq ($(CONFIG_UCLIBCXX),y)
35-
include uClibc++.defs
35+
include uClibc++/Make.defs
3636
else ifeq ($(CONFIG_LIBCXX),y)
37-
include libcxx.defs
37+
include libcxx/Make.defs
3838
else ifeq ($(CONFIG_LIBCXXMINI),y)
39-
include libcxxmini.defs
39+
include libcxxmini/Make.defs
4040
endif
4141

4242
ifeq ($(CONFIG_ETL),y)
43-
include etl.defs
43+
include etl/Make.defs
4444
endif
4545

4646
ifeq ($(CONFIG_LIBCXXABI),y)
47-
include libcxxabi.defs
47+
include libcxxabi/Make.defs
4848
endif
4949

5050
# Object Files
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# libs/libxx/etl.defs
2+
# libs/libxx/etl/Make.defs
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -23,34 +23,32 @@
2323
ETL_VERSION=20.32.1
2424

2525
# Download and unpack tarball if no git repo found
26-
ifeq ($(wildcard etl/.git),)
26+
ifeq ($(wildcard etl/etl/.git),)
2727
$(ETL_VERSION).tar.gz:
28-
$(call DOWNLOAD,https://github.com/ETLCPP/etl/archive/refs/tags,$(ETL_VERSION).tar.gz)
28+
$(call DOWNLOAD,https://github.com/ETLCPP/etl/archive/refs/tags,$@)
2929

30-
etl: $(ETL_VERSION).tar.gz
31-
$(Q) tar -xf $(ETL_VERSION).tar.gz
32-
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
33-
$(Q) mv etl-$(ETL_VERSION) etl
34-
$(Q) touch $@
30+
etl/etl: $(ETL_VERSION).tar.gz
31+
$(Q) tar -xf $<
32+
$(Q) $(DELFILE) $<
33+
$(Q) mv etl-$(ETL_VERSION) $@
3534
endif
3635

37-
$(TOPDIR)/include/etl: etl
38-
$(Q) $(DIRLINK) $(CURDIR)/etl/include $(TOPDIR)/include/etl
36+
$(TOPDIR)/include/etl: etl/etl
37+
$(Q) $(DIRLINK) $(CURDIR)/$</include $(TOPDIR)/include/etl
3938
ifeq ($(CONFIG_ARCH_ARMV5M), y)
40-
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv5_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
39+
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv5_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
4140
else ifeq ($(CONFIG_ARCH_ARMV6M), y)
42-
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv6_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
41+
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv6_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
4342
else ifeq ($(CONFIG_ARCH_ARMV7M), y)
44-
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv7_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
43+
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv7_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
4544
else
46-
$(Q) cp $(CURDIR)/etl/include/etl/profiles/gcc_generic_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
45+
$(Q) cp $(CURDIR)/$</include/etl/profiles/gcc_generic_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
4746
endif
4847

4948
context:: $(TOPDIR)/include/etl
5049

5150
distclean::
5251
$(Q) $(DIRUNLINK) $(TOPDIR)/include/etl
53-
ifeq ($(wildcard etl/.git),)
54-
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
55-
$(call DELDIR, etl)
52+
ifeq ($(wildcard etl/etl/.git),)
53+
$(call DELDIR, etl/etl)
5654
endif

libs/libxx/libcxx.cmake

Lines changed: 0 additions & 125 deletions
This file was deleted.

libs/libxx/libcxx/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/libcxx

0 commit comments

Comments
 (0)