1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

devel/boost-{all,libs}: Adjust range of OSVERSION to use LLVM from ports

The reason to use LLVM from ports is that there is bug in Clang/LLVM
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 ranges of OSVERSION.

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

And commit 3b8c51bd37 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 variable set. By
default it is set with main branch but not with stable/* and releng/*
ones. So wheareas the failure happens with -CURRENT even if it is
built with default variables settings, it doesn't happen with -STABLE
and -RELEASE unless they are built with WITH_LLVM_ASSERTIONS set. IMHO
majority of FreeBSD users use -RELEASE with official binary, and few
-STABLE users set WITH_LLVM_ASSERTIONS. As a result adjustment with
commit 3b8c51bd37 forces most -RELEASE and -STABLE users to build
LLVM port unnecessarily.

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 set WITH_LLVM_ASSERTIONS,
add LLVM_FROM_PORTS option to devel/boost-libs that forces to use LLVM
from ports.

PR:		277856
Approved by:	maintainer timeout
This commit is contained in:
Yasuhiro Kimura 2024-04-21 10:14:18 +09:00
parent e8c02a572f
commit c4eb947825
2 changed files with 26 additions and 3 deletions

View File

@ -45,8 +45,9 @@ MAKE_ARGS+= pch=off
.if ${OPSYS} == FreeBSD && \
((${OSVERSION} >= 1500000 && ${OSVERSION} < 1500017) || \
(${OSVERSION} >= 1400000 && ${OSVERSION} < 1400509) || \
(${OSVERSION} >= 1300000 && ${OSVERSION} < 1303502))
(${OSVERSION} >= 1400000 && ${OSVERSION} < 1400097)|| \
(${OSVERSION} >= 1300000 && ${OSVERSION} < 1300137) || \
${PORT_OPTIONS:MLLVM_FROM_PORTS})
USES+= llvm:build
CHOSEN_COMPILER_TYPE= clang
.else

View File

@ -11,12 +11,34 @@ BROKEN_sparc64= https://github.com/boostorg/context/commit/f2ef6326b6ed
BUILD_DEPENDS+= bjam:devel/boost-jam
OPTIONS_DEFINE= DEBUG OPTIMIZED_CFLAGS
# Note about LLVM_FROM_PORTS option:
# Build of this port fails with assertion failure of compiler due to
# bug of LLVM/Clang in base system. The failure happens when all of
# following conditions are satisfied.
# * OSVERSION is included in either of following ranges.
# 1. 1500000 <= OSVERSION < 1500017
# 2. 1400000 <= OSVERSION < 1400509
# 3. 1300000 <= OSVERSION < 1303502
# * Base system is built with WITH_LLVM_ASSERTIONS variable set.
# So if your base system fulfills them you need to use LLVM ports to
# build this port.
# By default WITH_LLVM_ASSERTIONS variable is set with -CURRENT but
# not with -STABLE and -RELEASE. So whereas most -CURRENT users face
# the build failure, few -STABLE and -RELEASE user faces it.
# Therefore by default this port uses LLVM from ports only if base
# system is -CURRENT and OSVERSION is included in above ranges. It
# make it possible for most -STABLE and -RELEASE users to avoid to
# build LLVM ports unnecessarily. But if someone uses -STABLE or
# -RELEASE built with WITH_LLVM_ASSERTIONS set, then he can't build
# this port successfully on such system. So provide LLVM_FROM_PORTS
# option as a last resort for him.
OPTIONS_DEFINE= DEBUG LLVM_FROM_PORTS OPTIMIZED_CFLAGS
OPTIONS_MULTI= LOCALE
OPTIONS_MULTI_LOCALE= ICONV ICU
OPTIONS_DEFAULT= ICONV ICU
ICONV_DESC= Boost.Locale with iconv encoding support
ICU_DESC= Boost.Regex/Locale with ICU unicode support
LLVM_FROM_PORTS_DESC= Use LLVM from ports to build
ICONV_USES= iconv
ICONV_MAKE_ARGS= -sICONV_PATH=${ICONV_PREFIX}