From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 335343858298; Mon, 4 Sep 2023 20:45:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 335343858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693860301; bh=8/mJEDfe2GgyWO6GylkD7jnZYg2+GbSVsZnAKtWBRzs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EC9kr+H0jPuCoNA/DhJrPD6ai3H/wEZgHGMIPl0o3ZScRjSMv+Sxwf5Q9nN371uTC onqJ6bM2/TcO4axKZiooKaYMRQBhyfdiRnLMj3V75BqA2cPnpb/yJDyLikJ754tfr9 hhrzwsAxQtAZgwIahrENuHqPZvr+Xd+zXmU0JOJ0= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111238] libstdc++ tests should use -Wl,-gc-sections in more configurations Date: Mon, 04 Sep 2023 20:44:59 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D111238 --- Comment #1 from CVS Commits --- The master branch has been updated by Christophe Lyon : https://gcc.gnu.org/g:56d0592db19b69e3cc217fabe5c2f8be3a75a8cf commit r14-3660-g56d0592db19b69e3cc217fabe5c2f8be3a75a8cf Author: Christophe Lyon Date: Thu Aug 31 13:50:16 2023 +0000 libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238) As discussed in PR104167 (comments #8 and below), and PR111238, using -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi (cross-toolchain) avoids link failures for a few tests: 27_io/filesystem/path/108636.cc std/time/clock/gps/1.cc std/time/clock/gps/io.cc std/time/clock/tai/1.cc std/time/clock/tai/io.cc std/time/clock/utc/1.cc std/time/clock/utc/io.cc std/time/clock/utc/leap_second_info.cc std/time/exceptions.cc std/time/format.cc std/time/time_zone/get_info_local.cc std/time/time_zone/get_info_sys.cc std/time/tzdb/1.cc std/time/tzdb/leap_seconds.cc std/time/tzdb_list/1.cc std/time/zoned_time/1.cc std/time/zoned_time/custom.cc std/time/zoned_time/io.cc std/time/zoned_traits.cc This patch achieves this by calling GLIBCXX_CHECK_LINKER_FEATURES in cross-build cases, like we already do for native builds. We keep not doing so in Canadian-cross builds. However, this would hide the fact that libstdc++ somehow forces the user to use -Wl,-gc-sections to avoid undefined references to chdir, mkdir, chmod, pathconf, ... so maybe it's better to keep the status quo and not apply this patch? 2023-08-31 Christophe Lyon libstdc++-v3/ChangeLog: PR libstdc++/111238 * configure: Regenerate. * configure.ac: Call GLIBCXX_CHECK_LINKER_FEATURES in cross, non-Canadian builds.=