diff --git a/llvm-toolset-18.spec b/llvm-toolset-18.spec index 98cbc272053789bf5804f53af2fea5dba342e81c..501c848b2c4803a4e9ed9567852193909b94a740 100644 --- a/llvm-toolset-18.spec +++ b/llvm-toolset-18.spec @@ -6,6 +6,11 @@ %global os_version %{lua: print(tonumber(rpm.expand("%{dist}"):match("oe(%d+)") or 9999))} +# workaround for `dist` of oE master branch changing to .oe1 +%if %{os_version} == 1 +%global os_version 9999 +%endif + # Build sys_llvm packages or compat packages %bcond_with sys_llvm %bcond_with check @@ -48,7 +53,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}} @@ -102,7 +107,7 @@ %global pkg_name_compiler_rt %{?scl_prefix}compiler-rt %global optflags %(echo %{optflags} | sed 's/-fgcc-compatible//') -%global optflags %(echo %{optflags} | sed 's/-specs=\/usr\/lib\/rpm\/generic-hardened-cc1//') +%global optflags %(echo %{optflags} | sed 's|-specs=/usr/lib/rpm/generic-hardened-cc1||g') %ifnarch x86_64 %global optflags %(echo %{optflags} | sed 's/-fstack-clash-protection//') # may affect cmake check for fpic @@ -147,9 +152,9 @@ #region packages #region main package -Name: llvm-toolset-%{maj_ver} +Name: llvm-toolset-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 6 +Release: 11 Summary: The Low Level Virtual Machine License: NCSA @@ -735,6 +740,11 @@ Documentation for LLVM libunwind # shebang_fix part removed +# update Gnu target triples, make it friendly to all openEuler based distribution +%if "%{_vendor}" != "openEuler" +sed -i 's/"\([a-zA-Z0-9_-]\+\)-openEuler-linux"/"\1-openEuler-linux", "\1-%{_vendor}-linux"/g' %{build_src_dir}/clang/lib/Driver/ToolChains/Gnu.cpp +%endif + #endregion prep #region build @@ -2786,6 +2796,23 @@ fi #endregion files %changelog +* Fri Oct 17 2025 wangqiang - 18.1.8-11 +- Fix a macro expand issue + +* Wed Oct 15 2025 liyunfei - 18.1.8-10 +- update target triples for all openEuler based distribution. + +* Wed Oct 15 2025 liyunfei - 18.1.8-9 +- Revert replace os_version with dist +- default os_version to 2403 + +* Mon Oct 13 2025 Wang Qiang - 18.1.8-8 +- Replaced the hardcoded /opt/openEuler path with /opt/\%{_vendor} + +* Tue Jun 10 2025 liyunfei - 18.1.8-7 +- replace os_version with dist +- default dist to .oe2403 + * Fri May 16 2025 Wenlong Zhang - 18.1.8-6 - Fix libomptarget.rtl.amdgpu|cuda|loonarch64.so file not found