incubator-nuttx/libs
yinshengkai ad76a4f7a9 libcxxabi: libcxxabi enables exceptions by default
In the following code, even though the application does not use exceptions, an exception is still thrown in libcxx

If libcxxabi is not enabled, the toolchain default implementation will be used. However, arm-gcc does not enable thread
support by default, which will cause errors in a multi-threaded environment.

Therefore, we need to use libcxxabi to ensure normal functions in a multi-threaded environment.

using namespace std;

void foo(bool recur);
int bar(bool recur)
{
  if (recur) {
      foo(false);
  }
  return 0xFAFAFA;
}

void foo(bool recur)
{
  static int i = bar(recur);
  cout << "Static is:" << i << "\n";
}

int main(int argc, char *argv[])
{
  foo(true);
  return 0;
}

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
..
libc global/variables: add g_ prefix to some global variables 2024-09-02 18:23:57 +08:00
libdsp nuttx: resolve various 'FAR' and 'CODE' issues 2024-08-26 10:21:03 +08:00
libm libs/libm: fix epsilon relaxation in log and logf 2024-09-05 10:14:04 +08:00
libnx nxtk: Remove sapce between oprand and operator in nxtk_drawframe.c 2024-07-27 03:11:39 +08:00
libxx libcxxabi: libcxxabi enables exceptions by default 2024-09-06 09:52:33 +08:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00