]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix bootstrap failure with --enable-vtable-verify [PR118981]
authorJonathan Wakely <jwakely@redhat.com>
Sat, 22 Feb 2025 21:02:29 +0000 (21:02 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 22 Feb 2025 22:51:33 +0000 (22:51 +0000)
The compiler emits code with init_priority(99) for -fvtable-verify=std
and that creates a section conflict with the uses of init_priority(99)
that I recently added to src/c++20/tzdb.cc.

Change tzdb.cc to use a different priority to avoid the conflict.

libstdc++-v3/ChangeLog:

PR c++/118981
* src/c++20/tzdb.cc: Use init_priority(98) instead of
init_priority(99).

libstdc++-v3/src/c++20/tzdb.cc

index c3bb6a12ccc101b52b8d7c0e19bb4cbb2ef340dd..9cf9eeccc599945d67ca8ef46028c439d74cb05c 100644 (file)
@@ -181,14 +181,14 @@ namespace std::chrono
 
 #pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
 
-  [[gnu::init_priority(99)]]
+  [[gnu::init_priority(98)]]
   constinit tzdb_list tzdb_list::_Node::_S_the_list(nullptr);
 
-  [[gnu::init_priority(99)]]
+  [[gnu::init_priority(98)]]
   constinit tzdb_list::_Node::head_ptr tzdb_list::_Node::_S_head_owner{nullptr};
 
 #if USE_ATOMIC_LIST_HEAD
-  [[gnu::init_priority(99)]]
+  [[gnu::init_priority(98)]]
   constinit atomic<tzdb_list::_Node*> tzdb_list::_Node::_S_head_cache{nullptr};
 #endif