diff --git a/0006-Propeller-bugfix-for-MachineBasicBlock-hash-set.patch b/0006-Propeller-bugfix-for-MachineBasicBlock-hash-set.patch new file mode 100644 index 0000000000000000000000000000000000000000..e91b8c404a7e25ca4652e25850c16194218cd0f3 --- /dev/null +++ b/0006-Propeller-bugfix-for-MachineBasicBlock-hash-set.patch @@ -0,0 +1,15 @@ +diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp +index 9b985f9f0aff..6e58c8fb2946 100644 +--- a/llvm/lib/CodeGen/BasicBlockSections.cpp ++++ b/llvm/lib/CodeGen/BasicBlockSections.cpp +@@ -319,7 +319,8 @@ void computeBBHash(MachineFunction &MF) { + } + } + } +- MBB.setHash(Hash); ++ if (MBB.getBBID()) ++ MBB.setHash(Hash); + } + } + +-- \ No newline at end of file diff --git a/llvm-for-oE-17.0.6-2506.0.4.tar.gz b/llvm-for-oE-17.0.6-2509.0.1.tar.gz similarity index 32% rename from llvm-for-oE-17.0.6-2506.0.4.tar.gz rename to llvm-for-oE-17.0.6-2509.0.1.tar.gz index 171f896de39b0f6dac45da2dda89362360f79b53..df9aef5c5ba96d6b6c1b13397801837eac539d25 100644 --- a/llvm-for-oE-17.0.6-2506.0.4.tar.gz +++ b/llvm-for-oE-17.0.6-2509.0.1.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db05405706279885e543dd562d7f2887fd433eb10dae819811df7d588e8548b3 -size 212541296 +oid sha256:3437c2ca8c6e2fc0083e3db05e884bd5cd2c124ba51b902a8cb2e5bb13312a04 +size 212672038 diff --git a/llvm.spec b/llvm.spec index 20a131143a86e1a53999e306111b634b1e49d940..f77fbe3a45faafb3c66ff36877d1660c5b93866b 100644 --- a/llvm.spec +++ b/llvm.spec @@ -6,6 +6,10 @@ %global os_version %{lua: print(tonumber(rpm.expand("%{dist}"):match("oe(%d+)") or 9999))} +%if %{os_version} == 1 +%global os_version 9999 +%endif + # Build sys_llvm packages or compat packages %bcond_without sys_llvm %bcond_without check @@ -27,7 +31,7 @@ %undefine __cmake_in_source_build -%global src_tarball llvm-for-oE-17.0.6-2506.0.4 +%global src_tarball llvm-for-oE-17.0.6-2509.0.1 %global src_tarball_dir llvm-project-%{src_tarball} #region LLVM globals @@ -99,8 +103,6 @@ %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//') %ifnarch x86_64 %global optflags %(echo %{optflags} | sed 's/-fstack-clash-protection//') # may affect cmake check for fpic @@ -151,7 +153,7 @@ Name: llvm Name: llvm-toolset-%{maj_ver} %endif Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 45 +Release: 47 Summary: The Low Level Virtual Machine License: NCSA @@ -173,6 +175,7 @@ Patch0004: 0004-remove-cmake_minimum_required.patch %if %{with bisheng_autotuner} Patch0005: 0005-Fix-for-building-autotuner-with-mlir.patch %endif +Patch0006: 0006-Propeller-bugfix-for-MachineBasicBlock-hash-set.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -797,9 +800,6 @@ Documentation for LLVM libunwind %global runtimes %{runtimes};libcxx;libcxxabi;libunwind %endif -# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. -export ASMFLAGS="%{build_cflags}" - # We set CLANG_DEFAULT_PIE_ON_LINUX=OFF and PPC_LINUX_DEFAULT_IEEELONGDOUBLE=ON to match the # defaults used by Fedora's GCC. @@ -1015,6 +1015,11 @@ export ASMFLAGS="%{build_cflags}" extra_cmake_args='' #endregion cmake options +# set flags for build +export CFLAGS="%{build_cflags}" +export CXXFLAGS="%{build_cxxflags}" +export ASMFLAGS="%{build_cflags}" + %if %{with ACPO} echo "enable ACPO" export CFLAGS="-Wp,-DENABLE_ACPO ${CFLAGS}" @@ -1659,7 +1664,7 @@ reset_test_opts #region Test LLVM reset_test_opts # Xfail testing of update utility tools -export LIT_XFAIL="tools/UpdateTestChecks" +export LIT_XFAIL="tools/UpdateTestChecks;CodeGen/Hexagon/loop-prefetch.ll" %build_tool %cmake_target_opts check-llvm #endregion Test LLVM @@ -2878,6 +2883,13 @@ fi #endregion files %changelog +* Wed Aug 27 2025 liyunfei - 17.0.6-47 +- update to llvm-for-oe-17.0.6-2509.0.1 +- release-note https://gitee.com/openeuler/llvm-project/releases/tag/llvm-for-oE-17.0.6-2509.0.1 + +* Wed Aug 20 2025 liyunfei - 17.0.6-46 +- fix missing hardening compiler options + * Wed Jun 18 2025 liyunfei - 17.0.6-45 - update to llvm-for-oe-17.0.6-2506.0.4 - release-note https://gitee.com/openeuler/llvm-project/releases/tag/llvm-for-oE-17.0.6-2506.0.4