Commit graph

614 commits

Author SHA1 Message Date
Timm Bäder
3596372d00 Update to 19.1.5 2024-12-03 14:49:10 +01:00
Tulio Magno Quites Machado Filho
c1fe843102 Filter out test libarcher :: races/taskwait-depend.c
This test has been failling intermittently in the LLVM snapshots on
aarch64 and s390x.
This is being tracked upstream as
https://github.com/llvm/llvm-project/issues/117773 .
2024-11-27 09:14:35 -03:00
Tulio Magno Quites Machado Filho
10ea2dd942 Ensure LLVM_ENABLE_ZLIB is always enabled
Set LLVM_ENABLE_ZLIB=FORCE_ON in order to cause the build to error if
zlib is not found.
2024-11-26 15:20:32 -03:00
Tulio Magno Quites Machado Filho
d28725b2de Enable LLVM_ENABLE_ZSTD
Fixes rhbz#2321848.
2024-11-26 15:20:21 -03:00
Tulio Magno Quites Machado Filho
578ded7984 Remove patch applied upstream
PR #114907 has been merged on LLVM 20.
2024-11-22 21:01:14 +00:00
Nikita Popov
eefceee928 Fix RHEL 9 gating issues
This does two changes:
 * Add libomp -> llvm-libs dependency to satisfy rpmdeps.
 * Add LLVM_USE_PERF to bundle_compat_lib to avoid an ABI change.

I've introduces a cmake_common_args variable so we have a place to
put cmake variables that should apply to both the main build and
the compat build.
2024-11-22 08:28:05 +00:00
Timm Bäder
1acc1f3d64 Update to 19.1.4 2024-11-21 14:58:46 +01:00
Miro Hrončok
d7e2d3dc1f --with compat_build: Don't set %py_reproducible_pyc_path to unexisting path
+ /usr/lib/rpm/redhat/brp-fix-pyc-reproducibility /builddir/build/BUILDROOT/llvm19-19.1.3-4.fc40.x86_64/usr/lib/python3.12/site-packages
    find: ‘/builddir/build/BUILDROOT/llvm19-19.1.3-4.fc40.x86_64/usr/lib/python3.12/site-packages’: No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.VbdRja (%install)
2024-11-20 19:12:14 +01:00
Konrad Kleine
836ccfcbb2 Don't build HTML documentation. Add lldb man pages.
* Install a redirection index.html page to point users to the
  upstream HTML documentation.
* Remove myst parser patch for RHEL.
* Remove -DLLVM_INCLUDE_DOCS
* Add lldb man-pages
2024-11-19 16:51:23 +01:00
Josh Stone
680f925c31 Fix profiling after a binutils NOTE change
Resolves: rhbz#2322754
Ref: https://github.com/llvm/llvm-project/issues/114605
Ref: https://github.com/llvm/llvm-project/pull/114907
2024-11-18 14:42:53 -08:00
Tulio Magno Quites Machado Filho
afbb604baf Keep using DWARF-5 on all snapshot builds
We want to continue testing DWARF-5 on all snapshot builds, including on
RHEL 8 and 9.
This is in-sync with
https://src.fedoraproject.org/tests/clang/pull-request/48 .

Fixes: 8451454bdb (Port changes from RHEL 9)
2024-11-18 14:41:20 -03:00
Timm Bäder
172a0aa9ed Install i386 config files for x86_64 2024-11-18 10:05:20 +01:00
Konrad Kleine
75539700db Fix --gcc-install-dir
This should fix this error:

```
clang: error: '/opt/rh/gcc-toolset-14/root/usr' does not contain a GCC installation
```
2024-11-13 10:51:33 +01:00
Konrad Kleine
8451454bdb Port changes from RHEL 9
This change brings back some patches we had applied in LLVM 18.
And since the `bundle_compat_lib` switch in RHEL still builds LLVM 18,
I've added them here. This was easily possible due to #323.

