From 5499d9bab9aba82c04f5f23641faf23a540b4627 Mon Sep 17 00:00:00 2001 From: wangqiang Date: Thu, 18 Dec 2025 15:34:54 +0800 Subject: [PATCH] Fix switch issue between main build and toolset build --- llvm-toolset-20.spec | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/llvm-toolset-20.spec b/llvm-toolset-20.spec index ba70daa..9eb1358 100644 --- a/llvm-toolset-20.spec +++ b/llvm-toolset-20.spec @@ -62,7 +62,7 @@ %global pkg_suffix %{nil} %global exec_suffix %{nil} %else -%global _scl_prefix /opt/openEuler +%global _scl_prefix /opt/%{_vendor} %{?scl:%scl_package %scl} %{!?scl:%global scl_prefix llvm-toolset-%{maj_ver}-} %{!?scl:%global pkg_name %{name}} @@ -166,13 +166,17 @@ #region packages #region main package -Name: llvm-toolset-%{maj_ver} -Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 4 -Summary: The Low Level Virtual Machine +%if %{with sys_llvm_20} +Name: llvm +%else +Name: llvm-toolset-%{maj_ver} +%endif +Version: %{maj_ver}.%{min_ver}.%{patch_ver} +Release: 5 +Summary: The Low Level Virtual Machine -License: NCSA -URL: http://llvm.org +License: NCSA +URL: http://llvm.org Source0: https://github.com/llvm/llvm-project/releases/download/llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}/%{src_tarball_dir}.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvm-project-%{maj_ver}.%{min_ver}.%{patch_ver}/%{src_tarball_dir}.tar.xz.sig @@ -266,9 +270,15 @@ BuildRequires: graphviz # This is required because we need "ps" when running LLDB tests BuildRequires: procps-ng +%if %{without sys_llvm_20} Requires: %{pkg_name_llvm} = %{version}-%{release} Requires: %{pkg_name_clang} = %{version}-%{release} Requires: %{pkg_name_lld} = %{version}-%{release} +%else +Requires: %{pkg_name_llvm}-libs%{?_isa} = %{version}-%{release} + +Provides: llvm(major) = %{maj_ver} +%endif %description LLVM is a compiler infrastructure designed for compile-time, link-time, @@ -279,6 +289,7 @@ tools as well as libraries with equivalent functionality. #endregion main package #region LLVM packages +%if %{without sys_llvm_20} %package -n %{pkg_name_llvm} Summary: The Low Level Virtual Machine @@ -291,6 +302,7 @@ LLVM is a compiler infrastructure designed for compile-time, link-time, runtime, and idle-time optimization of programs from arbitrary programming languages. The compiler infrastructure includes mirror sets of programming tools as well as libraries with equivalent functionality. +%endif %package -n %{pkg_name_llvm}-devel Summary: Libraries and header files for LLVM @@ -2048,8 +2060,8 @@ fi #endregion LLVM lit files #region LLVM files -%files -n llvm-toolset-%{maj_ver} %if %{without sys_llvm_20} +%files -n llvm-toolset-%{maj_ver} %{_scl_scripts}/enable %endif @@ -2971,6 +2983,9 @@ fi #endregion files %changelog +* Thu Dec 18 2025 wangqiang - 20.1.8-5 +- Fix switch issue between main build and toolset build + * Wed Dec 10 2025 jchzhou - 20.1.8-4 - Add unprefixed provides for mlir subpackages to address dependency issues -- Gitee