https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107693

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can you retry without LTO, so that it is clearer where the undefined references
come from?  from_chars/to_chars is on Linux supported even for _Float128.
readelf -Wrs libstdc++.a | grep DF128_ | grep -v '\.text\.'
Relocation section
'.rela.gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format'
at offset 0x67ce0 contains 2 entries:
0000000000013b0d  0000005400000001 R_X86_64_64            0000000000000000
.rodata._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format.str1.1
+ 0
0000000000014a08  0000005400000001 R_X86_64_64            0000000000000000
.rodata._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format.str1.1
+ 0
0000000000000861  0000005800000002 R_X86_64_PC32          0000000000000000
.gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format
+ 0
00000000000008b5  0000005800000002 R_X86_64_PC32          0000000000000000
.gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format
+ 14
    84: 0000000000000000     0 SECTION LOCAL  DEFAULT   81
.rodata._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format.str1.1
    87: 0000000000000000   730 FUNC    LOCAL  DEFAULT   84
_ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format
    88: 0000000000000000     0 SECTION LOCAL  DEFAULT   86
.gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format
    89: 0000000000000000    26 FUNC    LOCAL  DEFAULT   82
_ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_RT_St12chars_format.cold
   182: 0000000000000000     9 FUNC    GLOBAL DEFAULT   88
_ZSt10from_charsPKcS0_RDF128_St12chars_format
0000000000029bb0  0000004700000001 R_X86_64_64            0000000000000000
.rodata._ZSt29__floating_to_chars_precisionIDF128_ESt15to_chars_resultPcS1_T_St12chars_formati.str1.1
+ 0
0000000000029c0d  0000004700000001 R_X86_64_64            0000000000000000
.rodata._ZSt29__floating_to_chars_precisionIDF128_ESt15to_chars_resultPcS1_T_St12chars_formati.str1.1
+ 0
0000000000037ed9  0000006300000001 R_X86_64_64            0000000000000000
.rodata._ZSt28__floating_to_chars_shortestIDF128_ESt15to_chars_resultPcS1_T_St12chars_format.part.0.str1.1
+ 0
0000000000037f25  0000006300000001 R_X86_64_64            0000000000000000
.rodata._ZSt28__floating_to_chars_shortestIDF128_ESt15to_chars_resultPcS1_T_St12chars_format.part.0.str1.1
+ 0
00000000000007dd  0000007300000002 R_X86_64_PC32          0000000000000000
.gcc_except_table._ZSt8to_charsPcS_DF128_ + 0
00000000000007f9  0000007500000002 R_X86_64_PC32          0000000000000000
.gcc_except_table._ZSt8to_charsPcS_DF128_St12chars_format + 0
000000000000081d  0000007700000002 R_X86_64_PC32          0000000000000000
.gcc_except_table._ZSt8to_charsPcS_DF128_St12chars_formati + 0
     9: 0000000000000000   670 FUNC    LOCAL  DEFAULT   14
_ZSt22__handle_special_valueIDF128_ESt8optionalISt15to_chars_resultEPcS3_T_St12chars_formati
    70: 0000000000000000  1997 FUNC    LOCAL  DEFAULT   69
_ZSt23__floating_to_chars_hexIDF128_ESt15to_chars_resultPcS1_T_St8optionalIiE.isra.0
    71: 0000000000000000     0 SECTION LOCAL  DEFAULT   71
.rodata._ZSt29__floating_to_chars_precisionIDF128_ESt15to_chars_resultPcS1_T_St12chars_formati.str1.1
    73: 0000000000000000  1731 FUNC    LOCAL  DEFAULT   72
_ZSt29__floating_to_chars_precisionIDF128_ESt15to_chars_resultPcS1_T_St12chars_formati
    99: 0000000000000000     0 SECTION LOCAL  DEFAULT   92
.rodata._ZSt28__floating_to_chars_shortestIDF128_ESt15to_chars_resultPcS1_T_St12chars_format.part.0.str1.1
   101: 0000000000000000  5211 FUNC    LOCAL  DEFAULT   93
_ZSt28__floating_to_chars_shortestIDF128_ESt15to_chars_resultPcS1_T_St12chars_format.part.0
   115: 0000000000000000     0 SECTION LOCAL  DEFAULT  114
.gcc_except_table._ZSt8to_charsPcS_DF128_
   117: 0000000000000000     0 SECTION LOCAL  DEFAULT  117
.gcc_except_table._ZSt8to_charsPcS_DF128_St12chars_format
   119: 0000000000000000     0 SECTION LOCAL  DEFAULT  120
.gcc_except_table._ZSt8to_charsPcS_DF128_St12chars_formati
   252: 0000000000000000    20 FUNC    GLOBAL DEFAULT  112
_ZSt8to_charsPcS_DF128_
   255: 0000000000000000    47 FUNC    GLOBAL DEFAULT  115
_ZSt8to_charsPcS_DF128_St12chars_format
   256: 0000000000000000    18 FUNC    GLOBAL DEFAULT  118
_ZSt8to_charsPcS_DF128_St12chars_formati
But the intent was that this would be only enabled if long double is the mode
as _Float128, or for powerpc64le-linux (where it is enabled for some time
already),
or on x86/ia64 if on glibc:
// For now we only support __float128 when it's the powerpc64 __ieee128 type.
#if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __FLT128_MANT_DIG__ == 113
// Define overloads of std::to_chars for __float128.
# define FLOAT128_TO_CHARS 1
using F128_type = __float128;
#elif __FLT128_MANT_DIG__ == 113 && __LDBL_MANT_DIG__ != 113 \
      && defined(__GLIBC_PREREQ)
# define FLOAT128_TO_CHARS 1
using F128_type = _Float128;
#else
using F128_type = void;
#endif

So, does mingw predefine __GLIBC_PREREQ somewhere or how comes this is enabled
at all for you?

Reply via email to