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 llvm12-12.0.1_16:
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
LIT=off: Install lit and FileCheck test tools
LLD=on: Install lld, the LLVM linker
OPENMP=on: Install libomp, the LLVM OpenMP runtime library
PYCLANG=off: Install python bindings to libclang
====> Options available for the single BACKENDS: you have to select exactly one of them
BE_FREEBSD=on: Backends for FreeBSD architectures
BE_NATIVE=off: Backend(s) for this architecture (X86)
BE_STANDARD=off: All non-experimental backends
===> Use 'make config' to modify these settings
devel/llvm12: greatly slim the set of options
At this point this port is mostly required for devel/openjdk11 on
powerpc. Remove most options not relevent to this function.
This will cut build time on the cluster and for dependent ports.
Sponsored by: DARPA, AFRL
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/llvm12: 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/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:16:
In file included from
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/MC/MCContext.h:12:
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/include/llvm/ADT/DenseMap.h:128:16:
warning: variable 'NumEntries' set but not used [-Wunused-but-set-variable]
128 | unsigned NumEntries = getNumEntries();
| ^
/wrkdirs/usr/ports/devel/llvm12/work/llvm-project-12.0.1.src/llvm/tools/sancov/sancov.cpp:512:42:
error: chosen constructor is explicit in copy-initialization
512 | return SpecialCaseList::createOrDie({{ClBlacklist}},
| ^~~~~~~~~~~~~
/usr/include/c++/v1/string:1153:64: note: explicit constructor declared here
1153 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit
basic_string(const _Tp& __t) {
(Only the first 15 lines of the commit message are shown above )
devel/llvm12: 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
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/llvm12: 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/llvm12 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/llvm12/work-default/llvm-project-12.0.1.src/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:578: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/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/llvm12: fix openmp library depends
Use base system libelf and don't link with libffi.
Reformat multi-line OPTION_CMAKE_ON variables.
PR: 273801
Co-authored-by: Ivan Rozhuk <rozhuk.im@gmail.com>
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/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/llvm12: fix hangs with CPUTYPE=skylake-avx512
Merge commit e8305c0b8f49 from llvm git (by Simon Pilgrim)
[X86] combineX86ShuffleChain - don't fold to truncate(concat(V1,V2)) if it
was already a PACK op
Fixes #55050
PR: 264480
MFH: 2022Q2
Sponsored by: DARPA, AFRL
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)
textproc/libxml2: bump all dependencies
This should make sure that all dependent ports will pick
up the new version commited with a13ec21cd733f67a9fc0dc00ab45268bdc236246
devel/llvm1[23]: Add BE_WASM option
When set, always build the WebAssembly backend (now required by Firefox
via wasi). This option effects BE_FREEBSD and BE_NATIVE. It has no
effect on BE_STANDARD.
This option is enabled by default.
*/*: Remove redundant '-*' from CONFLICTS definitions
The conflict checks compare the patterns first against the package
names without version (as reported by "pkg query "%n"), then - if
there was no match - agsinst the full package names including the
version (as reported by "pkg query "%n-%v").
Approved by: portmgr (blanket)
devel/llvm12: mark incompatible with python 3.10
This limitation is inherited from py-sphinx and should be recondidered when it's
updated
Approved by: portmgr blanket
devel/llvm12: fix for broken binaries generated by llvm12
Selectively reverts LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that
was pointed as the source of regression on LLVM12.
This affects powerpc64*, making binaries crash with segmentation fault due to
bad code generation around "__stack_chk_guard"
Root cause and/or proper fix is under investigation:
https://bugs.llvm.org/show_bug.cgi?id=51590
Submitted by: adalava
Differential review (for base): https://reviews.freebsd.org/D31698
devel/llvm12: make elfv2 the default on powerpc64 elfv2 systems
Currently when clang is passed --target=powerpc64-unknown-freebsd argument, it
creates elfv1 objects, which breaks build of firefox onpowerpc64.
devel/llvm12: lld fix compressed input sections
Apply upstream lld fix for compressed input sections on BE targets
[LLD] Support compressed input sections on big-endian targets
This patch enables compressed input sections on big-endian targets by
checking the target endianness and selecting an appropriate `Chdr`
structure.
Fixes PR51369
Differential Revision: https://reviews.llvm.org/D107635
MFH: 2021Q3
Sponsored by: DARPA
devel/llvm12: Add patches to enable kernel sanitizers on FreeBSD
I use CROSS_TOOLCHAIN quite frequently, but can't do so when building
kernels with KASAN or KMSAN enabled since these patches didn't make it
into LLVM 12. This diff just backports them to the port. I believe this
is low-risk and thus is acceptable for the port, as opposed to waiting
for LLVM 13.
Differential Revision: https://reviews.freebsd.org/D31316
devel/llvm*: Fix BE_NATIVE on aarch64
Fix two bugs in native-only backend support (BE_NATIVE). First, ARCH
is aarch64 not arm64. Second, consistently spell AArch64 not AAarch64
(extra 'a').
Because this only effects aarch64 in a non-default configuration, skip
the PORTREVISION bump that is technically required to reduce excess
heating in common cases.
Reported by: Mark Millard
devel/llvm12: address build issues in some configs
In some cases (notably when LLDB is not selected), COMPILER_RT fails to
build owing to not finding unwind.h. Add USES=localbase to COMPILER_RT
to address this.[0]
When building on amd64 without /usr/lib32 compat libraries installed,
COMPILER_RT doesn't build i386 sanitizer libs. Detect this case and
don't add to plist.[1]
Submitted by: Tatsuki Makino [0]
PR: 254048 [0], 255527 [1]
MFH: 2020Q2
llvm12: Disable LLDB on non-x86 architectures
The 12.0.0 branch point hit point in the rework of FreeBSD debug targets
were non-x86 architectures are broken. For now, simply disable LLDB
builds on those platforms.
PR: 254082
llvm12: rework handling undefined options
Define a list of options and for any that aren't defined for the current
architecture add a PLIST_SUB entry as through the option were defined and
disabled.
Welcome LLVM 12 (12.0.0rc2) to the tree
Notable *port* changes (vs devel/llvm11):
- Switch to single llvm-project distfile. This simplifies the port
and support for the old style build process is rotting upstream
after the mono-repo conversion.
- Disable libedit dependency in libLLVM (still used by LLDB). This
is one small step toward a dependency-less clang.
- LLDB docs are disabled due to issues finding python includes when
autogenerating API docs.
Sponsored by: DARPA