This custom version of uClibc++ resides in the NuttX repository in the https://bitbucket.org/nuttx/uclibc/ directory rather than in the main NuttX source tree due to licensing issues: NuttX is licensed under the permissive modified BSD License; uClibc++, on the other hand, is licensed under the stricter GNU LGPL Version 3 license.
General build instructions are available in the uClibc++ README.txt file. Those instructions are not repeated here. This Wiki page is devoted to documenting resolution of issues with building this NuttX version of uClib++.
Problem: When building uClibc++ I encounter an undefined reference to
LD: nuttx .../arm-none-eabi/lib/armv7e-m\libsupc++.a(vterminate.o): In function `__gnu_cxx::__verbose_terminate_handler()': vterminate.cc:(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xfc): undefined reference to `_impure_ptr'
Solution: No good solution is known. The following works, however:
Locate Get the directory where you can find
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -print-file-name=libsupc++.a
Go to that directory and save a copy of
vterminate.o (in case you want to restore it later):
cd <the-directory-containing-libsupc++.a> arm-none-eabi-ar.exe -x libsupc++.a vterminate.o
vterminate.o from the library. At build time, the
uClibc++ package will provide a usable replacement
arm-none-eabi-ar.exe -d libsupc++.a vterminate.o
Now NuttX should link with no problem. If you want to restore the
vterminate.o that you removed from
libsupc++, you can do that with:
arm-none-eabi-ar.exe rcs libsupc++.a vterminate.o