Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Dec 2022 14:11:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268196] devel/llvm1[2-5]: fix build with clang 15
Message-ID:  <bug-268196-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268196

            Bug ID: 268196
           Summary: devel/llvm1[2-5]: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: dim@FreeBSD.org

When building llvm12 through llvm15 with clang 15 as host compiler (see bug
265425), and when compiler-rt is enabled, there will be errors due to float=
16
support, similar to:

    In file included from
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/li=
b/builtins/extendhfsf2.c:11:
    In file included from
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/li=
b/builtins/fp_extend_impl.inc:38:
=20=20=20
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/li=
b/builtins/fp_extend.h:44:9:
error: _Float16 is not supported on this target
    typedef _Float16 src_t;
            ^

This is because compiler-rt's CMake infrastructure detects float16 support =
at
configure time, while targeting 'pure' x86_64, but then builds parts of its
tree also targeting i386.

To work around this, modify compiler-rt's top-level CMakeLists.txt to move
setting the -DCOMPILER_RT_HAS_FLOAT16 compilation flag to the arch-specific=
 for
loop, so it only gets enabled for x86_64, and not for
i386.

For llvm15, also add another modification that removes the bfloat16 source
files from the i386_SOURCES list, so these are not built for i386.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268196-7788>