# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.297 2014/11/28 17:40:20 mpagano Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.298 2015/02/13 01:30:50 mpagano Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
if use experimental ; then
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"
debug-print "genpatches tarball: $tarball"
+
+ # check gcc version < 4.9.X uses patch 5000 and = 4.9.X uses patch 5010
+ if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -ne 9 ]]; then
+ # drop 5000_enable-additional-cpu-optimizations-for-gcc-4.9.patch
+ UNIPATCH_EXCLUDE+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch"
+ else
+ #drop 5000_enable-additional-cpu-optimizations-for-gcc.patch
+ UNIPATCH_EXCLUDE+=" 5000_enable-additional-cpu-optimizations-for-gcc.patch"
+ fi
+
fi
else
UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}"