public inbox for gentoo-kernel@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-kernel] [PATCH] Update eclass to support gcc9 cpu optimizations
@ 2019-08-07 13:19 Mike Pagano
  0 siblings, 0 replies; only message in thread
From: Mike Pagano @ 2019-08-07 13:19 UTC (permalink / raw
  To: gentoo-kernel

Support gcc9 cpu optimzation patch.

Any better thoughts on handling this in a 
cleaner, easily maintainable manner ?

Signed-off-by: Mike Pagano <mpagano@gentoo.org>
---
 eclass/kernel-2.eclass | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 1b2b5d3e8..0b5a53aa2 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1234,14 +1234,29 @@ unipatch() {
      if [[ ${GCC_MAJOR_VER} -lt 8 ]] && [[ ${GCC_MAJOR_VER} -gt 4 ]]; then
        if kernel_is ge 4 13 ; then
          UNIPATCH_DROP+=" 5011_enable-cpu-optimizations-for-gcc8.patch"
+         UNIPATCH_DROP+=" 5012_enable-cpu-optimizations-for-gcc9.patch"
        fi
-     # optimization patch for gcc >= 8 and kernel ge 4.13
-     elif [[ "${GCC_MAJOR_VER}" -ge 8 ]]; then
+     # optimization patch for gcc = 8 and kernel ge 4.13
+     elif [[ "${GCC_MAJOR_VER}" -eq 8 ]]; then
        if kernel_is ge 4 13; 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-gcc9.patch"
        fi
+     # optimization patch for gcc = 9 and kernel ge 4.13
+     elif [[ "${GCC_MAJOR_VER}" -eq 9 ]]; then
+       if kernel_is ge 4 13; 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+=" 5011_enable-cpu-optimizations-for-gcc8.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-gcc9.patch"
      fi
    fi
  done
-- 
2.21.0

-- 
Mike Pagano
Gentoo Developer - Kernel Project
Gentoo Sources - Member
E-Mail     : mpagano@gentoo.org
GnuPG FP   : EEE2 601D 0763 B60F 848C  9E14 3C33 C650 B576 E4E3
Public Key : http://pgp.mit.edu:11371/pks/lookup?search=0xB576E4E3&op=index


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-07 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 13:19 [gentoo-kernel] [PATCH] Update eclass to support gcc9 cpu optimizations Mike Pagano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox