From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B2A0A3857718; Fri, 1 Sep 2023 11:17:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2A0A3857718 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693567020; bh=nNiMO92kftxtPeihq6l/rWn/O8tCxeVsBUMcGtIZIjo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xTa6WI96cNEJ9T9Hzc6NGqW+dovkyke1hzrxGRAbYHDsuxygKR/xS7QhdV/3JH5Co q5rxpk5kt7q2tn79sR9My3MU2gXNLH1QcRgJba74ebvWnREygLYBvfqevU0q4xZqHp mUdHpnbpqNZDtTYlLf3MO8ZQHzyISId0agtkr9RY= 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, 01 Sep 2023 11:16:54 +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 #13 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:f2eb6132c6951edf7960a82828c571a1b98a1a09 commit r14-3616-gf2eb6132c6951edf7960a82828c571a1b98a1a09 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.=