diff options
author | Mike Pagano <mpagano@gentoo.org> | 2019-08-23 18:08:57 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2019-08-23 18:08:57 -0400 |
commit | 190919959e793f2b4837a3b32c4fb5e8648b0c2e (patch) | |
tree | 83523687fa446ccb3009503f5f787b6e53bf8dd5 /eclass/kernel-2.eclass | |
parent | net-print/cups-filters: Removed old (diff) | |
download | gentoo-190919959e793f2b4837a3b32c4fb5e8648b0c2e.tar.gz gentoo-190919959e793f2b4837a3b32c4fb5e8648b0c2e.tar.bz2 gentoo-190919959e793f2b4837a3b32c4fb5e8648b0c2e.zip |
kernel-2.eclass: Add support for gcc 9.1 CPU optimization patch
See bug #692320
See https://github.com/graysky2/kernel_gcc_patch
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 95011df82d87..784b3929d436 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1233,17 +1233,31 @@ unipatch() { local GCC_MINOR_VER=$(gcc-minor-version) # optimization patch for gcc < 8.X and kernel > 4.13 - if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then - if kernel_is ge 4 13 ; then + if kernel_is ge 4 13 ; then + if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" - fi - # optimization patch for gcc >= 8 and kernel ge 4.13 - elif [[ "${GCC_MAJOR_VER}" -ge 8 ]]; then - if kernel_is ge 4 13; then + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + # optimization patch for gcc >= 8 and kernel ge 4.13 + elif [[ "${GCC_MAJOR_VER}" -eq 8 ]]; then # support old kernels for a period. For now, remove as all gcc versions required are masked UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" + elif [[ "${GCC_MAJOR_VER}" -eq 9 ]] && [[ ${GCC_MINOR_VER} -ge 1 ]]; then + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + else + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" fi + else + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc.patch" + UNIPATCH_DROP+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" + UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch" + UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc91.patch" fi fi done |