From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7ED6C3889E10; Tue, 15 Nov 2022 09:42:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7ED6C3889E10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668505324; bh=TZqhBa7ZvCSUEDxHYw2CHqSA50GOuLc3Xm1VCgVKiAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qsjzlN44RfHni+y7qDDjhk4ygJ4x/YwqAx/SJwgjCJ9GhUFT9id7fGaFB8J5TEEWj nFhLXGCuCCy2l5c4Y2a5pxiipfzy1YrDPgXu9BrnzT6HvxuADumcVgR+PM/mhip1c1 ISubWEYpIeCENcOBTqcUBms9pS+xPQwuWCn6ikm8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107693] undefined reference to `_ZSt8to_charsPcS_DF128_St12chars_formati' std::format does not work on x86_64-w64-mingw32 Date: Tue, 15 Nov 2022 09:42:04 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: cc 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=3D107693 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Can you retry without LTO, so that it is clearer where the undefined refere= nces 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_EESt17= from_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_resul= tPKcS3_RT_St12chars_format.str1.1 + 0 0000000000014a08 0000005400000001 R_X86_64_64 0000000000000000 .rodata._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resul= tPKcS3_RT_St12chars_format.str1.1 + 0 0000000000000861 0000005800000002 R_X86_64_PC32 0000000000000000 .gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_c= hars_resultPKcS3_RT_St12chars_format + 0 00000000000008b5 0000005800000002 R_X86_64_PC32 0000000000000000 .gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_c= hars_resultPKcS3_RT_St12chars_format + 14 84: 0000000000000000 0 SECTION LOCAL DEFAULT 81 .rodata._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resul= tPKcS3_RT_St12chars_format.str1.1 87: 0000000000000000 730 FUNC LOCAL DEFAULT 84 _ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_R= T_St12chars_format 88: 0000000000000000 0 SECTION LOCAL DEFAULT 86 .gcc_except_table._ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_c= hars_resultPKcS3_RT_St12chars_format 89: 0000000000000000 26 FUNC LOCAL DEFAULT 82 _ZNSt12_GLOBAL__N_117from_chars_strtodIDF128_EESt17from_chars_resultPKcS3_R= T_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_St8optionalI= iE.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_St12ch= ars_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_St12cha= rs_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 mo= de 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 typ= e. #if defined _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __FLT128_MANT_DIG__ =3D= =3D 113 // Define overloads of std::to_chars for __float128. # define FLOAT128_TO_CHARS 1 using F128_type =3D __float128; #elif __FLT128_MANT_DIG__ =3D=3D 113 && __LDBL_MANT_DIG__ !=3D 113 \ && defined(__GLIBC_PREREQ) # define FLOAT128_TO_CHARS 1 using F128_type =3D _Float128; #else using F128_type =3D void; #endif So, does mingw predefine __GLIBC_PREREQ somewhere or how comes this is enab= led at all for you?=