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:
patacongo
2012-11-01 21:08:56 +00:00
parent 27c6b6263f
commit 7950d17653
8 changed files with 72 additions and 4 deletions
+3
View File
@@ -279,6 +279,9 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
CONFIG_HAVE_CXX=y
# CONFIG_HAVE_CXXINITIALIZE is not set
# CONFIG_CXX_NEWLONG is not set
CONFIG_UCLIBCXX=y
CONFIG_UCLIBCXX_EXCEPTION=y
CONFIG_UCLIBCXX_IOSTREAM_BUFSIZE=32
#
# Application Configuration
+9
View File
@@ -46,4 +46,13 @@
// Namespace
//***************************************************************************
//***************************************************************************
// Namespace
//***************************************************************************
namespace std
{
using ::_Bool8;
}
#endif // __INCLUDE_CXX_CSTDBOOL
+11 -1
View File
@@ -52,6 +52,8 @@ namespace std
using ::FILE;
using ::fpos_t;
using ::size_t;
using ::clearerr;
using ::fclose;
using ::fflush;
using ::feof;
@@ -69,16 +71,24 @@ namespace std
using ::ftell;
using ::fwrite;
using ::gets;
using ::ungetc;
using ::printf;
using ::puts;
using ::rename;
using ::sprintf;
using ::asprintf;
using ::snprintf;
using ::ungetc;
using ::sscanf;
using ::perror;
using ::vprintf;
using ::vfprintf;
using ::vsprintf;
using ::avsprintf;
using ::vsnprintf;
using ::vsscanf;
using ::fdopen;
using ::statfs;
}
+5 -1
View File
@@ -197,6 +197,7 @@
/* GCC supports both types double and long long */
# define CONFIG_HAVE_LONG_LONG 1
# define CONFIG_HAVE_FLOAT 1
# define CONFIG_HAVE_DOUBLE 1
# define CONFIG_HAVE_LONG_DOUBLE 1
@@ -301,6 +302,7 @@
/* SDCC does not support type long long or type double */
# undef CONFIG_HAVE_LONG_LONG
# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
@@ -406,6 +408,7 @@
*/
# undef CONFIG_HAVE_LONG_LONG
# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
@@ -441,8 +444,9 @@
# undef CONFIG_LONG_IS_NOT_INT
# undef CONFIG_PTR_IS_NOT_INT
# undef CONFIG_HAVE_INLINE
# define inline
# define inline 1
# undef CONFIG_HAVE_LONG_LONG
# define CONFIG_HAVE_FLOAT 1
# undef CONFIG_HAVE_DOUBLE
# undef CONFIG_HAVE_LONG_DOUBLE
# undef CONFIG_CAN_PASS_STRUCTS
+27
View File
@@ -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
View File
@@ -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
+5
View File
@@ -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
------------
+3
View File
@@ -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