The LLVM Project is a collection of modular and reusable compiler and
toolchain technologies.
This port includes Clang (a C/C++/Objective-C compiler), LLD (a linker),
LLDB (a debugger), an OpenMP runtime library, and the LLVM infrastructure
these are built on.
===> The following configuration options are available for llvm14-14.0.6_9:
BE_AMDGPU=on: AMD GPU backend (required by mesa)
BE_WASM=on: WebAssembly backend (required by firefox via wasi)
CLANG=on: Build clang
COMPILER_RT=on: Sanitizer libraries
DOCS=on: Build and/or install documentation
EXTRAS=on: Extra clang tools
FLANG=off: Flang FORTRAN compiler
LIT=on: Install lit and FileCheck test tools
LLD=on: Install lld, the LLVM linker
MLIR=off: Multi-Level Intermediate Representation
OPENMP=on: Install libomp, the LLVM OpenMP runtime library
PYCLANG=on: Install python bindings to libclang
====> Options available for the single BACKENDS: you have to select exactly one of them
BE_FREEBSD=off: Backends for FreeBSD architectures
BE_NATIVE=off: Backend(s) for this architecture (X86)
BE_STANDARD=on: All non-experimental backends
===> Use 'make config' to modify these settings
devel/llvm14: remove FLANG and MLIR from the default build
It would be surprising if anyone was using these ancient versions so
stop wasting build time for most people.
devel/llvm14: Remove the LLDB option and fix plist with DOCS
LLDB's Python script interpreter fails to build with Python 3.13
(_Py_IsFinalizing was removed), which blocks switching the default
Python version to 3.13. Rather than patching an old debugger, remove
the LLDB option as discussed in PR 292105: LLDB remains available
from devel/llvm18 and later and from the base system.
This also drops the swig build dependency and the lua53 and libedit
library dependencies.
While here, fix the plist with DOCS enabled: the openmp and flang
HTML documentation leaves an empty _sources directory behind, and
check-plist fails with orphaned directories. Remove them;
devel/llvm12 does the same for openmp (a4f732450dd3).
PR: 299422
devel/llvm[14-22]: backport powerpc64le patch from CURRENT
Since 16.0, powerpc64le switches to IEEE long double binary128.
This set of patches backports the change from CURRENT.
LLVM 12 and 13 are omitted, because binary128 handling in those
versions is not finished.
devel/llvm??: Add Mips back to standard backends
I'd forgotten that STANDARD_BACKENDS is includes _FREEBSD_BACKENDS so
Mips dropped out of the list when it was removed from _FREEBSD_BACKENDS.
PR: 295111
Fixes: 2a7c0561200c ("all: drop support for FreeBSD 13, mips and risc64sf")
all: drop support for FreeBSD 13, mips and risc64sf
Reviewed by: many (*)
Differential Revision: https://reviews.freebsd.org/D55624
Differential Revision: https://reviews.freebsd.org/D55642 (merged in from bofh)
many (*)
acm arrowd brooks cmt dch decke dinoex eduardo fluffy fuz gahr garga
jbeich joerg jrm kai kenrap martymac matthew mfechner michaelo mizhka
nobutaka pkubaj se tagattie thj
Anton Saietskii
GenericRikka
Gert Doering
Jan Bramkamp
Oleh Hushchenkov
Oleksandr Kryvulia
Ralf van der Enden
Yamagi
desktop kde python tcltk office
devel/llvm14: fix build with clang 21
Recent versions of clang complain about explicit copy constructors,
leading to errors similar to:
In file included from
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:14:
In file included from
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h:19:
In file included from
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Object/ELFObjectFile.h:37:
In file included from
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/ScopedPrinter.h:19:
In file included from
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/Support/JSON.h:49:
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/include/llvm/ADT/DenseMap.h:129:16:
warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
129 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/llvm/tools/sancov/sancov.cpp:512:42:
error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
(Only the first 15 lines of the commit message are shown above )
devel/llvm1[4567]: keep backport patches local
The patches generated by adding .patch to a github commit URL are
unstable and the output of some of them changed recently. It's
concivable this will be fixed, but they probably won't make any
long term guarantees so store the patches in the ports tree instead of
downloading them.
PR: 292291
MFH: 2026Q1
Sponsored by: DARPA, AFRL
See also: https://github.com/orgs/community/discussions/184094
devel/llvm14: don't build gold plugin when disabled
Disabling the GOLD option didn't actually disable building the plugin,
it just didn't install it in the package. Actually stop traversing into
the directory when the option disabled so we don't end up needing
devel/binutils.
PR: 291247
Sponsored by: DARPA, AFRL
python.mk: rename PYTHON_EXT_SUFFIX to PYTHON_TAG, document, etc
EXT_SUFFIX, according to PEP 3149, refers to the full tag and
extension for compiled extension module objects, eg .cpython-311.so,
.cpython-313t.so, etc. We do not use the correct semantic meaning,
and this usage becomes ambiguous and confusing when tags do not
match between bytecode and compiled extension module objects.
Rename our PYTHON_EXT_SUFFIX to PYTHON_TAG to align with PEP 3147's
specification of a magic tag, which consists of implementation name
and shorthand version only. This is meant for bytecode and other
files containing this tag in their filename that do not depend on
a specific Python ABI for the same version. Chase all existing
consumers.
(Only the first 15 lines of the commit message are shown above )
devel/llvm*: flip LICENSE_FILE_BSD3CLAUSE setting [NFC]
The location of this license file moved in LLVM 16. Since I'm doing
cleanup in this area and the split of ports is about 50/50, switch to
setting the old location in the older ports so the newer ports set fewer
variables.
Sponsored by: DARPA, AFRL
devel/llvm*: LICENSE_DIR simplification
WRKSRC moved to the top of the source tree with llvm12. As a result,
LICENSE_DIR became ${WRKSRC}/llvm. Given that llvm11 the only port that
wasn't setting LICENSE_DIR, flip the script and default to
${WRKSRC}/llvm with llvm11 overriding.
Sponsored by: DARPA, AFRL
devel/llvm*: Always define LLVM2 license [NFC]
All LLVM ports in the tree use the Apache License 2.0 with LLVM
Exceptions license so cerntralize the definition.
Sponsored by: DARPA, AFRL
devel/llvm14: fix build with clang 19
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/flang/include/flang/Evaluate/integer.h:310:32:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
310 | auto back{FROM::template ConvertSigned(result.value)};
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/flang/lib/Evaluate/fold-real.cpp:72:22:
warning: variable 'z' set but not used [-Wunused-but-set-variable]
72 | } else if (auto *z{UnwrapExpr<Expr<SomeComplex>>(args[0])}) {
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/flang/lib/Evaluate/fold-real.cpp:69:15:
warning: variable 'x' set but not used [-Wunused-but-set-variable]
69 | if (auto *x{UnwrapExpr<Expr<SomeReal>>(args[0])}) {
| ^
/wrkdirs/usr/ports/devel/llvm14/work/llvm-project-14.0.6.src/flang/lib/Evaluate/fold-real.cpp:148:60:
error: a template argument list is expected after a name prefixed by the
template keyword [-Wmissing-template-arg-list-after-template-kw]
(Only the first 15 lines of the commit message are shown above )
devel/llvm14: fix build with libc++ 19
As noted in the libc++ 19 release notes [1], std::char_traits<> is now
only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
instantiation for other types will fail.
This causes devel/llvm14 to fail to compile with clang 19 and libc++
19, resulting in errors similar to:
/usr/include/c++/v1/string:820:42: error: implicit instantiation of
undefined template 'std::char_traits<unsigned char>'
820 | static_assert(is_same<_CharT, typename
traits_type::char_type>::value,
| ^
/wrkdirs/usr/ports/devel/llvm14/work-default/llvm-project-14.0.6.src/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:603:34:
note: in instantiation of template class 'std::basic_string<unsigned char>'
requested here
638 | std::basic_string<uint8_t> zeros(reg_info.byte_size, '\0');
| ^
(Only the first 15 lines of the commit message are shown above )
devel/llvm*: Remove unnecessary C/CFLAGS definitions
As of 3c5189a0fd4c82addfb659024bf28c5006bf88f7
there's no need to define DNDEBUG manually
PR: 277909
Approved by: portmgr (maintainer timeout, 2+ weeks)
devel/llvm*: Sanitize MANPREFIX
Not bumping as there is no change in PKG. This should have been done in
my previous commit.
Approved by: portmgr (blanket)
devel/llvm14 devel/llvm15 devel/llvm16 devel/llvm17: fix build with clang 18
Clang 18 is more strict in checking inline assembly constraints,
resulting in an error building devel/llvm14, devel/llvm15, devel/llvm16,
and devel/llvm17:
/wrkdirs/usr/ports/devel/llvm14/work-default/llvm-project-14.0.6.src/compiler-rt/lib/asan/asan_rtl_x86_64.S:130:286:
error: displacement 70368744177664 is not within [-2147483648, 2147483647]
This is fixed by two upstream commits:
https://github.com/llvm/llvm-project/commit/b9935bb02a50https://github.com/llvm/llvm-project/commit/966d564e43e6
PR: 276155
Approved by: brooks (maintainer)
MFH: 2024Q1
devel/llvm1[0123456]: Fix build
After the EOL of stable/12 sparc related codes were removed which broke
the build. This patches fixes those builds and also the consumers.
Thanks to dim@ for tha patches.
Approved by: portmgr (blanket)
*/*: Sunset 12.4-RELEASE/12-STABLE from ports tree
- Remove all references to defunct ARCH arm
- Remove all references to defunct ARCH sparc64
- Remove x11-drivers/xf86-video-sunffb which requires defunct sparc64
ARCH
- Remove sysutils/afbinit requires defunct sparc64 ARCH
- Remove all references to bktr driver
- Remove all references to defunct FreeBSD_12
- Remove all references to OSVERSION/OSREL corresponding to 12
- Remove conditionals in Mk/Uses/cabal.mk
- Remove sparc reference from Mk/Uses/qt-dist.mk
- Remove BROKEN_sparc64/NOT_FOR_ARCH=sparc64
- Remove BROKEN_FreeBSD_12* from:
- Remove OpenSSL patches from:
- Remove conditional flags for OSVERSION >= 1300000 to fixed flags.
Also move conditional flags for non sparc64/arm ARCH to fixed flags.
Reviewed by: brooks, jbeich, rene, salvadore
Differential Revision: https://reviews.freebsd.org/D42068
devel/llvm1[234567]: enable qsort sanatizer wrapper
I'd disabled it in 10.0.0 when it was found to be broken. It was then
fixed in LLVM 12, but the patch was never never removed and I propogated
it along for several year.
Reported by: Brad Smith <brad@comstyle.com>
See also: https://github.com/llvm/llvm-project/issues/46176
devel/llvm14: fix openmp library depends
Use base system libelf and don't link with libffi.
Reformat long and/or multi-line OPTION_FOO variables.
PR: 273801
Co-authored-by: Ivan Rozhuk <rozhuk.im@gmail.com>
devel/llvm14: arm and aarch64 improvements
Change clang to allow -m32 on arm64. This is a backport from upstream
and will be merged to FreeBSD head soon. See D40943 for more info.
Remove an obsolete patch which breaks arm64. [0]
When BE_NATIVE is specified on aarch64, include the ARM (32-bit)
backend.
PR: 271616 [0]
Reported by: jfc@mit.edu [0]
all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.
Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.
finance/quickfix: mark BROKEN with PYTHON
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++
-DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable
-Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi
-Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings
-Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x
-MT _quickfix_la-QuickfixPython.lo -MD -MP -MF
.deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o
.libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
^~~~~~~~~~
1 warning and 1 error generated.
Reviewed by: portmgr, vishwin, yuri
Differential Revision: <https://reviews.freebsd.org/D40568>
devel/llvm*: Consistently use python:3.7+
llvm12 was inappropriately constrained to 3.6-3.9 breaking the ability
to set 3.10 as the default. llvm11 just specified "python", but there's
no need to keep 2.7 support around. The rest had obsolete 3.6+ entries.
No functional change: This is not expected to change the version of
python used.
PR: 270978
MFH: 2023Q2
Reported by: michael.osipov@siemens.com
Sponsored by: DARPA
devel/llvm14: fix packaging with debug python
The actual suffix if python extensions (at least as built by the LLVM
infrastructure) is ${PYTHON_EXT_SUFFIX}${PYTHON_ABIVER} not merely the
former.
PR: 268437
Sponsored by: DARPA
devel/llvm*: Fix CONFLICT on cmark
If the user has the textproc/cmark package installed, the py*-CommonMark
package will fail to install. This in turn leads to build failures down
the line when sphinx tries to load commonmark. The result is confusing
and potentially wastes a lot of build time so just conflict upfront.
The previous code attempted to do this, but I'd listed the conflict
incorrectly in 2019. :(
PR: 239636
Reported by: Stephen Roznowski <sjrbulk@verizon.net>
devel/llvm1[2345]: fix build with clang 15
When building llvm12 through llvm15 with clang 15 as host compiler, and
when compiler-rt is enabled, there will be errors due to float16
support, similar to:
In file included from
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/lib/builtins/extendhfsf2.c:11:
In file included from
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/lib/builtins/fp_extend_impl.inc:38:
/wrkdirs/usr/ports/devel/llvm15/work/llvm-project-15.0.6.src/compiler-rt/lib/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.
(Only the first 15 lines of the commit message are shown above )
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
devel/llvm14: Update to 14.0.4
For a list of changes, see:
https://discourse.llvm.org/t/llvm-14-0-4-release/62751
We skipped 14.0.3 as it contained only a version bump that was missed
in 14.0.2 and I'd already worked around it in the port.
devel/llvm14: Update to 14.0.2
A list of included commits can be found at:
https://discourse.llvm.org/t/llvm-14-0-2-release/62065
Work around an upstream issue where, due to the new release process,
the version bump from 14.0.1 to 14.0.2 was forgotten.
devel/llvm14: update to 14.0.1
Note: with LLVM 14, there will now be a series of .1 - .6 releases
cut about ever two weeks rather than a single .1 release after a series
of release candidates.
Add a link for libclang.so.14 to reduce the need to modify build system
that assume the libclang version and LLVM version are the same.
textproc/libxml2: bump all LIB_DEPENDS consumers
This is a separate commit to facilitate easier cherry-picking for
quarterly.
PR: 262853, 262940, 262877, 263126
Approved by: fluffy (mentor)
devel/llvm14: Fix build on 13.0
The guards for using system unwind.h appear to be incorrect so revert
that part of 04e074c6fd452983ccfd931de0c43263d27fe1f
PR: 262707
textproc/libxml2: bump all dependencies
This should make sure that all dependent ports will pick
up the new version commited with a13ec21cd733f67a9fc0dc00ab45268bdc236246
devel/llvm14: Update to 14.0.0 release
Avoid a dependency of libunwind on sufficently recent systems where
the installed unwind.h can be found.
PR: 262707
Reported by: pkubaj
devel/llvm14: Update to RC4
Fix plist for BE_NATIVE. I'd forgotten to handle the new VE (vector
engine) and a couple headers for armv7 and riscv how seem to be tied to
their backends (this seems incomplete upstream as some related files are
still installed unconditionally).
Reported by: Mark Millard <marklmi@yahoo.com>
devel/llvm14: disable OpenMP DeviceRtl
For reasons that are not fully explored builds on aarch64 (and maybe
powerpc64le), but not amd64. The generated bitcode targets Linux ABIs
and seems unlikely to work in practice so just turn it off rather than
handlng plist differences on aarch64.
PR: 261921
Reported by: jbeich
devel/llvm14: Welcome 14.0.0rc1
Remove the -fformat-extensions patch. The flag is ignored and no FreeBSD
source tree with a chance of compiling with LLVM 14 uses it when the
compiler is clang.
devel/llvm14: bootstrap from llvm13
devel/llvm14 now contains an exact copy of devel/llvm13. The next commit
wil update it to llvm14 and connect it to the build.