diff --git a/llvm-toolset-20.spec b/llvm-toolset-20.spec index c6ecc22ee9bf6386ef2e9fe6ccca195e1aa7485a..22e310c0e4c293eaf5245c714e2f60ca7908bf1f 100644 --- a/llvm-toolset-20.spec +++ b/llvm-toolset-20.spec @@ -18,7 +18,7 @@ %endif # Build sys_llvm packages or compat packages -%bcond_with sys_llvm +%bcond_with sys_llvm_20 %bcond_with check %bcond_without toolchain_clang @@ -47,7 +47,7 @@ #region LLVM globals -%if %{with sys_llvm} +%if %{with sys_llvm_20} %global pkg_name_llvm llvm %global install_prefix /usr %global install_bindir %{_bindir} @@ -167,7 +167,7 @@ #region main package Name: llvm-toolset-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 2 +Release: 3 Summary: The Low Level Virtual Machine License: NCSA @@ -425,7 +425,7 @@ Provides: clang-devel(major) = %{maj_ver} # add a Provides so users can just run "dnf install clangd." # This Provides is only present in the primary, unversioned clang package. # Users who want the compat versions can install them using the full name. -%if %{with sys_llvm} +%if %{with sys_llvm_20} Provides: clangd = %{version}-%{release} %endif @@ -478,7 +478,7 @@ Requires: python3 %description -n %{?scl_prefix}git-clang-format clang-format integration for git. -%if %{with sys_llvm} +%if %{with sys_llvm_20} %package -n python3-clang Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} @@ -557,7 +557,7 @@ The LLVM project linker. %package -n %{pkg_name_lld}-devel Summary: Libraries and header files for LLD Requires: %{pkg_name_lld}-libs%{?_isa} = %{version}-%{release} -# %if %{with sys_llvm} +# %if %{with sys_llvm_20} # lld tools are referenced in the cmake files, so we need to add lld as a # dependency. # Requires: %{pkg_name_lld}%{?_isa} = %{version}-%{release} @@ -586,7 +586,7 @@ License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} -%if %{with sys_llvm} +%if %{with sys_llvm_20} Requires: python%{python3_pkgversion}-lldb = %{version}-%{release} %endif @@ -603,7 +603,7 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %description -n %{pkg_name_lldb}-devel The package contains header files for the LLDB debugger. -%if %{with sys_llvm} +%if %{with sys_llvm_20} %package -n python%{python3_pkgversion}-lldb %{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB @@ -645,7 +645,7 @@ Requires: %{pkg_name_mlir}-static%{?_isa} = %{version}-%{release} %description -n %{pkg_name_mlir}-devel MLIR development files. -%if %{with sys_llvm} +%if %{with sys_llvm_20} %package -n python%{python3_pkgversion}-mlir %{?python_provide:%python_provide python%{python3_pkgversion}-mlir} Summary: MLIR python bindings @@ -1239,7 +1239,7 @@ install %{build_libdir}/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir # Fix multi-lib %multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h -%if %{with sys_llvm} +%if %{with sys_llvm_20} # Fix some man pages ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1 @@ -1309,7 +1309,7 @@ ln -s %{install_datadir}/clang/clang-format-diff.py %{buildroot}%{install_bindir # File in the macros file for other packages to use. We are not doing this # in the compat package, because the version macros would # conflict with # eachother if both clang and the clang compat package were installed together. -%if %{with sys_llvm} +%if %{with sys_llvm_20} # install clang python bindings mkdir -p %{buildroot}%{python3_sitelib}/clang/ @@ -1364,7 +1364,7 @@ ln -s clang++ %{buildroot}%{install_bindir}/clang++-%{maj_ver} # Create Manpage symlinks ln -s clang%{exec_suffix}.1.gz %{buildroot}%{_mandir}/man1/clang++%{exec_suffix}.1.gz -%if %{with sys_llvm} +%if %{with sys_llvm_20} ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz %endif @@ -1443,7 +1443,7 @@ rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay #region LLD installation -%if %{with sys_llvm} +%if %{with sys_llvm_20} # Required when using update-alternatives: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ touch %{buildroot}%{_bindir}/ld @@ -1459,7 +1459,7 @@ install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1 # python: fix binary libraries location liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so)) -%if %{with sys_llvm} +%if %{with sys_llvm_20} mkdir -p %{buildroot}%{python3_sitearch} # /usr/lib/../usr/lib64 == /usr/lib64, in which case mv (or cp -r) would complain # mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb @@ -1474,7 +1474,7 @@ rm -rf %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb #region mlir installation %if %{with mlir} %if %{with mlir_python_binding} -%if %{with sys_llvm} +%if %{with sys_llvm_20} mkdir -p %{buildroot}/%{python3_sitearch} mv %{buildroot}%{install_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch} %endif @@ -1510,7 +1510,7 @@ popd rm -f %{buildroot}%{_libdir}/libLLVMBOLT*.a #endregion BOLT installation -%if %{without sys_llvm} +%if %{without sys_llvm_20} # Add version suffix to binaries. Do this at the end so it includes any # additional binaries that may be been added by other steps. for f in %{buildroot}/%{install_bindir}/*; do @@ -1527,7 +1527,7 @@ done # infrastructure. Without compat, cmake points to the symlink, with compat it # points to the original file. -%if %{with sys_llvm} +%if %{with sys_llvm_20} mv %{buildroot}/%{install_bindir}/llvm-config %{buildroot}/%{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} # We still maintain a versionned symlink for consistency across llvm versions. @@ -1555,7 +1555,7 @@ install -m 0755 ../llvm-compat-libs/lib/libclang-cpp.so.%{compat_maj_ver}* %{bui install -m 0755 ../llvm-compat-libs/lib/liblldb.so.%{compat_maj_ver}* %{buildroot}%{_libdir} %endif -%if %{without sys_llvm} +%if %{without sys_llvm_20} cat < %{buildroot}%{_scl_scripts}/enable # General environment variables export PATH=%{install_bindir}\${PATH:+:\${PATH}} @@ -1983,13 +1983,13 @@ export LIT_XFAIL="$LIT_XFAIL;RISCV/mapping-syms.s" #region misc %ldconfig_scriptlets -n %{pkg_name-llvm}-libs -%if %{with sys_llvm} +%if %{with sys_llvm_20} %ldconfig_scriptlets -n %{pkg_name_lld}-libs %endif %post -n %{pkg_name_llvm}-devel %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} -%if %{with sys_llvm} +%if %{with sys_llvm_20} %{_sbindir}/update-alternatives --install %{_bindir}/llvm-config-%{maj_ver} llvm-config-%{maj_ver} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits} # During the upgrade from LLVM 16 (F38) to LLVM 17 (F39), we found out the @@ -2007,7 +2007,7 @@ done if [ $1 -eq 0 ]; then %{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{install_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} fi -%if %{with sys_llvm} +%if %{with sys_llvm_20} # When upgrading between minor versions (i.e. from x.y.1 to x.y.2), we must # not remove the alternative. # However, during a major version upgrade (i.e. from 16.x.y to 17.z.w), the @@ -2019,7 +2019,7 @@ if [[ $1 -eq 0 fi %endif -%if %{with sys_llvm} +%if %{with sys_llvm_20} %post -n %{pkg_name_lld} %{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1 @@ -2044,7 +2044,7 @@ fi #region LLVM files %files -n llvm-toolset-%{maj_ver} -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_scl_scripts}/enable %endif @@ -2209,7 +2209,7 @@ fi %{install_bindir}/llvm-tapi-diff %endif -%if %{without sys_llvm} +%if %{without sys_llvm_20} # This is for all the binaries with the version suffix. %{_bindir}/bugpoint%{exec_suffix} %{_bindir}/dsymutil%{exec_suffix} @@ -2327,7 +2327,7 @@ fi %{install_libdir}/libLLVM-%{maj_ver}%{?llvm_snapshot_version_suffix}.so %if %{with gold} %{install_libdir}/LLVMgold.so -%if %{with sys_llvm} +%if %{with sys_llvm_20} %{_libdir}/bfd-plugins/LLVMgold.so %endif %else @@ -2342,14 +2342,14 @@ fi %endif %{install_libdir}/libLTO.so* %{install_libdir}/libRemarks.so* -%if %{without sys_llvm} +%if %{without sys_llvm_20} %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf %endif %files -n %{pkg_name_llvm}-devel %license llvm/LICENSE.TXT -%if %{with sys_llvm} +%if %{with sys_llvm_20} %ghost %{_bindir}/llvm-config %{install_bindir}/llvm-config-%{__isa_bits} %else @@ -2386,7 +2386,7 @@ fi %{install_bindir}/lli-child-target %{install_bindir}/llvm-isel-fuzzer %{install_bindir}/llvm-opt-fuzzer -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/not%{exec_suffix} %{_bindir}/count%{exec_suffix} %{_bindir}/yaml-bench%{exec_suffix} @@ -2423,7 +2423,7 @@ fi %{install_bindir}/clang-cpp %{_mandir}/man1/clang-%{maj_ver}.1.gz %{_mandir}/man1/clang++-%{maj_ver}.1.gz -%if %{with sys_llvm} +%if %{with sys_llvm_20} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz %else @@ -2447,7 +2447,7 @@ fi %{install_includedir}/clang-c/ %{install_libdir}/cmake/clang %{install_bindir}/clang-tblgen -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/clang-tblgen-%{maj_ver} %endif %dir %{install_datadir}/clang/ @@ -2468,7 +2468,7 @@ fi %{install_bindir}/analyze-build %{install_bindir}/intercept-build %{install_bindir}/scan-build-py -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/scan-view-%{maj_ver} %{_bindir}/scan-build-%{maj_ver} %{_bindir}/analyze-build-%{maj_ver} @@ -2484,7 +2484,7 @@ fi %{install_datadir}/scan-view/ %{install_datadir}/scan-build/ %{_mandir}/man1/scan-build%{exec_suffix}.1.* -%if %{with sys_llvm} +%if %{with sys_llvm_20} %{python3_sitelib}/libear %{python3_sitelib}/libscanbuild %endif @@ -2531,7 +2531,7 @@ fi %{install_bindir}/clang-pseudo %{install_bindir}/clang-rename %endif -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/amdgpu-arch-%{maj_ver} %{_bindir}/clang-apply-replacements-%{maj_ver} %{_bindir}/clang-change-namespace-%{maj_ver} @@ -2597,11 +2597,11 @@ fi %files -n %{?scl_prefix}git-clang-format %license clang/LICENSE.TXT %{install_bindir}/git-clang-format -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/git-clang-format-%{maj_ver} %endif -%if %{with sys_llvm} +%if %{with sys_llvm_20} %files -n python%{python3_pkgversion}-clang %license clang/LICENSE.TXT %{python3_sitelib}/clang/ @@ -2716,7 +2716,7 @@ fi %{install_bindir}/ld.lld %{install_bindir}/ld64.lld %{install_bindir}/wasm-ld -%if %{with sys_llvm} +%if %{with sys_llvm_20} %{_mandir}/man1/ld.lld.1* %else %{_bindir}/lld%{exec_suffix} @@ -2760,7 +2760,7 @@ fi %files -n %{pkg_name_lldb} %license lldb/LICENSE.TXT %{install_bindir}/lldb* -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/lldb* %endif # Usually, *.so symlinks are kept in devel subpackages. However, the python @@ -2779,7 +2779,7 @@ fi %files -n %{pkg_name_lldb}-devel %{install_includedir}/lldb -%if %{with sys_llvm} +%if %{with sys_llvm_20} %files -n python%{python3_pkgversion}-lldb %{python3_sitearch}/lldb %endif @@ -2823,7 +2823,7 @@ fi %{install_bindir}/mlir-query %{install_bindir}/tblgen-to-irdl %endif -%if %{without sys_llvm} +%if %{without sys_llvm_20} %if %{maj_ver} >= 20 %{_bindir}/mlir-rewrite-%{maj_ver} %{_bindir}/mlir-runner-%{maj_ver} @@ -2861,7 +2861,7 @@ fi %{install_libdir}/libMLIR*.so %if %{with mlir_python_binding} -%if %{with sys_llvm} +%if %{with sys_llvm_20} %files -n python%{python3_pkgversion}-mlir %{python3_sitearch}/mlir/ %endif @@ -2949,7 +2949,7 @@ fi %{install_libdir}/libbolt_rt_hugify.a %{install_libdir}/libbolt_rt_instr.a -%if %{without sys_llvm} +%if %{without sys_llvm_20} %{_bindir}/llvm-bolt-%{maj_ver} %if %{maj_ver} >= 20 %{_bindir}/llvm-bolt-binary-analysis-%{maj_ver} @@ -2966,6 +2966,9 @@ fi #endregion files %changelog +* Fri Dec 05 2025 jchzhou - 20.1.8-3 +- Rename the 'sys_llvm' bcond to be unique for easier override in build environments + * Fri Oct 31 2025 mahailiang - 20.1.8-2 - fix loongarch64 build error