Closed joostn closed 6 years ago
These patches make it possible to link against libstdc++, and use C++ exceptions.
To use c++ exceptions, build a gcc 5.2.0 toolchain from https://github.com/espressif/crosstool-NG with -fexceptions and -frtti enabled. You can use my build script for mac: buildtoolchain.sh.zip
Add the following startup code to your application:
struct register_frame_info_object { long placeholder[ 10 ]; }; extern "C" void __register_frame_info (const void *begin, struct register_frame_info_object *ob); extern char __eh_frame[]; extern "C" void user_init() { static struct register_frame_info_object ob; __register_frame_info( __eh_frame, &ob ); [...] }
More info: https://github.com/jcmvbkbc/crosstool-NG/issues/54 https://github.com/espressif/esp-idf/issues/459 https://github.com/SuperHouse/esp-open-rtos/issues/623
Thank you!
These patches make it possible to link against libstdc++, and use C++ exceptions.
To use c++ exceptions, build a gcc 5.2.0 toolchain from https://github.com/espressif/crosstool-NG with -fexceptions and -frtti enabled. You can use my build script for mac: buildtoolchain.sh.zip
Add the following startup code to your application:
More info: https://github.com/jcmvbkbc/crosstool-NG/issues/54 https://github.com/espressif/esp-idf/issues/459 https://github.com/SuperHouse/esp-open-rtos/issues/623