Skip to content

Commit

Permalink
c33: weakly implement __cxa_pure_virtual to slim down build
Browse files Browse the repository at this point in the history
  • Loading branch information
facchinm committed Jun 19, 2023
1 parent 2e7864d commit 2390eb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cores/arduino/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,12 @@ extern "C" {

//Declared weak in Arduino.h to allow user redefinitions.
int atexit(void (*func)()) { return 0; }

namespace __gnu_cxx {
void __verbose_terminate_handler() { }
}
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void);
extern "C" __attribute__((weak)) void __cxa_pure_virtual(void)
{
exit(1);
}

0 comments on commit 2390eb2

Please sign in to comment.