libcxxabi: Path <cxxabi.h> not found

./helloxx_main.cxx:29:10: fatal error: cxxabi.h: No such file or directory
   29 | #include <cxxabi.h>
      |          ^~~~~~~~~~
CONFIG_LIBCXXABI is turned on, but the library include is not linked to nuttx/include, causing the compilation to fail.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
This commit is contained in:
wangmingrong 2024-03-08 12:45:04 +08:00 committed by Xiang Xiao
parent 6843b26a66
commit d4b5991589
2 changed files with 16 additions and 5 deletions

View File

@ -20,6 +20,8 @@
LIBCXXABI_VERSION=$(patsubst "%",%,$(CONFIG_LIBCXXABI_VERSION))
# Download and unpack tarball if no git repo found
ifeq ($(wildcard libcxxabi/.git),)
libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz:
$(call DOWNLOAD,https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LIBCXXABI_VERSION),libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz)
@ -27,14 +29,19 @@ libcxxabi: libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz
$(Q) tar -xf libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz
$(Q) mv libcxxabi-$(LIBCXXABI_VERSION).src libcxxabi
$(Q) touch $@
endif
$(TOPDIR)/include/libcxxabi: libcxxabi
$(Q) $(DIRLINK) $(CURDIR)/libcxxabi/include $(TOPDIR)/include/libcxxabi
$(Q) cp $(CURDIR)/__config_site $(TOPDIR)/include/libcxxabi/__config_site
context:: $(TOPDIR)/include/libcxxabi
# Download and unpack tarball if no git repo found
ifeq ($(wildcard libcxxabi/.git),)
distclean::
$(Q) $(DELFILE) libcxxabi-$(LIBCXXABI_VERSION).src.tar.xz
$(Q) $(DIRUNLINK) $(TOPDIR)/include/libcxxabi
ifeq ($(wildcard libcxxabi/.git),)
$(Q) $(DELFILE) libcxxabi-$(LIBCXX_VERSION).src.tar.xz
$(call DELDIR, libcxxabi)
context:: libcxxabi
endif
ifeq ($(CONFIG_LIBCXXABI), y)

View File

@ -664,6 +664,10 @@ else
endif
endif
ifeq ($(CONFIG_LIBCXXABI),y)
ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)libcxxabi
endif
ifeq ($(CONFIG_LIBM_NEWLIB),y)
ARCHINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)newlib
ARCHXXINCLUDES += ${INCSYSDIR_PREFIX}$(TOPDIR)$(DELIM)include$(DELIM)newlib