On Mon, 28 Nov 2022 at 10:10, Jonathan Wakely wrote: > > > On Mon, 28 Nov 2022 at 06:07, François Dumont via Libstdc++ < > libstdc++@gcc.gnu.org> wrote: > >> This patch is fixing those tests: >> >> 20_util/to_chars/float128_c++23.cc >> std/format/formatter/requirements.cc >> std/format/functions/format.cc >> std/format/functions/format_to_n.cc >> std/format/functions/size.cc >> std/format/functions/vformat_to.cc >> std/format/string.cc >> >> Note that symbols used in for __ibm128 and __iee128 are untested. >> >> I even wonder if the normal mode ones are because I cannot find the >> symbols used in gnu.ver. >> >> >> libstdc++: [_GLIBCXX_INLINE_VERSION] Add to_chars/from_chars >> symbols export >> >> libstdc++-v3/ChangeLog >> >> * include/std/format [_GLIBCXX_INLINE_VERSION](to_chars): >> Adapt __asm symbol >> specifications. >> * config/abi/pre/gnu-versioned-namespace.ver: Add >> to_chars/from_chars symbols >> export. >> >> Ok to commit ? >> >> > > Why are changes needed to the linker script? > > Those functions should already match the general wildcard: > > # Names inside the 'extern' block are demangled names. > extern "C++" > { > std::*; > std::__8::*; > }; > > > Instead of nine separate #if blocks, can we just do: #if _GLIBCXX_INLINE_VERSION # define _GLIBCXX_ALIAS(S) __asm("_ZNSt3__8" S) #else # define _GLIBCXX_ALIAS(S) __asm("_ZNSt" S) #endif And then use: _GLIBCXX_ALIAS("8to_charsPcS_eSt12chars_format"); and finally: #undef _GLIBCXX_ALIAS