Table of Contents

Certain ports hardcode which LLVM version they want. There are several cases: two common cases, and the uncommon cases.

:!: these data are almost certainly incomplete.

How LLVM versions get set

By default, the Makevar LLVM_DEFAULT is globally defined by the ports infrastructure via Mk/bsd.default-versions.mk. Therefore, it should be under control of the user. MarkLinimon believes that this global Makevar should not be overridden in port Makefiles.

Some ports use the LLVM_DEFAULT Makevar, but some use their own, or, worse, hardcode a version number.

Ports That Hardcode LLVM version

This is a common case – but see ObsoleteLLVMVersions for the maintenance hassles it causes.

In general these are symbolic definitions via LLVM_VER or similar.

Example:

LLVM_VER=            90
BUILD_DEPENDS+=      clang${LLVM_VER}:devel/llvm${LLVM_VER}

:!: We should standardize on a variable name. In use: LLVM_VER LLVM_VERSION LLVMVER VBOX_LLVM_VER.

portname hardcoding maintainer
devel/flang 70 jmd@FreeBSD.org
devel/flang-clang 70 jmd@FreeBSD.org
lang/ponyc 70 greg@unrelenting.technology
math/libpgmath 70 jmd@FreeBSD.org
benchmarks/libcelero 80 yuri@FreeBSD.org
devel/qtcreator 80 kde@FreeBSD.org
devel/creduce 80 swills@FreeBSD.org
devel/oclgrind 80 jmd@FreeBSD.org
devel/f18 80 jmd@FreeBSD.org
devel/include-what-you-use 80 koobs@FreeBSD.org
misc/opennn 80 yuri@FreeBSD.org
security/afl 80 ports@FreeBSD.org
devel/youcompleteme 90 ultima@FreeBSD.org
graphics/blender 90 FreeBSD@Shaneware.biz
graphics/openshadinglanguage 90 FreeBSD@Shaneware.biz
devel/cpp2py 10 yuri@FreeBSD.org
lang/crystal 10 greg@unrelenting.technology

Ports That Hardcode Dependencies

This is a common case – but should be folded into the above by factoring out the number into one definition as above.

Suboptimal:

BUILD_DEPENDS+=     clang90:devel/llvm90

Preferred (as above):

LLVM_VER=            90
BUILD_DEPENDS+=      clang${LLVM_VER}:devel/llvm${LLVM_VER}
portname hardcoding PR

(these are believed to be fixed as of 20191204)

Ports That Redefine CC / CPP / CXX

Some ports hardcode which version they want by redefining the CC and/or CPP and/or CXX Makevars. Please see HardcodedCCVersions.

In PR 229626 MarkLinimon claims that this is a bad implementation, and that the values instead should be passed via environment variables. However, that PR as yet has not received any attention.

Ports That Redefine LLVM_VERSION

MarkLinimon believes that this global Makevar should not be overridden in port Makefiles (see above).

Preferred usage:

.if <conditions>
LLVM_VER=            90
.else
LLVM_VER             ${LLVM_DEFAULT}
.endif
BUILD_DEPENDS+=      clang${LLVM_VER}:devel/llvm${LLVM_VER}

The following list has some overlap with the above.

portname redefinition maintainer
devel/oclgrind 80 jmd@FreeBSD.org
security/afl 80 ports@FreeBSD.org
graphics/mesa-dri/Makefile.common 10 x11@FreeBSD.org
lang/pocl ${MESA_LLVM_VER:U11} ohartmann@walstatt.org

Ports That Are Grossly Wrong

:!: TODO document

textproc/castxml