This effectively allows us to build LLVM 19 in RHEL9 (see also RHEL-57461).

I've also added the `--gcc-install-dir` to the config file which is used
once clang is installed. This is to tell clang in RHEL which standard
library to link against.

We decided to no longer patch clang to default to DWARF4. Instead we tune
the default by adding `-gdwarf-4` to the config file.

RHEL-wise we've bumped the gts version from 13 to 14 (see RHEL-38228).
2024-11-13 09:56:22 +01:00
Nikita Popov
f14556f77b Don't install binutils-gold on RHEL 8
This subpackage is only available since RHEL 9.
2024-11-11 13:32:39 +00:00
Nikita Popov
8ad28122a0 Add BuildRequires on binutils-gold
While we *are* building the gold plugin, I noticed that we're
no longer running the tests for it on f41 and rawhide. Add a
BuildRequires on binutils-gold to restore the tests.
2024-11-08 12:34:15 +01:00
Konrad Kleine
a7e3073a2c Patch numbering
We've established the habit of numbering patches the following way:

  0-499: All patches that are unconditionally applied
  500-1000: Patches applied under certain conditions (e.g. only on RHEL8)
  1500-1599: Patches for LLVM 15
  1600-1699: Patches for LLVM 16
  1700-1799: Patches for LLVM 17
  ...
  2000-2099: Patches for LLVM 20

The idea behind this is that the last range of patch numbers (e.g. 2000-2099) allow
us to "deprecate" a patch instead of deleting it right away.
Suppose llvm upstream in git is at version 20 and there's a patch living
in some PR that has not been merged yet. You can copy that patch and put it
in a line like:

  Patch2011: upstream.patch

As time goes by, llvm moves on to LLVM 21 and meanwhile the patch has landed.
There's no need for you to remove the "Patch2011:" line. In fact, we encourage you
to not remove it for some time. For compat libraries and compat packages we might
still need this patch and so we're applying it automatically for you in those
situations. Remember that a compat library is always at least one major version
behind the latest packaged LLVM version.

I've restored a patch for an older version of LLVM:

We needed to move the

`0001-Always-build-shared-libs-for-LLD.patch`

from the `0-499` range to the `19xx` (current release) and `20xx`
(snapshots) range. In addition the old version of the patch was restored
with the following command and added to the `18xx` range:

```
$ git show
0656f30e3739d2d371d58f2fad66d634a766e0fe:0001-Always-build-shared-libs-for-LLD.patch
> 0001-18-Always-build-shared-libs-for-LLD.patch
```

This was needed because the `bundle_compat_lib` (RHEL only) build
condition needs the old version of the patch.
2024-11-07 11:05:49 +01:00
Timm Bäder
f0d7b28fe5 Update to 19.1.3 2024-11-05 16:30:59 +01:00
Nikita Popov
b7f988626e Include liblldb.so in bundle_compat_lib
This is needed by bpftrace now.
2024-11-01 10:09:40 +01:00
Tom Stellard
b2ba6764ef Add file entry for new clang-sycl-linker tool 2024-11-01 04:28:33 +00:00
Nikita Popov
de0bfe9a28 Backport requires fixes from RHEL 10
Make the following changes:
 * Fix a number of `%{?isa}` to use `%{?_isa}` instead.
 * Add explicit lld-libs -> llvm-libs and lldb -> clang-libs
   dependencies (to satisfy rpminspect rpmdeps analysis).
 * Fix libomp-devel -> libomp dependency (it was accidentally
   using libomp-devel -> llvm instead).
 * Change all `= %{version}` requires to `= %{version}-%{release}`.
   We were mostly already doing this, but missed some places.
