maintainer-approval requested: [Bug 277856] devel/boost-all: Adjust range to use llvm from ports : [Attachment 249504] Updated patch file

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 27 Mar 2024 07:12:17 UTC
Yasuhiro Kimura <yasu@freebsd.org> has asked FreeBSD Office Team
<office@FreeBSD.org> for maintainer-approval:
Bug 277856: devel/boost-all: Adjust range to use llvm from ports
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277856

Attachment 249504: Updated patch file
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=249504&action=edit



--- Comment #2 from Yasuhiro Kimura <yasu@freebsd.org> ---
Created attachment 249504
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=249504&action=edit
Updated patch file

Adjust range to use llvm from ports

The reason to use llvm from ports is that there is bug in clang of base system
that causes assertion failure while building devel/boost-libs. The bug is
already fixed with main, stable/14 and stable/13 branches of src repository. So
we need to use llvm from ports only with following conditions.

1. 1500000 <= OSVERSION < 1500017
2. 1400000 <= OSVERSION < 1400509
3. 1300000 <= OSVERSION < 1303502

And commit 3b8c51bd37b0 adjusts the range as above.

But there is a pitfall about it. The assertion failure happens only if base
system is built with WITH_LLVM_ASSERTIONS enabled. By default the option is
enabled with main branch but is disabled with stable/* and releng/* ones. So
the failure happens with -CURRENT even if it is built with default options
settings but doesn't with -STABLE and -RELEASE unless it is built with
WITH_LLVM_ASSERTIONS enabled. IMHO majority of FreeBSD users use -RELEASE, and
seldom -STABLE user enables WITH_LLVM_ASSERTIONS. As a result adjustment with
commit 3b8c51bd37b0 forces -RELEASE and -STABLE users to build llvm port that
is unnecessary to build devel/boost-libs.

So adjust the range so llvm from ports is used by default only if base system
is -CURRENT with the assertion failure unfixed. And as a last resort for
-STABLE and -RELEASE users who enable WITH_LLVM_ASSERTIONS add LLVM_FROM_PORTS
option to devel/boost-libs that forces to use llvm from ports.