Skip to content

Commit 6bff1eb

Browse files
philnik777tru
authored andcommitted
[libc++][libunwind] Fixes to allow GCC 13 to compile libunwind/libc++abi/libc++
These are changes to allow GCC 13 to successfully compile the runtimes stack. Reviewed By: ldionne, #libc, #libunwind, MaskRay Spies: MaskRay, zibi, SeanP, power-llvm-team, mstorsjo, arichardson, libcxx-commits Differential Revision: https://reviews.llvm.org/D151387 (cherry picked from commit 3537338)
1 parent 3a2aea9 commit 6bff1eb

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

libcxx/include/__type_traits/remove_cv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

22-
#if __has_builtin(__remove_cv)
22+
#if __has_builtin(__remove_cv) && !defined(_LIBCPP_COMPILER_GCC)
2323
template <class _Tp>
2424
struct remove_cv {
2525
using type _LIBCPP_NODEBUG = __remove_cv(_Tp);

libcxx/include/__type_traits/remove_cvref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if __has_builtin(__remove_cvref)
23+
#if __has_builtin(__remove_cvref) && !defined(_LIBCPP_COMPILER_GCC)
2424
template <class _Tp>
2525
using __remove_cvref_t _LIBCPP_NODEBUG = __remove_cvref(_Tp);
2626
#else

libunwind/src/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ endif()
8080

8181
# Setup flags.
8282
add_link_flags_if(CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG --unwindlib=none)
83-
if (CXX_SUPPORTS_NOSTDLIBXX_FLAG)
84-
add_link_flags_if_supported(-nostdlib++)
85-
else()
86-
add_link_flags_if_supported(-nodefaultlibs)
87-
endif()
8883

8984
# MINGW_LIBRARIES is defined in config-ix.cmake
9085
add_library_flags_if(MINGW "${MINGW_LIBRARIES}")

0 commit comments

Comments
 (0)