bouvrais wrote:
- Would libstdc++ need to be recompiled with -mlongcalls? Why is that not the default (or is it and something else explains this)?
Yes, but currently crosstool-NG does not support that. Will fix that soon.
Explore... Chat... Share...
bouvrais wrote:
- Would libstdc++ need to be recompiled with -mlongcalls? Why is that not the default (or is it and something else explains this)?
bouvrais wrote:I had to stub some libc functions on which libstdc++ rely and are not provided with the toolchain.
void * operator new(size_t size);
void operator delete(void * ptr);
__extension__ typedef int __guard __attribute__((mode (__DI__)));
extern "C" int __cxa_guard_acquire(__guard *);
extern "C" void __cxa_guard_release(__guard *);
extern "C" void __cxa_guard_abort(__guard *);
extern "C" void __cxa_pure_virtual(void);
#if defined(__xtensa__)
extern "C"
void abort()
{
while (1)
;
}
#endif
void *
operator new(size_t size)
{
return(os_malloc(size));
}
void *
operator new[](size_t size)
{
return(os_malloc(size));
}
void
operator delete(void *ptr)
{
if (ptr)
os_free(ptr);
}
void
operator delete[](void *ptr)
{
zbMemFree(ptr);
}
int
__cxa_guard_acquire(__guard *g)
{
return(!*(char *)(g));
}
void
__cxa_guard_release(__guard *g)
{
*(char *)g = 1;
}
void
__cxa_guard_abort(__guard *)
{
#if !defined(__AVR__)
abort();
#endif
}
void
__cxa_pure_virtual(void)
{
#if !defined(__AVR__)
abort();
#endif
}
void
__cxa_deleted_virtual(void)
{
#if !defined(__AVR__)
abort();
#endif
}
dkinzer wrote:Are these the routines to which you refer?Code: Select allvoid * operator new(size_t size);
void operator delete(void * ptr);
__extension__ typedef int __guard __attribute__((mode (__DI__)));
extern "C" int __cxa_guard_acquire(__guard *);
extern "C" void __cxa_guard_release(__guard *);
extern "C" void __cxa_guard_abort(__guard *);
extern "C" void __cxa_pure_virtual(void);
#if defined(__xtensa__)
extern "C"
void abort()
{
while (1)
;
}
#endif
void *
operator new(size_t size)
{
return(os_malloc(size));
}
void *
operator new[](size_t size)
{
return(os_malloc(size));
}
void
operator delete(void *ptr)
{
if (ptr)
os_free(ptr);
}
void
operator delete[](void *ptr)
{
zbMemFree(ptr);
}
int
__cxa_guard_acquire(__guard *g)
{
return(!*(char *)(g));
}
void
__cxa_guard_release(__guard *g)
{
*(char *)g = 1;
}
void
__cxa_guard_abort(__guard *)
{
#if !defined(__AVR__)
abort();
#endif
}
void
__cxa_pure_virtual(void)
{
#if !defined(__AVR__)
abort();
#endif
}
void
__cxa_deleted_virtual(void)
{
#if !defined(__AVR__)
abort();
#endif
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]