public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-4875] libstdc++: Fix Darwin bootstrap error in src/c++20/tzdb.cc Date: Fri, 23 Dec 2022 13:46:00 +0000 (GMT) [thread overview] Message-ID: <20221223134600.631E03858D1E@sourceware.org> (raw) https://gcc.gnu.org/g:b358521b608f36409281a51263ace3155d28f54d commit r13-4875-gb358521b608f36409281a51263ace3155d28f54d Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Dec 23 13:43:52 2022 +0000 libstdc++: Fix Darwin bootstrap error in src/c++20/tzdb.cc Mach-O requires weak symbols to have a definition, so add a default implementation of __gnu_cxx::zoneinfo_dir_override. libstdc++-v3/ChangeLog: * src/c++20/tzdb.cc [__APPLE__] (zoneinfo_dir_override): Add definition. Diff: --- libstdc++-v3/src/c++20/tzdb.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/src/c++20/tzdb.cc b/libstdc++-v3/src/c++20/tzdb.cc index a02bcd4aec7..5f5c4199f65 100644 --- a/libstdc++-v3/src/c++20/tzdb.cc +++ b/libstdc++-v3/src/c++20/tzdb.cc @@ -52,6 +52,10 @@ # endif #endif +#ifndef _GLIBCXX_ZONEINFO_DIR +# define _GLIBCXX_ZONEINFO_DIR "/usr/share/zoneinfo" +#endif + namespace __gnu_cxx { #ifdef _AIX @@ -59,6 +63,12 @@ namespace __gnu_cxx const char* (*zoneinfo_dir_override)() = nullptr; #else [[gnu::weak]] const char* zoneinfo_dir_override(); + +#ifdef __APPLE__ + // Need a weak definition for Mach-O. + [[gnu::weak]] const char* zoneinfo_dir_override() + { return _GLIBCXX_ZONEINFO_DIR; } +#endif #endif } @@ -934,9 +944,6 @@ namespace std::chrono return info; } -#ifndef _GLIBCXX_ZONEINFO_DIR -# define _GLIBCXX_ZONEINFO_DIR "/usr/share/zoneinfo" -#endif namespace { string
reply other threads:[~2022-12-23 13:46 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221223134600.631E03858D1E@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).