mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
uClibc++ compiles... but it is a long way from linking
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5293 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -10,6 +10,10 @@ config HAVE_CXX
|
||||
Toolchain supports C++ and CXX, CXXFLAGS, and COMPILEXX have been
|
||||
defined in the configurations Make.defs file.
|
||||
|
||||
if HAVE_CXX
|
||||
|
||||
comment "Basic CXX Support"
|
||||
|
||||
config HAVE_CXXINITIALIZE
|
||||
bool "Have C++ initialization"
|
||||
default n
|
||||
@@ -25,3 +29,26 @@ config CXX_NEWLONG
|
||||
size_t may be type long or type int. This matters for some
|
||||
C++ library routines because the NuttX size_t might not have
|
||||
the same underlying type as your toolchain's size_t.
|
||||
|
||||
comment "uClibc++ Standard C++ Library"
|
||||
|
||||
config UCLIBCXX
|
||||
bool "Build uClibc++ (must be installed)"
|
||||
default n
|
||||
---help---
|
||||
If you have installed uClibc++ into the NuttX source try, then it can
|
||||
be built by selecting this option. See misc/uClibc++/README.txt for
|
||||
information on installing uClibc++.
|
||||
|
||||
if UCLIBCXX
|
||||
|
||||
config UCLIBCXX_EXCEPTION
|
||||
bool "Enable Exception Suppport"
|
||||
default y
|
||||
|
||||
config UCLIBCXX_IOSTREAM_BUFSIZE
|
||||
int "IO Stream Buffer Size"
|
||||
default 32
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
+9
-2
@@ -49,12 +49,19 @@ CXXSRCS += libxx_newa.cxx
|
||||
DEPPATH = --dep-path .
|
||||
VPATH = .
|
||||
|
||||
# Include the uClibc++ Make.defs file (if it is present). If is present,
|
||||
# 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
|
||||
# variable
|
||||
#
|
||||
# Note that an error will occur if you select CONFIG_LIBXX_UCLIBCXX
|
||||
# without installing the uClibc++ package. This is intentional to let
|
||||
# you know about the configuration problem. Refer to misc/uClibc++/README.txt
|
||||
# for more information
|
||||
|
||||
-include uClibc++/Make.defs
|
||||
ifeq ($(CONFIG_UCLIBCXX),y)
|
||||
include uClibc++/Make.defs
|
||||
endif
|
||||
|
||||
# Object Files
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ are recommended:
|
||||
- uClibc++ http://cxx.uclibc.org/
|
||||
- uSTL http://ustl.sourceforge.net/
|
||||
|
||||
There is a version of uClibc++ that is customized for NuttX that can
|
||||
be found here: misc/uClibc++. See misc/uClibc++ for installation
|
||||
instructions.
|
||||
|
||||
At present, only the following are supported here:
|
||||
|
||||
- void *operator new(std::size_t nbytes);
|
||||
@@ -19,6 +23,7 @@ At present, only the following are supported here:
|
||||
- void operator delete[](void *ptr);
|
||||
- void __cxa_pure_virtual(void);
|
||||
- int __aeabi_atexit(void* object, void (*destroyer)(void*), void *dso_handle);
|
||||
- int __cxa_atexit(__cxa_exitfunc_t func, FAR void *arg, FAR void *dso_handle);
|
||||
|
||||
operator new
|
||||
------------
|
||||
|
||||
@@ -130,6 +130,9 @@ extern "C"
|
||||
{
|
||||
// Register the function to be called when the task/thread exists.
|
||||
|
||||
alloc->func = func;
|
||||
alloc->arg = arg;
|
||||
|
||||
return on_exit(__cxa_callback, alloc);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user