public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/llvm] rawhide: Always build LLVMgold
@ 2026-07-03 13:09 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-07-03 13:09 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/llvm
Branch : rawhide
Commit : 0afc25ab2dcb20a35e6f7b0ec0fb8cd8bf8afea8
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-07-02T11:22:51-04:00
Stats : +8/-12 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/llvm/c/0afc25ab2dcb20a35e6f7b0ec0fb8cd8bf8afea8?branch=rawhide
Log:
Always build LLVMgold
LLVMgold is a BFD plugin, not specific to the (deprecated) gold linker;
however, some of its tests do use gold, which is packaged separately
since RHEL 9 but dropped in RHEL 11.
---
diff --git a/llvm.spec b/llvm.spec
index 31dc3ac..5226aba 100644
--- a/llvm.spec
+++ b/llvm.spec
@@ -11,13 +11,17 @@
%endif
#endregion version
-# Components enabled if supported by target architecture:
+# LLVMgold is a BFD plugin, not specific to the (deprecated) gold linker;
+# however, some of its tests do use gold, which is packaged separately
+# since RHEL 9 but dropped in RHEL 11.
+%if %{undefined rhel} || (0%{?rhel} > 8 && 0%{?rhel} < 11)
%define gold_arches %{ix86} x86_64 aarch64 %{power64} s390x
%ifarch %{gold_arches}
%bcond_without gold
%else
%bcond_with gold
%endif
+%endif
# Enable this in order to disable a lot of features and get to clang as fast
# as possible. This is useful in order to bisect issues affecting LLVM, clang
@@ -644,12 +648,11 @@ BuildRequires: python%{python3_pkgversion}-myst-parser
%if %{with multilib}
BuildRequires: multilib-rpm-config
%endif
-%if %{with gold}
+# for LLVMgold BFD plugin, gold is optionally used in tests
BuildRequires: binutils-devel
-%if %{undefined rhel} || 0%{?rhel} > 8
+%if %{with gold}
BuildRequires: binutils-gold
%endif
-%endif
%ifarch %{valgrind_arches}
# Enable extra functionality when run the LLVM JIT under valgrind.
BuildRequires: valgrind-devel
@@ -1935,6 +1938,7 @@ CLANG_LDFLAGS=$(strip_specs "$LDFLAGS $CLANG_LDFLAGS_EXTRA")
# Instead, we make use of rpath during the build and only strip it on
# installation using the CMAKE_SKIP_INSTALL_RPATH option.
%global cmake_config_args %{cmake_config_args} -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON
+%global cmake_config_args %{cmake_config_args} -DLLVM_BINUTILS_INCDIR=%{_includedir}
%if 0%{?fedora} || 0%{?rhel} > 9
%global cmake_config_args %{cmake_config_args} -DPPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON
@@ -1944,10 +1948,6 @@ CLANG_LDFLAGS=$(strip_specs "$LDFLAGS $CLANG_LDFLAGS_EXTRA")
%global cmake_config_args %{cmake_config_args} -DLLVM_LIBDIR_SUFFIX=64
%endif
-%if %{with gold}
- %global cmake_config_args %{cmake_config_args} -DLLVM_BINUTILS_INCDIR=%{_includedir}
-%endif
-
%if %{with snapshot_build}
%global cmake_config_args %{cmake_config_args} -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}"
%else
@@ -2235,11 +2235,9 @@ install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir
%if %{without compat_build}
-%if %{with gold}
# Add symlink to lto plugin in the binutils plugin directory.
%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so
-%endif
%else
@@ -3436,12 +3434,10 @@ fi
libLTO.so*
libRemarks.so*
}}
-%if %{with gold}
%expand_libs LLVMgold.so
%if %{without compat_build}
%{_libdir}/bfd-plugins/LLVMgold.so
%endif
-%endif
%if %{with compat_build}
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-03 13:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-03 13:09 [rpms/llvm] rawhide: Always build LLVMgold Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox