Commit graph

595 commits

Author SHA1 Message Date
Tom Stellard
7f22f8a288 Add file entry for new clang-sycl-linker tool 2024-11-21 14:55:34 +01:00
Nikita Popov
76b3434767 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-11-21 14:55:34 +01:00
Jesus Checa Hidalgo
6fc421f466 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-11-21 14:55:34 +01:00
Konrad Kleine
cfa15b62ae [pre-commit]: pre-commit-hooks 5.0.0, tmt 1.38.0
After the update I ran: `pre-commit run -a`
2024-11-21 14:55:34 +01:00
Nikita Popov
6ab58dc689 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-11-21 14:55:34 +01:00
Timm Bäder
07d391355a 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-11-21 14:55:34 +01:00
Nikita Popov
85ff72ec53 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-11-21 14:55:34 +01:00
Konrad Kleine
3ee21370a3 Remove %elif no which is unsupported on RHEL8 2024-11-21 14:55:34 +01:00
Nikita Popov
30e990e77f 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-11-21 14:55:34 +01:00
Konrad Kleine
614bc5ae9f 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-11-21 14:55:34 +01:00
Maxwell G
6590270474 Add 'Provides: clangd' to the clang-tools-extra subpackage 2024-11-21 14:55:34 +01:00
Nikita Popov
a76e355bad 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-11-21 14:55:34 +01:00
Nikita Popov
baf115a7fb Add provides for libomp(major) and libomp-devel(major)
Forward-port from
https://src.fedoraproject.org/rpms/libomp18/pull-request/1.
2024-11-21 14:55:34 +01:00
Konrad Kleine
71f1e1178c 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-11-21 14:55:34 +01:00
Konrad Kleine
6705db9611 Add changelog entry for 19.1.0 update 2024-11-21 14:55:34 +01:00
Konrad Kleine
28ab09b450 Copy over %changelog from b6b17b013e 2024-11-21 14:55:34 +01:00
Konrad Kleine
72968737bc Remove %llvm_snapshot_changelog_entry 2024-11-21 14:55:34 +01:00
Konrad Kleine
4618156485 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-11-21 14:55:34 +01:00
Konrad Kleine
4466fbf9bc 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-11-21 14:55:34 +01:00
Nikita Popov
8ab3d3d63a Make rawhide compatible with snapshot builds 2024-11-21 14:55:34 +01:00
Timm Bäder
4fb09cf1aa Update to 19.1.0 2024-09-19 07:58:16 +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
Tulio Magno Quites Machado Filho
1846c73b59 Fix rhbz #2248872
Ensure the versioned llvm-config alternative gets removed during major
upgrades of the non-compat package.

