From 87343d716a6b8837af5d98a5fa08dfd9d4c352dc Mon Sep 17 00:00:00 2001 From: d00573793 Date: Tue, 20 Jun 2023 00:14:15 +0800 Subject: [PATCH] [Sync] Sync patch from openeuler/gcc --- ...utline-atomics-improves-libgomp-perf.patch | 34 +++++++++++++++++++ gcc.spec | 10 +++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch diff --git a/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch b/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch new file mode 100644 index 0000000..019af78 --- /dev/null +++ b/0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch @@ -0,0 +1,34 @@ +From 8aeb2d4d05f6c0ba949fa3fa85ea5ac75a7255c9 Mon Sep 17 00:00:00 2001 +From: d00573793 +Date: Mon, 19 Jun 2023 23:56:49 +0800 +Subject: [PATCH] [GOMP] Enabling moutline-atomics improves libgomp performance + in multi-thread scenarios + +Libgomp is used in multi-thread scenarios, +Enabling moutline-atomics improves performance. + +diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt +index 4790a31e3..e5b558be0 100644 +--- a/libgomp/configure.tgt ++++ b/libgomp/configure.tgt +@@ -30,6 +30,17 @@ if test $gcc_cv_have_tls = yes ; then + esac + fi + ++# Enabling moutline-atomics improves libgomp performance in multi-thread scenarios. ++case "${target_cpu}" in ++ aarch64*) ++ case "${target}" in ++ aarch64*-*-linux*) ++ XCFLAGS="${XCFLAGS} -moutline-atomics" ++ ;; ++ esac ++ ;; ++esac ++ + # Since we require POSIX threads, assume a POSIX system by default. + config_path="posix" + +-- +2.27.0.windows.1 + diff --git a/gcc.spec b/gcc.spec index 5974143..2302f66 100644 --- a/gcc.spec +++ b/gcc.spec @@ -61,7 +61,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: gcc Version: %{gcc_version} -Release: 35 +Release: 36 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL: https://gcc.gnu.org @@ -209,6 +209,7 @@ Patch98: 0098-AArch64-Rewrite-the-tsv110-option.patch Patch99: 0099-Struct-Reorg-Add-escape-propagate-on-external-functi.patch Patch100: 0100-PGO-kernel-Add-fkernel-pgo-option-to-support-PGO-ker.patch Patch101: 0101-To-resolve-the-SPEC-.548-fluctuation-problem-revert-.patch +Patch102: 0102-GOMP-Enabling-moutline-atomics-improves-libgomp-perf.patch %global gcc_target_platform %{_arch}-linux-gnu @@ -763,6 +764,7 @@ not stable, so plugins must be rebuilt any time GCC is updated. %patch99 -p1 %patch100 -p1 %patch101 -p1 +%patch102 -p1 %build @@ -2787,6 +2789,12 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Mon Jun 19 2023 dingguangya - 10.3.1-36 +- Type:Spec +- ID:NA +- SUG:NA +- DESC: Sync patch from openeuler/gcc + * Wed Jun 14 2023 Wang Ding - 10.3.1-35 - Type:Spec - ID:NA -- Gitee