23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109180
|
|
Avoid the following undefined reference:
|
|
|
|
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__x() const [clone .localalias]':
|
|
locale.cpp:(.text._ZNKSt3__120__time_get_c_storageIcE3__xEv+0xb4): undefined reference to `std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()'
|
|
/usr/lib/gcc/armv7l-linux-gnueabihf/12.2.0/../../../../armv7l-linux-gnueabihf/bin/ld: projects/libcxx/src/CMakeFiles/cxx_shared.dir/locale.cpp.o: in function `std::__1::__time_get_c_storage<char>::__X() const [clone .localalias]':
|
|
|
|
--- a/libcxx/src/CMakeLists.txt
|
|
+++ b/libcxx/src/CMakeLists.txt
|
|
@@ -155,6 +155,12 @@ if (LIBCXX_GENERATE_COVERAGE AND NOT LIB
|
|
endif()
|
|
add_library_flags_if(LIBCXX_COVERAGE_LIBRARY "${LIBCXX_COVERAGE_LIBRARY}")
|
|
|
|
+set(VOID_GCC_BUG_109180_WORKAROUND OFF CACHE BOOL "")
|
|
+
|
|
+if (VOID_GCC_BUG_109180_WORKAROUND)
|
|
+ set_source_files_properties(string.cpp PROPERTIES COMPILE_FLAGS -fno-inline)
|
|
+endif()
|
|
+
|
|
if (APPLE AND LLVM_USE_SANITIZER)
|
|
if (("${LLVM_USE_SANITIZER}" STREQUAL "Address") OR
|
|
("${LLVM_USE_SANITIZER}" STREQUAL "Address;Undefined") OR
|