libxx: Integrate uClibc++ latest official release
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I05377a0a7674f1cbe461ce67960bd3dc62729337
This commit is contained in:
parent
34bcf39c68
commit
ac7e5de5ae
|
@ -1395,7 +1395,7 @@ Configuration Sub-directories
|
|||
CONFIG_UCLIBCXX=y
|
||||
CONFIG_CXX_EXCEPTION=y
|
||||
CONFIG_CXX_LIBSUPCXX=y
|
||||
CONFIG_UCLIBCXX_IOSTREAM_BUFSIZE=32
|
||||
CONFIG_UCLIBCXX_BUFSIZE=32
|
||||
|
||||
CONFIG_EXAMPLES_ELF_CXX=y
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
/uClibc++
|
||||
/libcxx
|
||||
uClibc++.tar.gz
|
||||
|
|
|
@ -66,8 +66,8 @@ config UCLIBCXX
|
|||
|
||||
if UCLIBCXX
|
||||
|
||||
config UCLIBCXX_IOSTREAM_BUFSIZE
|
||||
int "IO Stream Buffer Size"
|
||||
config UCLIBCXX_BUFSIZE
|
||||
int "IO Stream/Container Buffer Size"
|
||||
default 32
|
||||
|
||||
endif
|
||||
|
|
|
@ -48,7 +48,7 @@ CXXSRCS = libxx_cxa_atexit.cxx libxx_eabi_atexit.cxx
|
|||
# in the NuttX uClibc++ GIT repository for more information
|
||||
|
||||
ifeq ($(CONFIG_UCLIBCXX),y)
|
||||
include uClibc++/Make.defs
|
||||
include uClibc++.defs
|
||||
else ifeq ($(CONFIG_LIBCXX),y)
|
||||
include libcxx/Make.defs
|
||||
else
|
||||
|
@ -68,7 +68,7 @@ OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) $(CPPOBJS)
|
|||
BIN = libxx$(LIBEXT)
|
||||
|
||||
all: $(BIN)
|
||||
.PHONY: depend clean distclean
|
||||
.PHONY: depend clean distclean dirlinks
|
||||
|
||||
$(AOBJS): %$(OBJEXT): %.S
|
||||
$(call ASSEMBLE, $<, $@)
|
||||
|
@ -85,6 +85,8 @@ $(CPPOBJS): %$(OBJEXT): %.cpp
|
|||
$(BIN): $(OBJS)
|
||||
$(call ARCHIVE, $@, $(OBJS))
|
||||
|
||||
dirlinks::
|
||||
|
||||
.depend: Makefile $(SRCS)
|
||||
$(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
|
||||
$(Q) touch $@
|
||||
|
@ -95,7 +97,7 @@ clean:
|
|||
$(call DELFILE, $(BIN))
|
||||
$(call CLEAN)
|
||||
|
||||
distclean: clean
|
||||
distclean:: clean
|
||||
$(call DELFILE, Make.dep)
|
||||
$(call DELFILE, .depend)
|
||||
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
/****************************************************************************
|
||||
* libs/libxx/system_configuration.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef SYSTEM_CONFIGURATION_H
|
||||
#define SYSTEM_CONFIGURATION_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Version Number */
|
||||
|
||||
#define __UCLIBCXX_MAJOR__ 0
|
||||
#define __UCLIBCXX_MINOR__ 2
|
||||
#define __UCLIBCXX_SUBLEVEL__ 6-git
|
||||
|
||||
/* Target Features and Options */
|
||||
|
||||
#ifdef CONFIG_HAVE_FLOAT
|
||||
# define __UCLIBCXX_HAS_FLOATS__ 1
|
||||
#endif
|
||||
#ifdef CONFIG_HAVE_LONG_DOUBLE
|
||||
# define __UCLIBCXX_HAS_LONG_DOUBLE__ 1
|
||||
#endif
|
||||
#undef __UCLIBCXX_HAS_TLS__
|
||||
#define __UCLIBCXX_WARNINGS__ "-Wall"
|
||||
#define __BUILD_EXTRA_LIBRARIES__ ""
|
||||
#define __HAVE_DOT_CONFIG__ 1
|
||||
|
||||
/* String and I/O Stream Support */
|
||||
|
||||
#ifdef CONFIG_LIBC_WCHAR
|
||||
# define __UCLIBCXX_HAS_WCHAR__ 1
|
||||
#endif
|
||||
#define __UCLIBCXX_IOSTREAM_BUFSIZE__ CONFIG_UCLIBCXX_BUFSIZE
|
||||
#undef __UCLIBCXX_HAS_LFS__
|
||||
#define __UCLIBCXX_SUPPORT_CDIR__ 1
|
||||
#define __UCLIBCXX_SUPPORT_CIN__ 1
|
||||
#define __UCLIBCXX_SUPPORT_COUT__ 1
|
||||
#define __UCLIBCXX_SUPPORT_CERR__ 1
|
||||
#define __UCLIBCXX_SUPPORT_CLOG__ 1
|
||||
#ifdef CONFIG_LIBC_WCHAR
|
||||
# define __UCLIBCXX_SUPPORT_WCIN__ 1
|
||||
# define __UCLIBCXX_SUPPORT_WCOUT__ 1
|
||||
# define __UCLIBCXX_SUPPORT_WCERR__ 1
|
||||
# define __UCLIBCXX_SUPPORT_WCLOG__ 1
|
||||
#endif
|
||||
|
||||
/* STL and Code Expansion */
|
||||
|
||||
#define __UCLIBCXX_STL_BUFFER_SIZE__ CONFIG_UCLIBCXX_BUFSIZE
|
||||
#define __UCLIBCXX_CODE_EXPANSION__ 1
|
||||
#define __UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS__ 1
|
||||
#define __UCLIBCXX_EXPAND_STRING_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_VECTOR_BASIC__ 1
|
||||
#define __UCLIBCXX_EXPAND_IOS_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_STREAMBUF_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_ISTREAM_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_OSTREAM_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_FSTREAM_CHAR__ 1
|
||||
#define __UCLIBCXX_EXPAND_SSTREAM_CHAR__ 1
|
||||
|
||||
/* Library Installation Options */
|
||||
|
||||
#define __UCLIBCXX_RUNTIME_PREFIX__ "/usr/uClibc++"
|
||||
#define __UCLIBCXX_RUNTIME_INCLUDE_SUBDIR__ "/include"
|
||||
#define __UCLIBCXX_RUNTIME_LIB_SUBDIR__ "/lib"
|
||||
#define __UCLIBCXX_RUNTIME_BIN_SUBDIR__ "/bin"
|
||||
#ifdef CONFIG_CXX_EXCEPTION
|
||||
# define __UCLIBCXX_EXCEPTION_SUPPORT__ 1
|
||||
#endif
|
||||
#undef __IMPORT_LIBSUP__
|
||||
#undef __IMPORT_LIBGCC_EH__
|
||||
#define __BUILD_STATIC_LIB__ 1
|
||||
#define __BUILD_ONLY_STATIC_LIB__
|
||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||
# define __DODEBUG__ 1
|
||||
#endif
|
||||
|
||||
#endif /* SYSTEM_CONFIGURATION_H */
|
|
@ -0,0 +1,48 @@
|
|||
############################################################################
|
||||
# libs/libxx/libcxx.defs
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership. The
|
||||
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance with the
|
||||
# License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
VERSION=0.2.5
|
||||
|
||||
$(TOPDIR)/include/uClibc++:
|
||||
$(Q) wget https://git.busybox.net/uClibc++/snapshot/uClibc++-$(VERSION).tar.gz -O uClibc++.tar.gz
|
||||
$(Q) tar -xzf uClibc++.tar.gz
|
||||
$(Q) mv uClibc++-$(VERSION) uClibc++
|
||||
$(Q) $(DIRLINK) $(CURDIR)/uClibc++/include $(TOPDIR)/include/uClibc++
|
||||
$(Q) $(COPYFILE) $(CURDIR)/system_configuration.h $(TOPDIR)/include/uClibc++
|
||||
|
||||
dirlinks:: $(TOPDIR)/include/uClibc++
|
||||
|
||||
distclean::
|
||||
$(Q) $(DELFILE) $(TOPDIR)/include/uClibc++/system_configuration.h
|
||||
$(Q) $(DIRUNLINK) $(TOPDIR)/include/uClibc++
|
||||
$(Q) $(DELFILE) uClibc++.tar.gz
|
||||
|
||||
CPPSRCS += algorithm.cpp associative_base.cpp bitset.cpp char_traits.cpp
|
||||
CPPSRCS += complex.cpp del_op.cpp del_opnt.cpp del_ops.cpp del_opv.cpp
|
||||
CPPSRCS += del_opvnt.cpp del_opvs.cpp deque.cpp exception.cpp fstream.cpp
|
||||
CPPSRCS += func_exception.cpp iomanip.cpp ios.cpp iostream.cpp istream.cpp
|
||||
CPPSRCS += iterator.cpp limits.cpp list.cpp locale.cpp map.cpp new_handler.cpp
|
||||
CPPSRCS += new_op.cpp new_opnt.cpp new_opv.cpp new_opvnt.cpp numeric.cpp
|
||||
CPPSRCS += ostream.cpp queue.cpp set.cpp sstream.cpp stack.cpp stdexcept.cpp
|
||||
CPPSRCS += streambuf.cpp string.cpp typeinfo.cpp utility.cpp valarray.cpp
|
||||
CPPSRCS += vector.cpp
|
||||
|
||||
DEPPATH += --dep-path uClibc++/src
|
||||
VPATH += uClibc++/src
|
|
@ -313,6 +313,7 @@ ifneq ($(CONFIG_ARCH_CHIP),)
|
|||
endif
|
||||
|
||||
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip drivers/platform
|
||||
$(Q) $(MAKE) -C libs/libxx dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C boards dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C openamp dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks TOPDIR="$(TOPDIR)"
|
||||
|
|
|
@ -292,6 +292,7 @@ ifneq ($(CONFIG_ARCH_CHIP),)
|
|||
endif
|
||||
|
||||
dirlinks: include\arch include\arch\board include\arch\chip $(ARCH_SRC)\board $(ARCH_SRC)\chip drivers\platform
|
||||
$(Q) $(MAKE) -C libs/libxx dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C boards dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C openamp dirlinks TOPDIR="$(TOPDIR)"
|
||||
$(Q) $(MAKE) -C $(CONFIG_APPS_DIR) dirlinks TOPDIR="$(TOPDIR)"
|
||||
|
|
Loading…
Reference in New Issue