summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-11 23:35:10 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-11 23:35:10 +0000
commit02b07783b288c3e45d7d755527a8af6a53cb0fbb (patch)
tree4abefabc3e007e9b06a6e60f35eb1aa329b45cef /eclass/kernel-2.eclass
parentKeyworded ~sparc wrt #126183 (diff)
downloadgentoo-2-02b07783b288c3e45d7d755527a8af6a53cb0fbb.tar.gz
gentoo-2-02b07783b288c3e45d7d755527a8af6a53cb0fbb.tar.bz2
gentoo-2-02b07783b288c3e45d7d755527a8af6a53cb0fbb.zip
add ability to tweak the config for whiny targets
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r--eclass/kernel-2.eclass21
1 files changed, 19 insertions, 2 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 213650ec4fd3..56224251289f 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -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.169 2006/04/11 00:14:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.170 2006/04/11 23:35:10 vapier Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -445,12 +445,29 @@ compile_headers() {
ln -sf asm-${KARCH} "${S}"/include/asm
cross_pre_c_headers && return 0
- make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed"
+ make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed (${K_DEFCONFIG})"
+ if compile_headers_tweak_config ; then
+ yes "" | make oldconfig HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "2nd oldconfig failed"
+ fi
make prepare HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
make prepare-all HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
fi
}
+compile_headers_tweak_config() {
+ # some targets can be very very picky, so let's finesse the
+ # .config based upon any info we may have
+ case ${CTARGET} in
+ sh*)
+ sed -i '/CONFIG_CPU_SH/d' .config
+ echo "CONFIG_CPU_SH${CTARGET:2:1}=y" >> .config
+ return 0;;
+ esac
+
+ # no changes, so lets do nothing
+ return 1
+}
+
compile_manpages() {
einfo "Making manpages ..."
env -u ARCH -u KBUILD_OUTPUT make mandocs