diff --git a/0121-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch b/0121-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch new file mode 100644 index 0000000000000000000000000000000000000000..f3e015017849cb9e35b1580e0731b24141d81ce4 --- /dev/null +++ b/0121-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch @@ -0,0 +1,27 @@ +From 7f7d120824f6c9c8a79ab0086a07125680790645 Mon Sep 17 00:00:00 2001 +From: xiabangfeng +Date: Fri, 9 Aug 2024 07:22:08 +0000 +Subject: [PATCH] [Strcut-Reorg] fix spec2017/505 build issue with + -fipa-struct-reorg=5 the "pc_gptr" should be added to "varpool_node" after + creating + +Change-Id: I0a0a96b9c28a45b131fbaf87bdca882541fea28c +--- + gcc/ipa-struct-reorg/ipa-struct-reorg.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/ipa-struct-reorg/ipa-struct-reorg.c b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +index dcfa7cd9535..10c73fb87d7 100644 +--- a/gcc/ipa-struct-reorg/ipa-struct-reorg.c ++++ b/gcc/ipa-struct-reorg/ipa-struct-reorg.c +@@ -508,6 +508,7 @@ srtype::create_global_ptr_for_pc () + tree new_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, new_name, new_type); + set_var_attributes (new_var); + pc_gptr = new_var; ++ varpool_node::add (pc_gptr); + + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, "\nType: %s has create global header for pointer" +-- +2.34.1 + diff --git a/gcc.spec b/gcc.spec index d99bd0b282396f749a95167a3a6c7983d4b955f5..fb6676cf1d2a6be728142697ae40109a3102eaf8 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 28 +Release: 29 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -228,6 +228,7 @@ Patch117: 0117-aarch64-Remove-below_hard_fp_saved_regs_size.patch Patch118: 0118-aarch64-Make-stack-smash-canary-protect-saved-registers.patch Patch119: 0119-ix86-Don-t-use-the-m-constraint-for-x86_64_general_o.patch Patch120: 0120-Backport-Fix-ICE-Don-t-generate-integer-mask-compari.patch +Patch121: 0121-Strcut-Reorg-fix-spec2017-505-build-issue-with-fipa-.patch %global gcc_target_platform %{_arch}-linux-gnu @@ -801,6 +802,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch118 -p1 %patch119 -p1 %patch120 -p1 +%patch121 -p1 %build @@ -2829,6 +2831,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Thu Aug 22 2024 wuxinghang - 10.3.1-29 +- Type:Sync +- ID:NA +- SUG:NA +- DESC:Sync patch from openeuler/gcc fix spec2017/505 build issue + * Mon Apr 15 2024 huyubiao - 10.3.1-28 - Type:SPEC - ID:NA