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 AT FreeBSD DOT org>

devel/flang-clang

70

<jmd AT FreeBSD DOT org>

lang/ponyc

70

<greg AT unrelenting DOT technology>

math/libpgmath

70

<jmd AT FreeBSD DOT org>

benchmarks/libcelero

80

<yuri AT FreeBSD DOT org>

devel/qtcreator

80

<kde AT FreeBSD DOT org>

devel/creduce

80

<swills AT FreeBSD DOT org>

devel/oclgrind

80

<jmd AT FreeBSD DOT org>

devel/f18

80

<jmd AT FreeBSD DOT org>

devel/include-what-you-use

80

<koobs AT FreeBSD DOT org>

misc/opennn

80

<yuri AT FreeBSD DOT org>

security/afl

80

<ports AT FreeBSD DOT org>

devel/youcompleteme

90

<ultima AT FreeBSD DOT org>

graphics/blender

90

<FreeBSD AT Shaneware DOT biz>

graphics/openshadinglanguage

90

<FreeBSD AT Shaneware DOT biz>

devel/cpp2py

10

<yuri AT FreeBSD DOT org>

lang/crystal

10

<greg AT unrelenting DOT 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 AT FreeBSD DOT org>

security/afl

80

<ports AT FreeBSD DOT org>

graphics/mesa-dri/Makefile.common

10

<x11 AT FreeBSD DOT org>

lang/pocl

${MESA_LLVM_VER:U11}

<ohartmann AT walstatt DOT org>

Ports That Are Grossly Wrong

/!\ TODO document

textproc/castxml


CategoryPorts CategoryTodo

HardcodedLLVMVersions (last edited 2021-04-26T01:43:29+0000 by JethroNederhof)