Skip to content

Commit

Permalink
libxx: All cxx libraries move down one level
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
W-M-R committed Nov 7, 2024
1 parent f32f25c commit 2c79bda
Show file tree
Hide file tree
Showing 29 changed files with 558 additions and 490 deletions.
75 changes: 75 additions & 0 deletions boards/arm/qemu/qemu-armv7a/configs/gprof/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
CONFIG_ALARM_ARCH=y
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="qemu-armv7a"
CONFIG_ARCH_BOARD_QEMU_ARMV7A=y
CONFIG_ARCH_CHIP="qemu"
CONFIG_ARCH_CHIP_QEMU_ARM=y
CONFIG_ARCH_CHIP_QEMU_CORTEXA7=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_LOWVECTORS=y
CONFIG_BUILTIN=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_SCHED_ERROR=y
CONFIG_DEBUG_SCHED_INFO=y
CONFIG_DEBUG_SCHED_WARN=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXPERIMENTAL=y
CONFIG_FLASH_SIZE=127926272
CONFIG_FLASH_START=0x00600000
CONFIG_FLASH_VSTART=0x00600000
CONFIG_FS_PROCFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBC_EXECFUNCS=y
CONFIG_LIBC_MEMFD_ERROR=y
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_ONESHOT=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAMLOG=y
CONFIG_RAM_SIZE=132120576
CONFIG_RAM_START=0x40200000
CONFIG_RAM_VSTART=0x40200000
CONFIG_RAW_BINARY=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_GPROF=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=192
CONFIG_STACK_COLORATION=y
CONFIG_START_DAY=25
CONFIG_START_MONTH=4
CONFIG_START_YEAR=2023
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_GPROF=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_KASAN=y
CONFIG_TESTING_OSTEST=y
CONFIG_UART1_BASE=0x9000000
CONFIG_UART1_IRQ=33
CONFIG_UART1_PL011=y
CONFIG_UART1_SERIAL_CONSOLE=y
CONFIG_UART_PL011=y
CONFIG_USEC_PER_TICK=1000
10 changes: 2 additions & 8 deletions libs/libxx/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
/uClibc++
/libcxx
/libcxxabi
/libcxx-*.src.tar.xz
/libcxxabi-*.src.tar.xz
/etl
/.libcxx_patch
/.libcxxabi_patch
*.xz
*.bz2
14 changes: 1 addition & 13 deletions libs/libxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,4 @@
# the configuration problem. Refer to the README.txt file in the NuttX uClibc++
# GIT repository for more information

if(CONFIG_HAVE_CXX)
if(CONFIG_UCLIBCXX)
include(uClibc++.cmake)
elseif(CONFIG_LIBCXX)
include(libcxx.cmake)
elseif(CONFIG_LIBCXXMINI)
include(libcxxmini.cmake)
endif()

if(CONFIG_LIBCXXABI)
include(libcxxabi.cmake)
endif()
endif()
nuttx_add_subdirectory()
10 changes: 5 additions & 5 deletions libs/libxx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ include $(TOPDIR)/Make.defs
# in the NuttX uClibc++ GIT repository for more information

ifeq ($(CONFIG_UCLIBCXX),y)
include uClibc++.defs
include uClibc++/Make.defs
else ifeq ($(CONFIG_LIBCXX),y)
include libcxx.defs
include libcxx/Make.defs
else ifeq ($(CONFIG_LIBCXXMINI),y)
include libcxxmini.defs
include libcxxmini/Make.defs
endif

ifeq ($(CONFIG_ETL),y)
include etl.defs
include etl/Make.defs
endif

ifeq ($(CONFIG_LIBCXXABI),y)
include libcxxabi.defs
include libcxxabi/Make.defs
endif

# Object Files
Expand Down
32 changes: 15 additions & 17 deletions libs/libxx/etl.defs → libs/libxx/etl/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# libs/libxx/etl.defs
# libs/libxx/etl/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -23,34 +23,32 @@
ETL_VERSION=20.32.1

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

etl: $(ETL_VERSION).tar.gz
$(Q) tar -xf $(ETL_VERSION).tar.gz
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
$(Q) mv etl-$(ETL_VERSION) etl
$(Q) touch $@
etl/etl: $(ETL_VERSION).tar.gz
$(Q) tar -xf $<
$(Q) $(DELFILE) $<
$(Q) mv etl-$(ETL_VERSION) $@
endif

$(TOPDIR)/include/etl: etl
$(Q) $(DIRLINK) $(CURDIR)/etl/include $(TOPDIR)/include/etl
$(TOPDIR)/include/etl: etl/etl
$(Q) $(DIRLINK) $(CURDIR)/$</include $(TOPDIR)/include/etl
ifeq ($(CONFIG_ARCH_ARMV5M), y)
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv5_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv5_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
else ifeq ($(CONFIG_ARCH_ARMV6M), y)
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv6_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv6_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
else ifeq ($(CONFIG_ARCH_ARMV7M), y)
$(Q) cp $(CURDIR)/etl/include/etl/profiles/armv7_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
$(Q) cp $(CURDIR)/$</include/etl/profiles/armv7_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
else
$(Q) cp $(CURDIR)/etl/include/etl/profiles/gcc_generic_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
$(Q) cp $(CURDIR)/$</include/etl/profiles/gcc_generic_no_stl.h $(CURDIR)/etl/include/etl/etl_profile.h
endif

context:: $(TOPDIR)/include/etl

distclean::
$(Q) $(DIRUNLINK) $(TOPDIR)/include/etl
ifeq ($(wildcard etl/.git),)
$(Q) $(DELFILE) $(ETL_VERSION).tar.gz
$(call DELDIR, etl)
ifeq ($(wildcard etl/etl/.git),)
$(call DELDIR, etl/etl)
endif
125 changes: 0 additions & 125 deletions libs/libxx/libcxx.cmake

This file was deleted.

1 change: 1 addition & 0 deletions libs/libxx/libcxx/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/libcxx
File renamed without changes.
Loading

0 comments on commit 2c79bda

Please sign in to comment.