From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6A6F43858CD1; Thu, 1 Feb 2024 07:14:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A6F43858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706771673; bh=Bof8i3tUpT397fi5Ua4E05RCl6XV7qu6z00P2bkdmXU=; h=From:To:Subject:Date:From; b=VW47C0ae4LzPX6m79atOvcMjgmEmPkwUJUfGZ0mgnvnNVAIUdyQ+jnjzt/Kp9WINE 5npouY9HWY93Tb4p4oUIM5HdU3vYFe9iedbJ/ZjOcbPg5o08B59Rzkue9Hmx4QZXyS MLIiCQ9om13inUE0qpl2KqjyJTi7hpChQQ5XYwJ4= From: "youremailsarecrap at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/113700] New: libgcc_s does not include symbols for _Float16 and __bf16 on Solaris/Illumos even though gcc generates code for _Float16 and __bf16 Date: Thu, 01 Feb 2024 07:14:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: youremailsarecrap at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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=3D113700 Bug ID: 113700 Summary: libgcc_s does not include symbols for _Float16 and __bf16 on Solaris/Illumos even though gcc generates code for _Float16 and __bf16 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: youremailsarecrap at gmail dot com Target Milestone: --- Created attachment 57277 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57277&action=3Dedit _Float16 and __bf16 that breaks on Illumos When compiling the code included in the .ii files on illumos the output claims that it can't find the symbols __extendhfdf2, __extendbfsf2 and __truncsfbf2 . Command line and output: g++ -march=3Dnative -shared -shared-libgcc -fPIC -Wl,--no-undefined -o f16-bf16.so f16-bf16.cc Undefined first referenced symbol in file __extendhfdf2 f16-bf16.so-f16-bf16.o __extendbfsf2 f16-bf16.so-f16-bf16.o __truncsfbf2 f16-bf16.so-f16-bf16.o ld: fatal: symbol referencing errors. No output written to f16-bf16.so collect2: error: ld returned 1 exit status The -Wl,--no-undefined is used here to not have create a executable that li= nks to the so files to cause the error. -march=3Dnative is used since sse2 seems to be needed for f16 and bf16 on x= 86 platforms if I understand the half-precision doc in gcc correctly, I used a system with ss= e2 when compiling this. My own fix, that may not be correct: I tried to add the gcc12 and up parts of libgcc/config/i386/libgcc-glibc.ver to libgcc/config/i386/libgcc-sol2.ver rebuilt gcc and then it linked correctly. Some maintainer could take a look at that.=