diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-01 21:08:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-01 21:08:56 +0000 |
commit | f5776dec9fdc3b655b7f424340d613664a65e2ab (patch) | |
tree | a99511f64eea990fb7d0f9595cc4933608fc8567 /nuttx/libxx | |
parent | eb26187767da1e752bfdc6571ccb70e3f84fd954 (diff) | |
download | px4-firmware-f5776dec9fdc3b655b7f424340d613664a65e2ab.tar.gz px4-firmware-f5776dec9fdc3b655b7f424340d613664a65e2ab.tar.bz2 px4-firmware-f5776dec9fdc3b655b7f424340d613664a65e2ab.zip |
uClibc++ compiles... but it is a long way from linking
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5293 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/libxx')
-rw-r--r-- | nuttx/libxx/Kconfig | 27 | ||||
-rw-r--r-- | nuttx/libxx/Makefile | 13 | ||||
-rw-r--r-- | nuttx/libxx/README.txt | 5 | ||||
-rw-r--r-- | nuttx/libxx/libxx_cxa_atexit.cxx | 3 |
4 files changed, 45 insertions, 3 deletions
diff --git a/nuttx/libxx/Kconfig b/nuttx/libxx/Kconfig index 4133a0ceb..5ce2a8f7d 100644 --- a/nuttx/libxx/Kconfig +++ b/nuttx/libxx/Kconfig @@ -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 diff --git a/nuttx/libxx/Makefile b/nuttx/libxx/Makefile index bc8c5012e..e563b9647 100644 --- a/nuttx/libxx/Makefile +++ b/nuttx/libxx/Makefile @@ -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 - --include uClibc++/Make.defs +# +# 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 + +ifeq ($(CONFIG_UCLIBCXX),y) +include uClibc++/Make.defs +endif # Object Files diff --git a/nuttx/libxx/README.txt b/nuttx/libxx/README.txt index 6cf066f08..7a1c51fa7 100644 --- a/nuttx/libxx/README.txt +++ b/nuttx/libxx/README.txt @@ -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 ------------ diff --git a/nuttx/libxx/libxx_cxa_atexit.cxx b/nuttx/libxx/libxx_cxa_atexit.cxx index 7e6d00a37..cd31f94f6 100644 --- a/nuttx/libxx/libxx_cxa_atexit.cxx +++ b/nuttx/libxx/libxx_cxa_atexit.cxx @@ -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 |