diff --git a/libstdc++-v3/libsupc++/eh_ptr.cc b/libstdc++-v3/libsupc++/eh_ptr.cc index 5d8ac1d879a..5c4685606fe 100644 --- a/libstdc++-v3/libsupc++/eh_ptr.cc +++ b/libstdc++-v3/libsupc++/eh_ptr.cc @@ -25,11 +25,15 @@ #include #include "eh_atomics.h" -#if ! _GLIBCXX_INLINE_VERSION // This macro causes exception_ptr to declare an older API (with corresponding -// definitions in this file) and to mark some inline functions as "used" so -// that definitions will be emitted in this translation unit. +// definitions in this file). #define _GLIBCXX_EH_PTR_COMPAT + +#if ! _GLIBCXX_INLINE_VERSION +// This macro causes some inline functions in exception_ptr to be marked +// as "used" so that definitions will be emitted in this translation unit. +// We need this because those functions were not inline in previous releases. +#define _GLIBCXX_EH_PTR_RELOPS_COMPAT #endif #include diff --git a/libstdc++-v3/libsupc++/exception_ptr.h b/libstdc++-v3/libsupc++/exception_ptr.h index 6d41b34fabe..9943668d9b3 100644 --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -39,7 +39,7 @@ #include #include -#ifdef _GLIBCXX_EH_PTR_COMPAT +#ifdef _GLIBCXX_EH_PTR_RELOPS_COMPAT # define _GLIBCXX_EH_PTR_USED __attribute__((__used__)) #else # define _GLIBCXX_EH_PTR_USED @@ -153,7 +153,7 @@ namespace std #endif #if __cpp_impl_three_way_comparison >= 201907L \ - && ! defined _GLIBCXX_EH_PTR_COMPAT + && ! defined _GLIBCXX_EH_PTR_RELOPS_COMPAT friend bool operator==(const exception_ptr&, const exception_ptr&) noexcept = default; #else