2024-10-31 13:26:06 +01:00
Jesus Checa Hidalgo
71b35f8e70 Fix %postun scriptlet for llvm-devel when upgrading/downgrading
The scriptlet tried to run llvm-config-%{maj_ver} when upgrading or
downgrading to check if ${maj_ver} has changed. Since postun runs
after the package files have been uninstalled this will always fail
to run the command. We should run instead llvm-config%{exec_suffix},
which in the case of upgrades or downgrades will still be present,
installed from the new package.
2024-10-29 13:49:59 +01:00
Konrad Kleine
260d8e1cdc [pre-commit]: pre-commit-hooks 5.0.0, tmt 1.38.0
After the update I ran: `pre-commit run -a`
2024-10-29 11:17:42 +01:00
Nikita Popov
1be1f5ebdc Backport openmp fixes from RHEL 10
Backport patch from https://github.com/llvm/llvm-project/pull/111831
to fix openmp affinity tests on some brew ppc runners.

Also add one more openmp test to the ignore list for s390x.

Also add --time-tests to the lit args -- I had one instance where
openmp tests were running for 4h on s390x. If this happends again,
this should help determine which tests take so much time.
2024-10-14 12:18:30 +02:00
Timm Bäder
543b887fe7 Port a few changes from the llvm 18 compat packages
https://src.fedoraproject.org/rpms/lld18/pull-request/2
https://src.fedoraproject.org/rpms/clang18/pull-request/5
2024-10-11 03:50:30 +00:00
Nikita Popov
8fa6bd72a1 Skip openmp tests when builder uses 5-level page tables
A large number of openmp tests using tsan fail when we hit certain
machines on the rhel8-beefy channel in brew, because they appear
to the use 5-level page tables. This results in memory being
mapped in places where tsan does not expect it.
See https://github.com/llvm/llvm-project/issues/111492 for more
context.

Work around this by disabling the openmp tests that use tsan if
the cpu has the la57 feature.
2024-10-09 12:09:20 +02:00
Konrad Kleine
025b6c75da Remove %elif no which is unsupported on RHEL8 2024-10-09 11:45:24 +02:00
Nikita Popov
10f88a7d35 Only disable rpath during installation
We currently disable rpath during both build and install. Instead,
we use LD_LIBRARY_PATH to allow the built clang to find the
libLLVM.so etc objects.

However, this does not work well if the system clang and the
clang being built have the same version. During the build, we
use both the system clang and the just-built clang, and they
need to use the system and just-built shared objects respectively.
However, use of LD_LIBRARY_PATH causes us to always use the
just-built objects as long as the versions match.

This is a problem in two scenarios: When building compat packages
for the current system LLVM version, we mix system clang with
compat libraries, which assume different paths. And when building
release candidates, a build using a previous rc of a newer rc
may use ABI-incompatible objects, because we don't version sonames
on rc versions.

Fix this by keeping the rpath during the build and only stripping
it on installation using the CMAKE_SKIP_INSTALL_RPATH option.
For manually installed binaries, we need to also manually strip
the rpath using chrpath.

This way system clang will use system libraries, and just-built
clang will use just-built libraries.
2024-10-08 16:30:46 +02:00
Konrad Kleine
485e5ec719 Cleanup CMake arguments
Before we had a very long list of CMake arguments.

There was no room for annotation through comments. Now we have a new
global called `%cmake_config_args` that one can append to.

I've created these `#regions` to group the options for each sub-project:

```
  #region clang options
  #region compiler-rt options
  #region docs options
  #region lldb options
  #region llvm options
  #region openmp options
  #region test options
  #region misc options
```
2024-10-07 20:10:45 +00:00
Maxwell G
a11e4ffa4e Add 'Provides: clangd' to the clang-tools-extra subpackage 2024-10-07 14:51:54 -03:00
Nikita Popov
b7ae7ced72 Add tasking/issue-69733.c to flaky test list
This spurious failure has been observed both on aarch64 in fedora
rawhide koji and on ppc64le in c10s koji.

