diff --git a/components/esp32/abi.cpp b/components/esp32/abi.cpp deleted file mode 100644 index c40dba85e..000000000 --- a/components/esp32/abi.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#include -#include -#include -#include - -// using __cxxabiv1::__guard; - -void *operator new(size_t size) -{ - return malloc(size); -} - -void *operator new[](size_t size) -{ - return malloc(size); -} - -void operator delete(void * ptr) -{ - free(ptr); -} - -void operator delete[](void * ptr) -{ - free(ptr); -} - -extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__)); -extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__)); - -void __cxa_pure_virtual(void) -{ - abort(); -} - -void __cxa_deleted_virtual(void) -{ - abort(); -} - -#if 0 -typedef struct { - uint8_t guard; - uint8_t ps; -} guard_t; - -extern "C" int __cxa_guard_acquire(__guard* pg) -{ - uint8_t ps = xt_rsil(15); - if (reinterpret_cast(pg)->guard) { - xt_wsr_ps(ps); - return 0; - } - reinterpret_cast(pg)->ps = ps; - return 1; -} - -extern "C" void __cxa_guard_release(__guard* pg) -{ - reinterpret_cast(pg)->guard = 1; - xt_wsr_ps(reinterpret_cast(pg)->ps); -} - -extern "C" void __cxa_guard_abort(__guard* pg) -{ - xt_wsr_ps(reinterpret_cast(pg)->ps); -} -#endif - -extern "C" void __cxa_throw_bad_array_new_length() -{ - abort(); -} - -namespace std -{ -void __throw_bad_function_call() -{ - abort(); -} - -void __throw_length_error(char const*) -{ - abort(); -} - -void __throw_bad_alloc() -{ - abort(); -} - -void __throw_logic_error(const char* str) -{ - abort(); -} - -void __throw_out_of_range(const char* str) -{ - abort(); -} -} diff --git a/make/project.mk b/make/project.mk index e2a93ce11..2b8eedeeb 100644 --- a/make/project.mk +++ b/make/project.mk @@ -187,6 +187,7 @@ LDFLAGS ?= -nostdlib \ -Wl,--start-group \ $(COMPONENT_LDFLAGS) \ -lgcc \ + -lstdc++ \ -Wl,--end-group \ -Wl,-EL