From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A692385087B; Fri, 8 Sep 2023 17:13:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A692385087B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694193223; bh=E+fXnC/0c+ejvFtdHIyruX+uqAImj19tKs5/WI/9bgY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AE6KW5kq7hBFK+0OiKTAK/oNBHZi6wuj/UsNKhmksC+w7NdVNPCbLjGwDkBKIcp+N fQC1m27SRfuJU+j5AzKRR839ik03bN5PU0zJ2Qz83ivnE0tf7u1FuByzU54zllA3EX B+Xs+On/QDuHoAYPGqg2uqZDbwyaa/97eNA7YrE8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104167] Implement C++20 std::chrono::utc_clock, std::chrono::tzdb etc. Date: Fri, 08 Sep 2023 17:13:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104167 --- Comment #14 from CVS Commits --- The releases/gcc-13 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:294d11837367455499786578377c530a0238b6ca commit r13-7782-g294d11837367455499786578377c530a0238b6ca Author: Jonathan Wakely Date: Thu Aug 31 18:31:32 2023 +0100 libstdc++: Avoid useless dependency on read_symlink from tzdb chrono::tzdb::current_zone uses filesystem::read_symlink, which creates a dependency on the fs_ops.o object in libstdc++.a, which then creates dependencies on several OS functions if --gc-sections isn't used. For more details see PR libstdc++/104167 comment 8 and comment 11. In the cases where that causes linker failures, we probably don't have readlink anyway, so the filesystem::read_symlink call will always fail. Repeat the preprocessor conditions for filesystem::read_symlink in the body of chrono::tzdb::current_zone so that we don't create a dependency on fs_ops.o for a function that will always fail. libstdc++-v3/ChangeLog: * src/c++20/tzdb.cc (tzdb::current_zone): Check configure macros for POSIX readlink before using filesystem::read_symlink. (cherry picked from commit f2eb6132c6951edf7960a82828c571a1b98a1a09)=