mirror of https://github.com/ARMmbed/mbed-os.git
__cxa_pure_virtual changes
- rename stdio.cpp to retarget.cpp, since it doesn't contain only stdio-related code - move __cxa_pure_virtual from exit.c to retarget.cpp where it belongs.pull/17/merge
parent
0c5d3548d1
commit
df5a993197
|
@ -15,7 +15,6 @@
|
|||
*/
|
||||
#include "semihost_api.h"
|
||||
#include "mbed_interface.h"
|
||||
#include "toolchain.h"
|
||||
|
||||
#ifdef TOOLCHAIN_GCC_CW
|
||||
// TODO: Ideally, we would like to define directly "_ExitProcess"
|
||||
|
@ -35,9 +34,3 @@ void exit(int return_code) {
|
|||
|
||||
while (1);
|
||||
}
|
||||
|
||||
WEAK void __cxa_pure_virtual(void);
|
||||
WEAK void __cxa_pure_virtual(void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "FileSystemLike.h"
|
||||
#include "FilePath.h"
|
||||
#include "serial_api.h"
|
||||
#include "toolchain.h"
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(__ARMCC_VERSION)
|
||||
|
@ -386,4 +387,9 @@ namespace __gnu_cxx {
|
|||
error("Exception");
|
||||
}
|
||||
}
|
||||
extern "C" WEAK void __cxa_pure_virtual(void);
|
||||
extern "C" WEAK void __cxa_pure_virtual(void) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue