]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Use Clang attribute instead of __constinit
authorJonathan Wakely <jwakely@redhat.com>
Thu, 20 Jan 2022 11:18:34 +0000 (11:18 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 20 Jan 2022 12:29:29 +0000 (12:29 +0000)
commit109f8af3d3c5424f103ceef5d77f5a447fb931ce
tree633065fdd23980414e253b86cc8f3a8265b86bd7
parent5929f253fcdbf24fd47706dd11aafdeac5e9ecb6
libstdc++: Use Clang attribute instead of __constinit

Clang doesn't support the __constinit extension that we use pre-C++20,
but it does have its own equivalent attribute that can be used instead.

This makes it a little easier to use Clang to build libstdc++ (which
isn't supported. but is sometimes attempted for esoteric targets).

libstdc++-v3/ChangeLog:

* src/c++11/cxx11-ios_failure.cc (__constinit): Define as
equivalent attribute for Clang.
* src/c++11/future.cc (__constinit): Likewise.
* src/c++11/system_error.cc (__constinit): Likewise.
* src/c++17/memory_resource.cc (__constinit): Likewise.
libstdc++-v3/src/c++11/cxx11-ios_failure.cc
libstdc++-v3/src/c++11/future.cc
libstdc++-v3/src/c++11/system_error.cc
libstdc++-v3/src/c++17/memory_resource.cc