!311 [sync] PR-304: [Sync] Sync patch from openeuler/gcc

From: @openeuler-sync-bot 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
This commit is contained in:
openeuler-ci-bot 2023-06-27 01:48:40 +00:00 committed by Gitee
commit bbcffa46fc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 8aeb2d4d05f6c0ba949fa3fa85ea5ac75a7255c9 Mon Sep 17 00:00:00 2001
From: d00573793 <dingguangya1@huawei.com>
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

View File

@ -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 <dingguangya1@huawei.com> - 10.3.1-36
- Type:Spec
- ID:NA
- SUG:NA
- DESC: Sync patch from openeuler/gcc
* Wed Jun 14 2023 Wang Ding <wangding16@huawei.com> - 10.3.1-35
- Type:Spec
- ID:NA