Also add code that removes the versioned llvm-config alternatives of
the previous 3 LLVM versions. These versions didn't remove their own
versioned llvm-config alternative, leading to broken output, e.g.
llvm-config-16 points to llvm-config-64 from LLVM 17.
2024-09-02 15:45:30 +02:00
Konrad Kleine
bada609c4b Inline %post and %postun code for llvm-devel 2024-09-02 15:45:30 +02:00
Konrad Kleine
ab194f104b merge llvm, clang, compiler-rt and libomp repos
* %check: export LD_LIBRARY_PATH because runtimes use external cmake projects that wouldn't find libclang++.so
* %check: use LLVM's LIT_XFAIL to mark tests that are expected to fail and don't just delete them
* clang: bring over *.patch files
* clang: remove build requires tags from clang package that are already defined by main llvm package
* clang: remove duplicates found in llvm globals and use %{pkg_datadir} instead of %{install_datadir}
* clang: rename and use pkg_name -> pkg_name_clang
* clang: use %{pkg_name_clang} instead of %{name}
* compiler-rt and libomp: wrap in %if %{without compat_build}
* libomp: also build libomp for s390x (See https://github.com/llvm/llvm-project/pull/66081)
* libomp: exclude libomp-devel on s390x just like libomp itself
* libomp: introduce pkg_name_libomp and cleanup the globals
* libomp: remove gdb-plugin (NEED TO CONFIRM IF THIS IS REALLY TRUE)
* libomp: filter out flaky libomp test: ompt/teams/distribute_dispatch.c
* llvm: add BuildRequires: graphviz to llvm-doc
* llvm: use %{pkg_name_llvm} instead of %{name}
* make: added temporary Makefile so I can more easily run srpm or rpm builds locally
* make: Added local-tmt-vm target (not really useful yet)
* rpm: for non-RHEL add prefix like "Jan 05 16:17:06" to every log line This should help in finding out how long things take to build/install/...
* rpm: fully specify %files for top-level packages
* rpm: make all packages fully qualified
* rpm: obsolete llvm-snapshot-builder
* rpm: remove BuildRequires: python3-lit because we have it in-tree
* rpm: remove BuildRequires: tags for clang and llvm specifics as we're building in-tree
* rpm: rename %llvm_srcdir -> %srcdir_llvm
* rpm: rename %pkg_name -> %pkg_name_llvm
* rpm: use full qualified name in %description
* rpm: use region comments in spec file to group by package. This allows editors to fold text to get a better overview
* rpmlint: update rc file to reflect clang and compiler-rt (libomp has no rpmlint rc file)
* use python-lit from within tree
2024-09-02 15:45:17 +02:00
Tom Stellard
c322494fa6 Sync with rawhide 2024-09-02 15:45:17 +02:00
Tom Stellard
6635237142 Revert "Fix a test failure on s390x"
This reverts commit 9a451905d0.

A fix has been merged upstream.
2024-09-02 15:45:17 +02:00
Tom Stellard
8ad022d253 Fix a test failure on s390x 2024-09-02 15:45:17 +02:00
Tom Stellard
4da55b8bb6 Revert "Add JITLink patch to fix clang failures on aarch64 with libgcc-13"
This reverts commit 34236f71a5.

This patch has been committed upstream.
2024-09-02 15:45:17 +02:00
Tom Stellard
693269178f Add JITLink patch to fix clang failures on aarch64 with libgcc-13 2024-09-02 15:45:17 +02:00
Tom Stellard
de1386c84e Remove another upstreamed patch 2024-09-02 15:45:17 +02:00
Tom Stellard
e41f905818 Remove patch applied upstream 2024-09-02 15:45:17 +02:00
Konrad Kleine
ab79dddfdb Manually add https://reviews.llvm.org/D137890 2024-09-02 15:45:17 +02:00
Konrad Kleine
f60f1961ea Adapt to standalone third-party dir 2024-09-02 15:45:17 +02:00
Konrad Kleine
630ee401af Compiles and installs again 2024-09-02 15:45:16 +02:00
Konrad Kleine
132731e88c Move globals down for them to be expanded correctly 2024-09-02 15:44:26 +02:00
Konrad Kleine
aa18d7c370 Fix /usr/bin/ld: cannot find /usr/lib64/clang/13.0.0/lib/linux/libclang_rt.profile-x86_64.a: No such file or directory 2024-09-02 15:43:59 +02:00
Konrad Kleine
a183e0b7c9 Only package cmake-devel when building a snapshot package and when NOT building in compat mode 2024-09-02 15:43:36 +02:00
Konrad Kleine
40998353e9 Use llvm_snapshot_version_suffix 2024-09-02 15:43:36 +02:00
Konrad Kleine
1f02e1af7d Prepare for snapshot build
Increase verbosity for %autosetup
Modified patch so it cleanly applies
Renaming man pages is no longer needed

Fix this error:

 mv /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/clang-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/lldb-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/mlir-tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/tblgen.1 /builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1
mv: target '/builddir/build/BUILDROOT/llvm-13.0.0~pre20210427.gd122d80b3d1c3f-1.fc35.x86_64/usr/share/man/man1/llvm-tblgen.1' is not a directory

Add entry for changelog when building a snapshot
Reset 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch because it is not applicable to LLVM 12
Moved BuildRequires: python3-psutil out in PR
See https://src.fedoraproject.org/rpms/llvm/pull-request/91
Make download path for snapshot sources-easily adjustable
Added cmake subpackage with shared cmake files
Install cmake files into /usr/lib64/cmake/llvm with the llvm-devel pkg
2024-09-02 15:41:54 +02:00
Kefu Chai
3a3e3ad673 change the date of a previous changelog entry
to address following error:

```
error: %changelog not in descending chronological order
```
when preparing the rpm, rpm warns at seeing the changelog entry not
in descending chronological order. so "fix" it.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2024-08-31 10:40:02 +08:00