From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 650E6389EC52; Wed, 16 Mar 2022 17:34:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 650E6389EC52 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103407] [12 regression] abi_check FAILs on Solaris Date: Wed, 16 Mar 2022 17:34:46 +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: ABI, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 17:34:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103407 --- Comment #12 from Jonathan Wakely --- I tried this instead, but I think this still counts as "binding the same sy= mbol to different versions", and didn't work: #if defined __sun__ && defined _GLIBCXX_HAVE_USELOCALE #if defined(_GLIBCXX_SYMVER_SUN) && defined(_GLIBCXX_SHARED) \ && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) // Solaris 11.4 supports uselocale, so std::from_chars is present since gcc= -11 // with symbol version GLIBCXX_3.4.29. Solaris 11.3 does not support useloc= ale // so std::from_chars is not present until gcc-12, with version GLIBCXX_3.4= .30. // Define aliases so that code linked on Solaris 11.3 runs on 11.4 too. from_chars_result __from_chars_compat(const char* first, const char* last, double& value, chars_format fmt) noexcept { return std::from_chars(first, last, value, fmt); } asm(".symver _ZSt19__from_chars_compatPKcS0_RdSt12chars_format, _ZSt10from_charsPKcS0_RdSt12chars_formaT@GLIBCXX_3.4.30"); from_chars_result __from_chars_compat(const char* first, const char* last, long double& value, chars_format fmt) noexcept { return std::from_chars(first, last, value, fmt); } asm(".symver _ZSt19__from_chars_compatPKcS0_ReSt12chars_format, _ZSt10from_charsPKcS0_ReSt12chars_formaT@GLIBCXX_3.4.30"); from_chars_result __from_chars_compat(const char* first, const char* last, float& value, chars_format fmt) noexcept { return std::from_chars(first, last, value, fmt); } asm(".symver _ZSt19__from_chars_compatPKcS0_RfSt12chars_format, _ZSt10from_charsPKcS0_RfSt12chars_formaT@GLIBCXX_3.4.30"); #endif #endif This does get compiled, but I don't see those @GLIBCXX_3.4.30 symbols in the DSO. Maybe I'm missing something that would make them exported as global symbols, or maybe this just can't be done on Solaris.=