From 784d4b7373e6a85021306d6eda2a1346e950953c Mon Sep 17 00:00:00 2001 From: liyunfei Date: Mon, 14 Jul 2025 10:46:55 +0800 Subject: [PATCH] update to llvm-for-oE-19.1.7-2506.0.2 --- .gitattributes | 2 +- ...piler-openEuler-oeaware-schedule-opt.patch | 135 ------------------ ...r.gz => llvm-for-oE-19.1.7-2506.0.2.tar.gz | 4 +- llvm-toolset-19.spec | 9 +- 4 files changed, 9 insertions(+), 141 deletions(-) delete mode 100644 0004-compiler-openEuler-oeaware-schedule-opt.patch rename llvm-for-oE-19.1.7-2506.0.1.tar.gz => llvm-for-oE-19.1.7-2506.0.2.tar.gz (32%) diff --git a/.gitattributes b/.gitattributes index f087b42..8ce7b72 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -*.tar.gz filter=lfs diff=lfs merge=lfs -text +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/0004-compiler-openEuler-oeaware-schedule-opt.patch b/0004-compiler-openEuler-oeaware-schedule-opt.patch deleted file mode 100644 index a943d81..0000000 --- a/0004-compiler-openEuler-oeaware-schedule-opt.patch +++ /dev/null @@ -1,135 +0,0 @@ -From fc738b99d4d5ad4e1a584c3f09b119a7134395c2 Mon Sep 17 00:00:00 2001 -From: lzy -Date: Wed, 11 Jun 2025 17:16:11 +0800 -Subject: [PATCH] compiler & openEuler oeaware schedule opt - ---- - lld/ELF/Config.h | 1 + - lld/ELF/Driver.cpp | 1 + - lld/ELF/SyntheticSections.cpp | 13 +++++++++++++ - lld/ELF/SyntheticSections.h | 15 +++++++++++++++ - lld/ELF/Writer.cpp | 1 + - lld/test/ELF/oeaware.s | 17 +++++++++++++++++ - 6 files changed, 48 insertions(+) - create mode 100644 lld/test/ELF/oeaware.s - -diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h -index 28726d48e428..4a2bf3476a3c 100644 ---- a/lld/ELF/Config.h -+++ b/lld/ELF/Config.h -@@ -338,6 +338,7 @@ struct Config { - uint8_t zStartStopVisibility; - bool zText; - bool zRetpolineplt; -+ int8_t zOeawarePolicy; - bool zWxneeded; - DiscardPolicy discard; - GnuStackKind zGnustack; -diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp -index eb6734dfd458..f874a41cd087 100644 ---- a/lld/ELF/Driver.cpp -+++ b/lld/ELF/Driver.cpp -@@ -1501,6 +1501,7 @@ static void readConfigs(opt::InputArgList &args) { - config->zStartStopVisibility = getZStartStopVisibility(args); - config->zText = getZFlag(args, "text", "notext", true); - config->zWxneeded = hasZOption(args, "wxneeded"); -+ config->zOeawarePolicy = args::getZOptionValue(args, OPT_z, "oeaware-policy", -1); - setUnresolvedSymbolPolicy(args); - config->power10Stubs = args.getLastArgValue(OPT_power10_stubs_eq) != "no"; - -diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp -index 41053c647275..78efef830af0 100644 ---- a/lld/ELF/SyntheticSections.cpp -+++ b/lld/ELF/SyntheticSections.cpp -@@ -4922,8 +4922,21 @@ template void elf::createSyntheticSections() { - add(*in.shStrTab); - if (in.strTab) - add(*in.strTab); -+ if (config->zOeawarePolicy != -1) { -+ in.oeaware = std::make_unique(); -+ add(*in.oeaware); -+ } -+} -+ -+void OeAware::writeTo(uint8_t *buf) { -+ if (config->zOeawarePolicy != -1) -+ write32(buf, config->zOeawarePolicy); - } - -+size_t OeAware::getSize() const { return 4; } -+ -+void OeAware::finalizeContents() {} -+ - InStruct elf::in; - - std::vector elf::partitions; -diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h -index d4169e1e1aca..8f11ad2b7648 100644 ---- a/lld/ELF/SyntheticSections.h -+++ b/lld/ELF/SyntheticSections.h -@@ -1425,6 +1425,20 @@ private: - SmallVector symbols; - }; - -+class OeAware : public SyntheticSection { -+public: -+ OeAware() -+ : SyntheticSection(llvm::ELF::SHF_ALLOC | llvm::ELF::SHF_WRITE, -+ llvm::ELF::SHT_NOTE, /*alignment=*/4, ".LLVM4OE_oeAware") -+ {} -+ void writeTo(uint8_t *buf) override; -+ size_t getSize() const override; -+ void finalizeContents() override; -+ -+private: -+ uint64_t size; -+}; -+ - template void createSyntheticSections(); - InputSection *createInterpSection(); - MergeInputSection *createCommentSection(); -@@ -1512,6 +1526,7 @@ struct InStruct { - std::unique_ptr strTab; - std::unique_ptr symTab; - std::unique_ptr symTabShndx; -+ std::unique_ptr oeaware; - - void reset(); - }; -diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp -index 8e3a746a08eb..e22037f31c9e 100644 ---- a/lld/ELF/Writer.cpp -+++ b/lld/ELF/Writer.cpp -@@ -1961,6 +1961,7 @@ template void Writer::finalizeSections() { - llvm::TimeTraceScope timeScope("Finalize synthetic sections"); - - finalizeSynthetic(in.bss.get()); -+ finalizeSynthetic(in.oeaware.get()); - finalizeSynthetic(in.bssRelRo.get()); - finalizeSynthetic(in.symTabShndx.get()); - finalizeSynthetic(in.shStrTab.get()); -diff --git a/lld/test/ELF/oeaware.s b/lld/test/ELF/oeaware.s -new file mode 100644 -index 000000000000..50f66c228a34 ---- /dev/null -+++ b/lld/test/ELF/oeaware.s -@@ -0,0 +1,17 @@ -+# REQUIRES: target=aarch64{{.*}} -+# RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux-gnu %s -o %t.o -+# RUN: ld.lld %t.o -o %ta -z oeaware-policy=1 -+# RUN: llvm-objdump -j .LLVM4OE_oeAware %ta -d | FileCheck %s -+ -+# CHECK: <.LLVM4OE_oeAware>: -+# CHECK-NEXT: 00000001 -+ -+# RUN: ld.lld %t.o -o %tb -z oeaware-policy=2 -+# RUN: llvm-objdump -j .LLVM4OE_oeAware %tb -d | FileCheck %s --check-prefix=OPTION -+ -+# OPTION: <.LLVM4OE_oeAware>: -+# OPTION-NEXT: 00000002 -+ -+.globl _start -+_start: nop -+.bss; .byte 0 --- -Gitee diff --git a/llvm-for-oE-19.1.7-2506.0.1.tar.gz b/llvm-for-oE-19.1.7-2506.0.2.tar.gz similarity index 32% rename from llvm-for-oE-19.1.7-2506.0.1.tar.gz rename to llvm-for-oE-19.1.7-2506.0.2.tar.gz index d1fbc1f..22e84c0 100644 --- a/llvm-for-oE-19.1.7-2506.0.1.tar.gz +++ b/llvm-for-oE-19.1.7-2506.0.2.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:061faff3c4557f12fdff9cfe94ddd79c72b02bed134c3f37b9669fc25963a05a -size 217538551 +oid sha256:8b52b41ade2ab4da096da2a75a2516ecdecb600fc337383c765bcffeacff59f2 +size 217538887 diff --git a/llvm-toolset-19.spec b/llvm-toolset-19.spec index bc933ab..d511947 100644 --- a/llvm-toolset-19.spec +++ b/llvm-toolset-19.spec @@ -36,7 +36,7 @@ %undefine __cmake_in_source_build -%global src_tarball llvm-for-oE-19.1.7-2506.0.1 +%global src_tarball llvm-for-oE-19.1.7-2506.0.2 %global src_tarball_dir llvm-project-%{src_tarball} #region LLVM globals @@ -160,7 +160,7 @@ #region main package Name: llvm-toolset-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 10 +Release: 11 Summary: The Low Level Virtual Machine License: NCSA @@ -177,7 +177,6 @@ Source3: CMakeLists.txt.libomp Patch0001: 0001-PATCH-clang-Don-t-install-static-libraries.patch Patch0002: 0002-Always-build-shared-libs-for-LLD.patch Patch0003: 0003-PATCH-Bolt-CMake-Don-t-export-bolt-libraries-in-LLVM.patch -Patch0004: 0004-compiler-openEuler-oeaware-schedule-opt.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -2959,6 +2958,10 @@ fi #endregion files %changelog +* Mon Jul 14 2025 liyunfei - 19.1.7-11 +- update to llvm-for-oE-19.1.7-2506.0.2 +- release note: https://gitee.com/openeuler/llvm-project/releases/tag/llvm-for-oE-19.1.7-2506.0.2 + * Thu Jun 12 2025 liyunfei - 19.1.7-10 - Add compiler & openEuler oeaware schedule opt -- Gitee