mirror of
https://github.com/apache/nuttx.git
synced 2026-09-25 17:39:00 +08:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user