diff --git a/libs/libxx/Kconfig b/libs/libxx/Kconfig index b220e45c0e..650e1ab8ef 100644 --- a/libs/libxx/Kconfig +++ b/libs/libxx/Kconfig @@ -24,10 +24,10 @@ if HAVE_CXX choice prompt "C++ Library" - default NOCXXLIB + default LIBCXXMINI -config NOCXXLIB - bool "NuttX Basic C++ support" +config LIBCXXMINI + bool "Basic C++ support" ---help--- A fragmentary C++ library that will allow to build only the simplest of C++ applications. Only contain basic C++ diff --git a/libs/libxx/Makefile b/libs/libxx/Makefile index 3cd32df56e..5f78359c11 100644 --- a/libs/libxx/Makefile +++ b/libs/libxx/Makefile @@ -19,14 +19,6 @@ include $(TOPDIR)/Make.defs -CXXSRCS = libxx_cxa_atexit.cxx - -ifeq ($(CONFIG_LIBSUPCXX),y) -CXXSRCS += libxx_impure.cxx -else -CXXSRCS += libxx_eabi_atexit.cxx -endif - # Include the uClibc++ Make.defs file if selected. If it is included, # the uClibc++/Make.defs file will add its files to the source file list, # add its DEPPATH info, and will add the appropriate paths to the VPATH @@ -42,13 +34,21 @@ include uClibc++.defs else ifeq ($(CONFIG_LIBCXX),y) include libcxx.defs else -include cxx.defs +include libcxxmini.defs endif ifeq ($(CONFIG_LIBCXXABI),y) include libcxxabi.defs endif +ifeq ($(CONFIG_LIBSUPCXX),y) +CXXSRCS += libxx_impure.cxx +else +CXXSRCS += libxx_eabi_atexit.cxx +endif + +CXXSRCS += libxx_cxa_atexit.cxx + # Object Files AOBJS = $(ASRCS:.S=$(OBJEXT)) diff --git a/libs/libxx/cxx.defs b/libs/libxx/libcxxmini.defs similarity index 95% rename from libs/libxx/cxx.defs rename to libs/libxx/libcxxmini.defs index dbd3228444..2624a4534c 100644 --- a/libs/libxx/cxx.defs +++ b/libs/libxx/libcxxmini.defs @@ -1,5 +1,5 @@ ############################################################################ -# libs/libxx/cxx.defs +# libs/libxx/libcxxmini.defs # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -34,3 +34,6 @@ ifneq ($(CONFIG_XTENSA_TOOLCHAIN_XCC), y) libxx_new.cxx_CXXFLAGS += -Wno-missing-exception-spec libxx_newa.cxx_CXXFLAGS += -Wno-missing-exception-spec endif + +DEPPATH += --dep-path libcxxmini +VPATH += libcxxmini diff --git a/libs/libxx/libxx_cxa_guard.cxx b/libs/libxx/libcxxmini/libxx_cxa_guard.cxx similarity index 98% rename from libs/libxx/libxx_cxa_guard.cxx rename to libs/libxx/libcxxmini/libxx_cxa_guard.cxx index 4b549391ce..d04777d237 100644 --- a/libs/libxx/libxx_cxa_guard.cxx +++ b/libs/libxx/libcxxmini/libxx_cxa_guard.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_cxa_guard.cxx +// libs/libxx/libcxxmini/libxx_cxa_guard.cxx // // Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. // Author: Paul Alexander Patience diff --git a/libs/libxx/libxx_cxapurevirtual.cxx b/libs/libxx/libcxxmini/libxx_cxapurevirtual.cxx similarity index 97% rename from libs/libxx/libxx_cxapurevirtual.cxx rename to libs/libxx/libcxxmini/libxx_cxapurevirtual.cxx index 0585a424e3..69bb4543f1 100644 --- a/libs/libxx/libxx_cxapurevirtual.cxx +++ b/libs/libxx/libcxxmini/libxx_cxapurevirtual.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_cxapurevirtual.cxx +// libs/libxx/libcxxmini/libxx_cxapurevirtual.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libxx/libxx_delete.cxx b/libs/libxx/libcxxmini/libxx_delete.cxx similarity index 95% rename from libs/libxx/libxx_delete.cxx rename to libs/libxx/libcxxmini/libxx_delete.cxx index a170772229..ba4490df4f 100644 --- a/libs/libxx/libxx_delete.cxx +++ b/libs/libxx/libcxxmini/libxx_delete.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_delete.cxx +// libs/libxx/libcxxmini/libxx_delete.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -23,7 +23,7 @@ #include -#include "libxx.hxx" +#include //*************************************************************************** // Operators diff --git a/libs/libxx/libxx_delete_sized.cxx b/libs/libxx/libcxxmini/libxx_delete_sized.cxx similarity index 96% rename from libs/libxx/libxx_delete_sized.cxx rename to libs/libxx/libcxxmini/libxx_delete_sized.cxx index f2d520ea78..359d2cd3e4 100644 --- a/libs/libxx/libxx_delete_sized.cxx +++ b/libs/libxx/libcxxmini/libxx_delete_sized.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_delete_sized.cxx +// libs/libxx/libcxxmini/libxx_delete_sized.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include -#include "libxx.hxx" +#include #ifdef CONFIG_HAVE_CXX14 diff --git a/libs/libxx/libxx_deletea.cxx b/libs/libxx/libcxxmini/libxx_deletea.cxx similarity index 95% rename from libs/libxx/libxx_deletea.cxx rename to libs/libxx/libcxxmini/libxx_deletea.cxx index 1867db8aff..c5a7d90571 100644 --- a/libs/libxx/libxx_deletea.cxx +++ b/libs/libxx/libcxxmini/libxx_deletea.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_deletea.cxx +// libs/libxx/libcxxmini/libxx_deletea.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -23,7 +23,7 @@ #include -#include "libxx.hxx" +#include //*************************************************************************** // Operators diff --git a/libs/libxx/libxx_deletea_sized.cxx b/libs/libxx/libcxxmini/libxx_deletea_sized.cxx similarity index 95% rename from libs/libxx/libxx_deletea_sized.cxx rename to libs/libxx/libcxxmini/libxx_deletea_sized.cxx index 90d2288620..0a7fc8be25 100644 --- a/libs/libxx/libxx_deletea_sized.cxx +++ b/libs/libxx/libcxxmini/libxx_deletea_sized.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_deletea_sized.cxx +// libs/libxx/libcxxmini/libxx_deletea_sized.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include -#include "libxx.hxx" +#include #ifdef CONFIG_HAVE_CXX14 diff --git a/libs/libxx/libxx_new.cxx b/libs/libxx/libcxxmini/libxx_new.cxx similarity index 97% rename from libs/libxx/libxx_new.cxx rename to libs/libxx/libcxxmini/libxx_new.cxx index 03e24113cd..0488134c20 100644 --- a/libs/libxx/libxx_new.cxx +++ b/libs/libxx/libcxxmini/libxx_new.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_new.cxx +// libs/libxx/libcxxmini/libxx_new.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "libxx.hxx" +#include //*************************************************************************** // Operators diff --git a/libs/libxx/libxx_newa.cxx b/libs/libxx/libcxxmini/libxx_newa.cxx similarity index 97% rename from libs/libxx/libxx_newa.cxx rename to libs/libxx/libcxxmini/libxx_newa.cxx index 39a78ff43f..e5871e8f7f 100644 --- a/libs/libxx/libxx_newa.cxx +++ b/libs/libxx/libcxxmini/libxx_newa.cxx @@ -1,5 +1,5 @@ //*************************************************************************** -// libs/libxx/libxx_newa.cxx +// libs/libxx/libcxxmini/libxx_newa.cxx // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "libxx.hxx" +#include //*************************************************************************** // Pre-processor Definitions diff --git a/libs/libxx/libxx.hxx b/libs/libxx/libxx.hxx index d11f7b4299..0640100906 100644 --- a/libs/libxx/libxx.hxx +++ b/libs/libxx/libxx.hxx @@ -26,7 +26,7 @@ #include -#include +#include //*************************************************************************** // Public Types diff --git a/libs/libxx/libxx_cxa_atexit.cxx b/libs/libxx/libxx_cxa_atexit.cxx index a950edfc5b..6f50fa1035 100644 --- a/libs/libxx/libxx_cxa_atexit.cxx +++ b/libs/libxx/libxx_cxa_atexit.cxx @@ -24,6 +24,7 @@ #include #include +#include #include "libxx.hxx"