Skip to content

Commit 2390eb2

Browse files
committed
c33: weakly implement __cxa_pure_virtual to slim down build
1 parent 2e7864d commit 2390eb2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: cores/arduino/main.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,12 @@ extern "C" {
134134

135135
//Declared weak in Arduino.h to allow user redefinitions.
136136
int atexit(void (*func)()) { return 0; }
137+
138+
namespace __gnu_cxx {
139+
void __verbose_terminate_handler() { }
140+
}
141+
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void);
142+
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void)
143+
{
144+
exit(1);
145+
}

0 commit comments

Comments
 (0)