I've filed an upstream issue to track this here:
https://github.com/llvm/llvm-project/issues/111140
2024-10-04 14:27:27 +02:00
Nikita Popov
836ee0844f Add provides for libomp(major) and libomp-devel(major)
Forward-port from
https://src.fedoraproject.org/rpms/libomp18/pull-request/1.
2024-10-04 09:50:27 +02:00
Konrad Kleine
4251de274b Add #region #endregion comments
Each `#region XY` now has an `#endregion XY` instead of just
`#endregion`. This is optional and `XY` does not have to be repeated for
the "system" to work but it makes working with regions a bit more
convenient.

```
  #region globals...

  #region packages...

  #region prep...

  #region build...

  #region install...

  #region check...

  #region misc...

  #region files...

  #region changelog...
```
2024-10-02 13:28:19 +00:00
Konrad Kleine
031f5fb3e8 Add changelog entry for 19.1.0 update 2024-10-02 13:14:36 +00:00
Konrad Kleine
f5ae12659d Copy over %changelog from b6b17b013e 2024-10-02 13:03:46 +00:00
Konrad Kleine
6da4543be7 Remove %llvm_snapshot_changelog_entry 2024-10-02 13:03:46 +00:00
Konrad Kleine
9984e82c50 Merge *.spec.inc files into llvm.spec
This commit should be listed in .git-blame-ignore-revs because it moved
the content of the files untouched into llvm.spec.
2024-10-02 11:27:32 +00:00
Konrad Kleine
630d2eb2b0 Disable snapshots by default
Since https://github.com/fedora-llvm-team/llvm-snapshots/pull/754 all
build chroots on Copr that are used for snapshot building will have
`--with=snapshot_build` set.

This addresses the concern [1] that Copr specific conditionals are
discouraged if not forbidden in spec files.

[1]: https://src.fedoraproject.org/rpms/llvm/pull-request/301#comment-221782
2024-09-30 08:37:45 +00:00
Nikita Popov
6a1cad7583 Make rawhide compatible with snapshot builds 2024-09-20 09:53:42 +00:00
Timm Bäder
044ebc813c Update to 19.1.0 2024-09-19 08:12:14 +02:00
Timm Bäder
53aa1f8750 Update to rc4 2024-09-05 08:51:24 +02:00
Nikita Popov
5218c9a2fb Add compiler-rt patch for RHEL 8 page sizes
RHEL 8 uses different page sizes, and we need to patch the CFI
implementation to use those.
2024-09-03 08:20:32 +02:00
Nikita Popov
ee476f9583 Move post/postun out of install.spec
These start new sections and the following code is no longer
executed as part of %install.
2024-09-03 08:16:16 +02:00
Timm Bäder
b6b17b013e Update to 19.1.0-rc3 2024-09-03 08:00:21 +02:00
Nikita Popov
b2926ef5b4 Move patches and sources into main spec file
This way all the dependencies are listed in the main spec file.
Given how small these are, I don't think there's benefit to
having them split out.
2024-09-02 15:45:30 +02:00
Nikita Popov
961276e5f3 Disable marshalparser on RHEL 8 2024-09-02 15:45:30 +02:00
Konrad Kleine
af1c7f6599 lldb: fix ModuleNotFoundError: No module named 'pexpect'
We've seen a lot of tests that were missing the pexpect python module
and that resulted in a state of
[`UNRESOLVED`](https://llvm.org/docs/CommandGuide/lit.html).
2024-09-02 15:45:30 +02:00
Konrad Kleine
a3b9c83bd0 Remove timestamp prefix in log lines
With the llvm-build-stats we have what we wanted.
2024-09-02 15:45:30 +02:00
Konrad Kleine
d2784c597d lldb: add BuildRequires: procps-ng
This is to mitigate `/bin/sh: line 1: ps: command not found` in the
build logs.
2024-09-02 15:45:30 +02:00
Konrad Kleine
d06b46b724 Move all BuildRequires: tags to llvm.spec
See
https://src.fedoraproject.org/rpms/llvm/pull-request/234#comment-206917
2024-09-02 15:45:30 +02:00