Since LLVM 17.0.6 is the last release of the 17.x branch. the fix backported
by this change helps to address a critical build failure with libstdc++
shipped with GCC-13, so we need to include it in the clang packages.
the include patch was updated to resolve the conflicts when being
applied to the llvmorg-17.0.6 tag.
the fix has been tested after applying it on top of upstream's
llvmorg-17.0.6 tag.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
When building ROCm components, we need to pull in specific llvm and
clang devel package versions. This add clang-devel(major) in the style
of llvm-devel(major), as they can be used as a build requires.
This reverts commit 4d5309efc8 in order to
fix an issue where debug information is enabled by default even when -g
is not used.
Resolves: rhbz#2239619.
This is part of the Fedora change approved [1] which states the
following:
The macros.clang file with RPM macros will be moved from the
clang-devel package to the clang-resource-filesystem package.
[1] https://fedoraproject.org/wiki/Changes/LLVM-17
This is also a squashed merge commit from upstream-snapshot (commit ID
13b971d3fcbf82d2) into rawhide whose most important commits from
upstream-snapshot are:
Konrad Kleine (57):
Prepare for snapshot build
Fix patches by using them from the streamline branch
Fixed E: specfile-error error: line 491: Unclosed %if
Fix error: Bad file: /var/lib/copr-rpmbuild/workspace/workdir-0qjlioil/srcdir/0007-cmake-Allow-shared-li
braries-to-customize-the-soname.patch: No such file or directory
Must have forgotten this newly added 'clang_version' global
Disable LTO for anything older than Fedora 34
Add recommonmark to build deps
Use new llvm_snashot_changelog_entry macro
Use llvm_snapshot_version_suffix
Fix RPM packaging bug:
Default to DWARFv4
Revert "Default to DWARFv4"
Compile with DWARFv4
Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot
Try to address https://reviews.llvm.org/D119199
Update patches
Fixup patches
Patches rebased
Separate clang-tools-extra patches
Try to fix clang build
Rebased patches to fix issue with patch
Make %autopatch verbose
Also rename patch tag
Avoid ld error
Rebased patches
Rebased clang patches
Rebased clang-tools-extra patches
First try to default to DWARF4 by default
Produce DWARF4 by default
Added pgo_instrumented_build conditional
Make clang use the llvm-snapshot-builder
Use %{llvm_snapshot_extra_source_tags} macro
Fix %changelog not in descending chronological order
Rebase patches
Bring back clang
Rebased patches and added third-party and cmake sources
Adjust to https://reviews.llvm.org/D130586
Disable LTO
Manually apply https://reviews.llvm.org/D141581
adjust /lib/ to /%{_lib}/
Remove third party stuff and use gtest patch
Rebased D138472
Trace configure output
Rebase D138472
Assist find_package(LLVMGTest by setting hint dir to LLVM_CMAKE_DIR
Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot
Add back 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch
Fixup 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch
Rebased 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch
Rebased 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
Dropping 0001-Take-into-account-Fedora-Specific-install-dir-for-li.patch
D142506 landed already
Fix for the IEEE 128-bit fp error
Fix RPM install of includes
Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot
Remove already landed patches D141581 and D143736
Rebase 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
Nikita Popov (7):
Rebase downstream patches
Rebase clang-tools-extra patches
Add clang-offload-packager to clang_tools_binaries
Rebase downstream patches
Rebase LLVMHello patch
Remove fno-openmp-implicit-rpath patches
Restore fno-openmp-implicit-rpath patches
Tom Stellard (25):
Revert patches that added LLVMHello dependency to clang-tools-extra tests
Remove accidentally committed changes from previous commit
Add clang-linker-wrapper and clang-pseudo binaries
Add test for building an rpm with -fopenmp
Add a smaller patch for fixing clang-tools-extra standalone build
Update test name
Add link to upstream patch for clang-tools-extra
Update DWARF-4 patch to fix a test failure
Rebase patch
Emit DWARF4 by default
Fix test after switch to DWARF4 default
Fix dwarf test again
Add workaround for build failure on i386/f36
Remove accidentally committed change
Add back -fno-openmp-implicit-rpath option
Fix patch
Remove patch that was committed upstream
Update -fno-openmp-implicit-rpath patches
Drop openmp changes from patch
Add fix for test failures on AArch64/f38+rawhide
Revert "Add fix for test failures on AArch64/f38+rawhide"
Update OpenMP rpath patch
copr: Install llvm-snapshot-builder from the local COPR project
Remove %clang_resource_dir_readonly macro
Move clang-resource-dir to /usr/lib
sergesanspaille (5):
Rebased clang-tools-extra patches
Rebased clang-tools-extra patches
rebase downstream patches
Rebase downstream patches
Rebase downstream patch
1. Set LLVM_INCLUDE_TESTS:BOOL=OFF in order to build clang without
requiring googletest as we do not run the tests anyway.
2. Backport a patch from upstream that fixes the generation
of *.exports.
3. Deduplicate a few BuildRequires entries.
Remove cmake source in favor of using LLVM_COMMON_CMAKE_UTILS
with the installed cmake files and a patch, same as is done in
some of the other subprojects.
1. Remove patches that are not necessary.
2. Re-add a patch that generates DWARF4 by default.
3. Add a patch fixing IEEE 128-bit long double tests on ppc64le.
4. Include cmake code.
5. Other minor issues.
Part of these changes are heavily based on or copied from the work from
Konrad Kleine in branch upstream-snapshot.
fixes this error:
```
mv: cannot stat '/builddir/build/BUILDROOT/clang-16.0.0~pre20230122.g6aaac4c144572d-1.fc36.x86_64/usr/lib/libear': No such file or directory
mv: cannot stat '/builddir/build/BUILDROOT/clang-16.0.0~pre20230122.g6aaac4c144572d-1.fc36.x86_64/usr/lib/libscanbuild': No such file or directory
```
Otherwise invocations of host clang will use the newly built
libraries, which will use a non-existent resource directory, and
thus cause headers like stddef.h not to be found.
Backport changes from clang14 package. We need to exclude patches
for clang-format (which we don't build for compat packages).
Additionally, clang14-devel needs a dependency on clang14-libs,
otherwise this only installs dead symlinks without the shared
objects they point to.
* Fixed broken dependency on annobin. Requiring just redhat-rpm-config
should pull the correct annobin rpm
* Added SCL specific requirements for LLVM 13 and 14
This works around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104334,
which miscompiles clang on s390x and ppc64le. The issue is already
fixed on the gcc side and a new fedora build is in progress, but
including this as a temporary workaround to get a working build.
scanview and other tools are not built so these libraries
are not needed, so remove them.
Resolves a build but not packaged error.
Signed-off-by: Tom Rix <trix@redhat.com>
The regular llvm build installs llvm-config-N to _bindir
The compat_build llvm build install llvm-config-N to pkg_bindir
Use the pkg_bindir one.
Fixes a build error
error: File not found: .../rpmbuild/BUILDROOT/
clang13-13.0.0-5.fc36.x86_64/usr/lib64/llvm13/lib/*.so.*
Signed-off-by: Tom Rix <trix@redhat.com>
This error is seen on the compat_build
find: '.../rpmbuild/BUILDROOT/clang13-13.0.0-5.fc36.x86_64/
usr/lib/python3.10/site-packages': No such file or directory
python3-clang is not part of the compat_build so ifdef out
the problem area.
Signed-off-by: Tom Rix <trix@redhat.com>
Downstream has no `libc++`, but it can run clang tests with `libstdc++`.
Parametrize the tests, leaving the actual library to use on their
respective `main.fmf` files that are easier to overturn in downstream
repos.
The clang-resource-filesystem package will now prevent a
compiler-rt >= 11.0.0 package from being installed at the same time as a
newer clang package, so we no longer need to add a conflicts here.
.eh_frame sections confuse bpf tools, so -funwind-tables shouldn't be enabled there.
There are other non-CPU arches where this could potentially cause problems, so be
conservative and only enable this on CPU arches supported by Fedora.
It's not necessary to store the tests in a separate repository, since
other packages can just reference the tests in this repo.
Also update, the other tests to pull from git repos in the rpms namespace.
clang has a couple of indirect weak dependencies; installing clang
without those will cause it to fail in certain use cases, but its
description doesn't mention them which makes resolving this harder
than it could be.
This patch adds a brief description of the weak dependencies to the
main clang package description.
Closes: #1879410
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Packages that need to read or write files from the clang resource
directory should Require this sub-package. This will ensure that we
won't have packages continuing to use older versions of the clang
resource directory when clang is updated.
We need to uninstall clang at the beginning of this test along with libomp,
so that we can later install clang to test that it has the correct dependency on
libomp. If we don't uninstall clang along with libomp at the beginning, then
clang won't be installed later and libomp won't get pulled back in.
The emacs plugins are shipped with clang-tools-extra, which already
Requires: emacs-filesystem, so the main package does not need to
have a dependency on this.
redhat-rpm-config now adds --config to CFLAGS when the macro
%toolchain is set to clang. Some packages end up adding CFLAGS
twice to their compiler commands, so we need to patch clang to
allow multiple --config options so that these packages won't
fail to compile.