libs/libxx/Kconfig: CONFIG_LIBC_LOCALE is needed to build libcxx. A
math library is also needed, however, here are various ways to provide a math library so CONFIG_LIBM is not now set. boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs: Add required definitiions if libcxx is enabled.
This commit is contained in:
parent
19a7ee1a84
commit
8ccb5fabf8
2 changed files with 24 additions and 0 deletions
|
@ -47,12 +47,20 @@ ifeq ($(WINTOOL),y)
|
|||
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||
|
||||
ifeq ($(CONFIG_LIBCXX),y)
|
||||
ARCHXXINCLUDES += -isystem "${shell cygpath -w $(TOPDIR)/include/libcxx}"
|
||||
endif
|
||||
else
|
||||
# Linux/Cygwin-native toolchain
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||
ARCHSCRIPT = -T$(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||
|
||||
ifeq ($(CONFIG_LIBCXX),y)
|
||||
ARCHXXINCLUDES += -isystem $(TOPDIR)/include/libcxx
|
||||
endif
|
||||
endif
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
@ -90,6 +98,21 @@ CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
|||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||
|
||||
ifeq ($(CONFIG_LIBCXX),y)
|
||||
CXXFLAGS += -std=c++14 -D__NuttX__ -D__GLIBCXX__ -DMB_LEN_MAX=8 -DHAVE_DEPENDENT_EH_ABI=0 \
|
||||
-fno-builtin -D_DEBUG -D_LIBCPP_BUILD_STATIC -D_LIBCPP_STD_VER=14
|
||||
|
||||
ifneq ($(CONFIG_LIBCXX_EXCEPTION),y)
|
||||
CXXFLAGS += -fno-exceptions -fno-rtti -fcheck-new -D_LIBCPP_NO_EXCEPTIONS
|
||||
endif
|
||||
|
||||
# supc++ is always needed with libcxx
|
||||
|
||||
LIBSUPXX = ${shell $(CC) $(CFLAGS) --print-file-name=libsupc++.a}
|
||||
EXTRA_LIBPATHS = -L "${shell dirname "$(LIBSUPXX)"}"
|
||||
EXTRA_LIBS = -lsupc++
|
||||
endif
|
||||
|
||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
|
|
@ -43,6 +43,7 @@ config LIBCXX
|
|||
default n
|
||||
select CLOCK_MONOTONIC
|
||||
select LIBC_WCHAR
|
||||
select LIBC_LOCALE
|
||||
select TIME_EXTENDED
|
||||
---help---
|
||||
If you have installed libcxx into the NuttX source tree, then it can
|
||||
|
|
Loading…
Reference in a new issue