aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/test-session.cpp7
-rw-r--r--wirish/cxxabi-compat.cpp6
2 files changed, 6 insertions, 7 deletions
diff --git a/examples/test-session.cpp b/examples/test-session.cpp
index b760d97..3d86dc6 100644
--- a/examples/test-session.cpp
+++ b/examples/test-session.cpp
@@ -527,10 +527,3 @@ int main(void) {
return 0;
}
-/* Required for C++ hackery */
-/* TODO: This really shouldn't go here... move it later
- * */
-extern "C" void __cxa_pure_virtual(void) {
- while(1)
- ;
-}
diff --git a/wirish/cxxabi-compat.cpp b/wirish/cxxabi-compat.cpp
new file mode 100644
index 0000000..516b112
--- /dev/null
+++ b/wirish/cxxabi-compat.cpp
@@ -0,0 +1,6 @@
+/* We compile with nodefaultlibs, so we need to provide an error
+ * handler for an empty pure virtual function */
+extern "C" void __cxa_pure_virtual(void) {
+ while(1)
+ ;
+}