Fixed bugs: 75034 76849 74655
authorJohn Mylchreest <johnm@gentoo.org>
Thu, 6 Jan 2005 13:58:15 +0000 (13:58 +0000)
committerJohn Mylchreest <johnm@gentoo.org>
Thu, 6 Jan 2005 13:58:15 +0000 (13:58 +0000)
eclass/kernel-2.eclass
eclass/linux-info.eclass
eclass/linux-mod.eclass

index 20c5f2dd69748607223b785582de3649bd96e60a..14c5bf8fe3db689ea8649559543c6d0fdc6ffc41 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.68 2005/01/01 03:37:23 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.69 2005/01/06 13:58:15 johnm Exp $
 
 # Description: kernel.eclass rewrite for a clean base regarding the 2.6
 #              series of kernel with back-compatibility for 2.4
@@ -63,9 +63,9 @@ kernel_is() {
        # And lets add a sanity check
        [ -z "${KV_FULL}" ] && return 1 
 
-       local RESULT operator value test
+       local RESULT operator test value
        RESULT=0
-       
+
        operator="="
        if [ "${1}" == "lt" ]
        then
@@ -77,7 +77,7 @@ kernel_is() {
                shift
        elif [ "${1}" == "le" ]
        then
-               operator="-le"
+       operator="-le"
                shift
        elif [ "${1}" == "ge" ]
        then
@@ -87,17 +87,21 @@ kernel_is() {
 
        if [ -n "${1}" ]
        then
-               [ ${KV_MAJOR} ${operator} ${1} ] || RESULT=1
+               value="${value}${1}"
+               test="${test}${KV_MAJOR}"
        fi
        if [ -n "${2}" ]
        then
-               [ ${KV_MINOR} ${operator} ${2} -a ${RESULT} -eq 0 ] || RESULT=1
+               value="${value}${2}"
+               test="${test}${KV_MINOR}"
        fi
        if [ -n "${3}" ]
        then
-               [ ${KV_PATCH} ${operator} ${3} -a ${RESULT} -eq 0 ] || RESULT=1
+               value="${value}${3}"
+               test="${test}${KV_PATCH}"
        fi
-       return ${RESULT}
+
+       [ ${test} ${operator} ${value} ] && return 0 || return 1
 }
 
 
index d22bdd24d9f7e78d849fa24b3e91232a45412596..a15b977357e5dfbb30ca4bae7524cb862c457b75 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.15 2004/12/31 09:23:43 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.16 2005/01/06 13:58:15 johnm Exp $
 #
 # Description: This eclass is used as a central eclass for accessing kernel
 #                         related information for sources already installed.
@@ -58,6 +58,14 @@ EXPORT_FUNCTIONS pkg_setup
 KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
 
 
+# Bug fixes
+
+# fix to bug #75034
+case ${ARCH} in
+    ppc)       BUILD_FIXES="${BUILD_FIXES} TOUT=${T}/.tmp_gas_check";;
+    ppc64)      BUILD_FIXES="${BUILD_FIXES} TOUT=${T}/.tmp_gas_check";;
+esac
+
 # Pulled from eutils as it might be more useful only being here since
 # very few ebuilds which dont use this eclass will ever ever use these functions
 set_arch_to_kernel() {
@@ -116,7 +124,7 @@ qeerror() {
 getfilevar() {
 local  ERROR workingdir basefname basedname xarch
        ERROR=0
-       
+
        [ -z "${1}" ] && ERROR=1
        [ ! -f "${2}" ] && ERROR=1
 
@@ -135,7 +143,7 @@ local       ERROR workingdir basefname basedname xarch
                
                cd ${basedname}
                echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | \
-                       make -f - e 2>/dev/null
+                       make ${BUILD_FIXES} -f - e 2>/dev/null
                cd ${workingdir}
                 
                ARCH=${xarch}
@@ -355,15 +363,15 @@ check_kernel_built() {
        # if we haven't determined the version yet, we need too.
        get_version;
        
-       if [ ! -f "${KV_OUT_DIR}/System.map" ]
+       if [ ! -f "${KV_OUT_DIR}/include/linux/version.h" ]
        then
-               eerror "These sources have not yet been compiled."
-               eerror "We cannot build against an uncompiled tree."
+               eerror "These sources have not yet been prepared."
+               eerror "We cannot build against an unprepared tree."
                eerror "To resolve this, please type the following:"
                eerror
                eerror "# cd ${KV_DIR}"
                eerror "# make oldconfig"
-               eerror "# make bzImage modules modules_install"
+               eerror "# make modules_prepare"
                eerror
                eerror "Then please try merging this module again."
                die "Kernel sources need compiling first"
index 5a67f81657f7c49442c6ce12f9b6f960ae45c73c..632f9693b8fd77757af78c50b5a7744788a57b05 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.14 2004/12/29 10:11:16 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.15 2005/01/06 13:58:15 johnm Exp $
 
 # Description: This eclass is used to interface with linux-info in such a way
 #              to provide the functionality required and initial functions
@@ -252,7 +252,6 @@ linux-mod_pkg_setup() {
        linux-info_pkg_setup;
        check_kernel_built;
        check_modules_supported;
-       check_extra_config;
        set_kvobj;
 }
 
@@ -275,7 +274,8 @@ linux-mod_src_compile() {
                
                einfo "Preparing ${modulename} module"
                cd ${sourcedir}
-               emake ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module} || die Unable to make ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module}.
+               emake ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module} || \
+                       die Unable to make ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS:-clean module}.
        done
        ARCH="${xarch}"
 }