public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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
@ 2024-02-01  7:14 youremailsarecrap at gmail dot com
  2024-02-01  7:18 ` [Bug target/113700] " pinskia at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: youremailsarecrap at gmail dot com @ 2024-02-01  7:14 UTC (permalink / raw)
  To: gcc-bugs

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

            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=57277&action=edit
_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=native -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 links
to the so files
to cause the error.

-march=native is used since sse2 seems to be needed for f16 and bf16 on x86
platforms if I
understand the half-precision doc in gcc correctly, I used a system with sse2
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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-02-06  9:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-01  7:14 [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 youremailsarecrap at gmail dot com
2024-02-01  7:18 ` [Bug target/113700] " pinskia at gcc dot gnu.org
2024-02-01  7:57 ` youremailsarecrap at gmail dot com
2024-02-01 15:17 ` ro at gcc dot gnu.org
2024-02-01 16:27 ` youremailsarecrap at gmail dot com
2024-02-02  9:27 ` ro at gcc dot gnu.org
2024-02-02 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-02-02 10:23 ` jakub at gcc dot gnu.org
2024-02-02 10:24 ` jakub at gcc dot gnu.org
2024-02-02 10:51 ` cvs-commit at gcc dot gnu.org
2024-02-06  9:01 ` ro at gcc dot gnu.org
2024-02-06  9:07 ` iains at gcc dot gnu.org
2024-02-06  9:21 ` cvs-commit at gcc dot gnu.org
2024-02-06  9:23 ` ro at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).