Adding a warning for users using gcc-4 on linux-2.4 based kernel versions.
authorChristian Heim <phreak@gentoo.org>
Wed, 6 Sep 2006 18:14:46 +0000 (18:14 +0000)
committerChristian Heim <phreak@gentoo.org>
Wed, 6 Sep 2006 18:14:46 +0000 (18:14 +0000)
eclass/kernel-2.eclass

index 74de93a6f5bad0f6f492296049c25ca07eba8dce..771686b1d7c9db87603ce91e792d4bce2322482a 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.191 2006/09/06 03:10:01 lu_zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.192 2006/09/06 18:14:46 phreak Exp $
 
 # Description: kernel.eclass rewrite for a clean base regarding the 2.6
 #              series of kernel with back-compatibility for 2.4
@@ -57,7 +57,7 @@
 # UNIPATCH_STRICTORDER - if this is set places patches into directories of
 #                                                order, so they are applied in the order passed
 
-inherit toolchain-funcs versionator multilib
+inherit eutils toolchain-funcs versionator multilib
 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install pkg_preinst pkg_postinst
 
 # Added by Daniel Ostrow <dostrow@gentoo.org>
@@ -1027,6 +1027,20 @@ kernel-2_pkg_postinst() {
 }
 
 kernel-2_pkg_setup() {
+       if kernel_is 2 4; then
+               if [ "$( gcc-major-version )" -eq "4" ] ; then
+                       echo
+                       ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!"
+                       ewarn "Either switch to another gcc-version (via gcc-config) or use a"
+                       ewarn "newer kernel that supports gcc-4."
+                       echo
+                       ewarn "Also be aware that bugreports about gcc-4 not working"
+                       ewarn "with linux-2.4 based ebuilds will be closed as INVALID!"
+                       echo
+                       epause 10
+               fi
+       fi
+
        ABI="${KERNEL_ABI}"
        [[ ${ETYPE} == headers ]] && setup_headers
        [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."