Commit Graph

13 Commits

Author SHA1 Message Date
yinshengkai 6d39b248a4 libcxxabi: fix compilation warnings
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
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
yinshengkai b721f2c84e libcxx: Disable dynamic type checking when enabling libcxxabi
It results in a recursive call, cxxabiv1::__dynamic_case -> is_equal -> __ubsan::checkDynamic -> cxxabiv1::__dynamic_case

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-06 09:52:33 +08:00
wangmingrong d4b5991589 libcxxabi: Path <cxxabi.h> not found
./helloxx_main.cxx:29:10: fatal error: cxxabi.h: No such file or directory
   29 | #include <cxxabi.h>
      |          ^~~~~~~~~~
CONFIG_LIBCXXABI is turned on, but the library include is not linked to nuttx/include, causing the compilation to fail.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-03-14 22:47:55 +08:00
Stuart Ianna 4f90a6140c libcxx: Remove exiting patches and update libcxx version to 15.0.7
- Add __config_site for NuttX.
   In libcxx 12.0.0. CMake concatenated __config_site with _config,
   which enabled NuttX to build without its inclusion. In 15.0.7, this
   file is configured by CMake and included explicitly in __config.
 - Add additional include directories.
 - Mute always_inline warning.
 - Make the download of libcxx/libcxxabi configurable
2023-09-24 08:40:10 +03:00
Karel Kočí 62661600b2 treewide: add DOWNLOAD variable as unification of curl call
This is a followup to the commit
03b164f59c.
2023-03-08 17:05:05 +08:00
yinshengkai 95d9abcf58 tools: replace DEFINE script to Makefile variable
In the past, predefined macros were generated by define.sh scripts
Now they are generated by concatenating environment variables

In this way, when executing makefile, no shell command will be executed,
it will improve the speed of executing makfile

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-03 19:59:55 +08:00
Huang Qi e0185faa78 Don't download tarballs if a local git repo found
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-28 03:07:58 +08:00
Gustavo Henrique Nihei c260fee516 libs/libxx: Enforce RTTI for building libcxxabi
It is okay for the application to be built without RTTI (-fno-rrti), but
libcxxabi requires RTTI at least for the library.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-09-01 21:02:17 +08:00
Xiang Xiao ce73f9cbfc libxx: Move libcxxabi special setting from libcxx.defs to libcxxabi.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 10:44:24 +02:00
Xiang Xiao 397d329966 libxx: Give VERSION make variable prefix to avoid the conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-30 10:44:24 +02:00
Xiang Xiao 95ff2e16a3 libcxxabi: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 17:13:43 -03:00
zhuyanlin 7f48d13c47 libc:libxx: add new low level c++ standard library support
LLVM libc++abi is a new implementation of low level support for
a standard C++ library.

Change-Id: Ica9c81bd96fd27b169a06e352b0c394d47aed5b6
2021-08-26 19:32:24 +08:00