!326 [sync] PR-325: [Sync] Sync patch from openeuler/gcc
From: @openeuler-sync-bot Reviewed-by: @huang-xiaoquan Signed-off-by: @huang-xiaoquan
This commit is contained in:
commit
677f05d3bf
@ -0,0 +1,44 @@
|
|||||||
|
From 9dc6d315ba350c9113f486ec897217a82838fb73 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Xiong Zhou <xiongzhou4@huawei.com>
|
||||||
|
Date: Mon, 7 Aug 2023 14:44:56 +0800
|
||||||
|
Subject: [PATCH 1/2] [PGO kernel] Add fkernel-pgo option to support PGO kernel
|
||||||
|
compilation.
|
||||||
|
|
||||||
|
---
|
||||||
|
gcc/common.opt | 4 ++++
|
||||||
|
gcc/tree-profile.cc | 4 +++-
|
||||||
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gcc/common.opt b/gcc/common.opt
|
||||||
|
index e365a48bc..bd3b7dcb1 100644
|
||||||
|
--- a/gcc/common.opt
|
||||||
|
+++ b/gcc/common.opt
|
||||||
|
@@ -2363,6 +2363,10 @@ fprofile-generate=
|
||||||
|
Common Joined RejectNegative
|
||||||
|
Enable common options for generating profile info for profile feedback directed optimizations, and set -fprofile-dir=.
|
||||||
|
|
||||||
|
+fkernel-pgo
|
||||||
|
+Common Var(flag_kernel_pgo) Optimization Init(0)
|
||||||
|
+Disable TLS setting of instrumentation variables to support PGO kernel compilation in -fprofile-generate, as kernel does not support TLS.
|
||||||
|
+
|
||||||
|
fprofile-info-section
|
||||||
|
Common RejectNegative
|
||||||
|
Register the profile information in the .gcov_info section instead of using a constructor/destructor.
|
||||||
|
diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc
|
||||||
|
index 6d40401f8..e7646f1a1 100644
|
||||||
|
--- a/gcc/tree-profile.cc
|
||||||
|
+++ b/gcc/tree-profile.cc
|
||||||
|
@@ -108,7 +108,9 @@ init_ic_make_global_vars (void)
|
||||||
|
DECL_ARTIFICIAL (ic_tuple_var) = 1;
|
||||||
|
DECL_INITIAL (ic_tuple_var) = NULL;
|
||||||
|
DECL_EXTERNAL (ic_tuple_var) = 1;
|
||||||
|
- if (targetm.have_tls)
|
||||||
|
+ /* Disable TLS setting when compiling kernel in -fprofile-generate,
|
||||||
|
+ as kernel does not support TLS. */
|
||||||
|
+ if (targetm.have_tls && !flag_kernel_pgo)
|
||||||
|
set_decl_tls_model (ic_tuple_var, decl_default_tls_model (ic_tuple_var));
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
1470
0024-Struct-Reorg-Refactoring-and-merge-reorder-fields-in.patch
Normal file
1470
0024-Struct-Reorg-Refactoring-and-merge-reorder-fields-in.patch
Normal file
File diff suppressed because it is too large
Load Diff
10
gcc.spec
10
gcc.spec
@ -2,7 +2,7 @@
|
|||||||
%global gcc_major 12
|
%global gcc_major 12
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
# %%{release}, append them after %%{gcc_release} on Release: line.
|
# %%{release}, append them after %%{gcc_release} on Release: line.
|
||||||
%global gcc_release 8
|
%global gcc_release 9
|
||||||
|
|
||||||
%global _unpackaged_files_terminate_build 0
|
%global _unpackaged_files_terminate_build 0
|
||||||
%global _performance_build 1
|
%global _performance_build 1
|
||||||
@ -157,6 +157,8 @@ Patch19: 0019-fp-model-Enable-fp-model-on-kunpeng.patch
|
|||||||
Patch20: 0020-simdmath-Enable-simdmath-on-kunpeng.patch
|
Patch20: 0020-simdmath-Enable-simdmath-on-kunpeng.patch
|
||||||
Patch21: 0021-StructReorderFields-Structure-reorder-fields.patch
|
Patch21: 0021-StructReorderFields-Structure-reorder-fields.patch
|
||||||
Patch22: 0022-DFE-Add-Dead-Field-Elimination-in-Struct-Reorg.patch
|
Patch22: 0022-DFE-Add-Dead-Field-Elimination-in-Struct-Reorg.patch
|
||||||
|
Patch23: 0023-PGO-kernel-Add-fkernel-pgo-option-to-support-PGO-ker.patch
|
||||||
|
Patch24: 0024-Struct-Reorg-Refactoring-and-merge-reorder-fields-in.patch
|
||||||
|
|
||||||
# On ARM EABI systems, we do want -gnueabi to be part of the
|
# On ARM EABI systems, we do want -gnueabi to be part of the
|
||||||
# target triple.
|
# target triple.
|
||||||
@ -645,6 +647,8 @@ not stable, so plugins must be rebuilt any time GCC is updated.
|
|||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch21 -p1
|
%patch21 -p1
|
||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
|
%patch23 -p1
|
||||||
|
%patch24 -p1
|
||||||
|
|
||||||
echo '%{_vendor} %{version}-%{release}' > gcc/DEV-PHASE
|
echo '%{_vendor} %{version}-%{release}' > gcc/DEV-PHASE
|
||||||
|
|
||||||
@ -2748,6 +2752,10 @@ end
|
|||||||
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
%doc rpm.doc/changelogs/libcc1/ChangeLog*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 29 2023 huangxiaoquan <huangxiaoquan1@huawei.com> 12.3.1-9
|
||||||
|
- Type: Sync
|
||||||
|
- DESC: Sync patch from openeuler/gcc part 2
|
||||||
|
|
||||||
* Tue Aug 29 2023 huangxiaoquan <huangxiaoquan1@huawei.com> 12.3.1-8
|
* Tue Aug 29 2023 huangxiaoquan <huangxiaoquan1@huawei.com> 12.3.1-8
|
||||||
- Type: Sync
|
- Type: Sync
|
||||||
- DESC: Sync patch from openeuler/gcc
|
- DESC: Sync patch from openeuler/gcc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user