diff --git a/configs/sim/README.txt b/configs/sim/README.txt index bc8173fcf5..654ce93146 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -215,6 +215,19 @@ cxxtest b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. + 3. At presenet (2012/11/02), this example builds only with exceptions + disabled (CONFIG_UCLIBCXX_EXCEPTIONS=n). And even then, it will + not run. + + The reason that the example will will not run on the simulator has + to do with when static constructors are enabled: In the simulator + it will attempt to execute the static constructros before main() + starts. BUT... NuttX is not initialized and this results in a crash. + + To really use this example, I will have to think of some way to + postpone running C++ static initializers until NuttX has been + initialied. + mount Description diff --git a/configs/sim/cxxtest/Make.defs b/configs/sim/cxxtest/Make.defs index eba0b31dd5..7b0c524b4f 100644 --- a/configs/sim/cxxtest/Make.defs +++ b/configs/sim/cxxtest/Make.defs @@ -45,7 +45,11 @@ else endif ARCHCPUFLAGS = -fno-builtin -ARCHCPUFLAGSXX = -fno-builtin +ifeq ($(CONFIG_UCLIBCXX_EXCEPTION),y) + ARCHCPUFLAGSXX = -fno-builtin +else + ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions +endif ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHWARNINGSXX = -Wall -Wshadow