Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 23 Aug 2019 22:10:49
Message-Id: 1566598137.190919959e793f2b4837a3b32c4fb5e8648b0c2e.mpagano@gentoo
1 commit: 190919959e793f2b4837a3b32c4fb5e8648b0c2e
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 23 22:08:57 2019 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 23 22:08:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19091995
7
8 kernel-2.eclass: Add support for gcc 9.1 CPU optimization patch
9
10 See bug #692320
11 See https://github.com/graysky2/kernel_gcc_patch
12
13 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
14
15 eclass/kernel-2.eclass | 26 ++++++++++++++++++++------
16 1 file changed, 20 insertions(+), 6 deletions(-)
17
18 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
19 index 95011df82d8..784b3929d43 100644
20 --- a/eclass/kernel-2.eclass
21 +++ b/eclass/kernel-2.eclass
22 @@ -1233,17 +1233,31 @@ unipatch() {
23 local GCC_MINOR_VER=$(gcc-minor-version)
24
25 # optimization patch for gcc < 8.X and kernel > 4.13
26 - if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then
27 - if kernel_is ge 4 13 ; then
28 + if kernel_is ge 4 13 ; then
29 + if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then
30 UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch"
31 - fi
32 - # optimization patch for gcc >= 8 and kernel ge 4.13
33 - elif [[ "${GCC_MAJOR_VER}" -ge 8 ]]; then
34 - if kernel_is ge 4 13; then
35 + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch"
36 + # optimization patch for gcc >= 8 and kernel ge 4.13
37 + elif [[ "${GCC_MAJOR_VER}" -eq 8 ]]; then
38 # support old kernels for a period. For now, remove as all gcc versions required are masked
39 UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch"
40 UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
41 + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch"
42 + elif [[ "${GCC_MAJOR_VER}" -eq 9 ]] && [[ ${GCC_MINOR_VER} -ge 1 ]]; then
43 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch"
44 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
45 + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch"
46 + else
47 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch"
48 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
49 + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch"
50 + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch"
51 fi
52 + else
53 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch"
54 + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
55 + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch"
56 + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch"
57 fi
58 fi
59 done