From 6010ed9a5078aac5ecdd6102813e7a5dac18bfcf Mon Sep 17 00:00:00 2001 From: rfwang07 Date: Fri, 9 Aug 2024 17:06:32 +0800 Subject: [PATCH] [Sync] Sync patch from openeuler/gcc --- ...upports-optimization-for-dyn-and-pie.patch | 30 +++++++++++++++++++ gcc.spec | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch diff --git a/0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch b/0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch new file mode 100644 index 0000000..9029597 --- /dev/null +++ b/0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch @@ -0,0 +1,30 @@ +From e4b8646631ecd9f5ed767ff2c5e14371141e9194 Mon Sep 17 00:00:00 2001 +From: rfwang07 +Date: Fri, 9 Aug 2024 14:21:56 +0800 +Subject: [PATCH] bolt-plugin supports optimization for dyn and pie + +--- + bolt-plugin/bolt-plugin.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/bolt-plugin/bolt-plugin.cc b/bolt-plugin/bolt-plugin.cc +index 06cf1911a..ea3d882c9 100644 +--- a/bolt-plugin/bolt-plugin.cc ++++ b/bolt-plugin/bolt-plugin.cc +@@ -1102,9 +1102,11 @@ register_callback_function () + { + enum ld_plugin_status status; + +- if (linker_output_set && linker_output != LDPO_EXEC) ++ if (linker_output_set && linker_output != LDPO_EXEC ++ && linker_output != LDPO_DYN && linker_output != LDPO_PIE) + { +- MSG_INFO ("This linker[%d] is not for exec, just skip.", linker_output); ++ MSG_INFO ("This linker[%d] is not for exec/dyn/pie, just skip.", ++ linker_output); + return; + } + +-- +2.39.3 (Apple Git-146) + diff --git a/gcc.spec b/gcc.spec index ec89cd9..79544ae 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 62 +Release: 63 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -312,6 +312,7 @@ Patch201: 0201-Fix-bug-in-detecting-abnormal-revisit-for-bb.patch Patch202: 0202-Change-set_of-to-reg_set_p-and-add-check-for-global_.patch Patch203: 0203-Remove-erroneous-pattern-from-gimple-ifcvt.patch Patch204: 0204-Try-to-use-AI-model-to-guide-optimization.patch +Patch205: 0205-bolt-plugin-supports-optimization-for-dyn-and-pie.patch %global gcc_target_platform %{_arch}-linux-gnu %if %{build_go} @@ -968,6 +969,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch202 -p1 %patch203 -p1 %patch204 -p1 +%patch205 -p1 %build @@ -3002,6 +3004,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Fri Aug 9 2024 rfwang07 - 10.3.1-63 +- Type:Sync +- ID:NA +- SUG:NA +- DESC: Sync patch from openeuler/gcc + * Fri Jun 21 2024 Mingchuan Wu - 10.3.1-62 - Type:Sync - ID:NA -- Gitee