diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-05-17 22:17:56 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-05-17 22:17:56 +0000 |
commit | 758c6d4f6e812842e39388f5991289358bd50c3c (patch) | |
tree | 020268f8445bbe069ae2088f5c46134502b2848b | |
parent | Bump to 2.1.0. Upgrade XMPCore to Adobe XMP 4.4.2 and bug fixes, bug #257089. (diff) | |
download | gentoo-2-758c6d4f6e812842e39388f5991289358bd50c3c.tar.gz gentoo-2-758c6d4f6e812842e39388f5991289358bd50c3c.tar.bz2 gentoo-2-758c6d4f6e812842e39388f5991289358bd50c3c.zip |
Improve check_nptl_support output to include more info to help people figure out their own mistakes.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/files/eblits/src_unpack.eblit | 49 |
2 files changed, 36 insertions, 20 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index e05f2a8f3f6a..db08440e58ca 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.623 2009/05/02 02:38:22 halcy0n Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.624 2009/05/17 22:17:56 vapier Exp $ + + 17 May 2009; Mike Frysinger <vapier@gentoo.org> + files/eblits/src_unpack.eblit: + Improve check_nptl_support output to include more info to help people + figure out their own mistakes. 02 May 2009; Mark Loeser <halcy0n@gentoo.org> files/eblits/src_compile.eblit: diff --git a/sys-libs/glibc/files/eblits/src_unpack.eblit b/sys-libs/glibc/files/eblits/src_unpack.eblit index 3fb1727ea082..0935889b3f0c 100644 --- a/sys-libs/glibc/files/eblits/src_unpack.eblit +++ b/sys-libs/glibc/files/eblits/src_unpack.eblit @@ -1,21 +1,34 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.7 2008/12/08 01:30:49 vapier Exp $ - -check_kheader_version() { - local version=$( - printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \ - $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \ - tail -n 1 - ) - [[ ${version} -ge "$1" ]] +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.8 2009/05/17 22:17:56 vapier Exp $ + +int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(KV_to_int $1) -ge $(KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \ + tail -n 1 } check_nptl_support() { # don't care about the compiler here as we arent using it just_headers && return - local min_kernel_version=$(KV_to_int "${NPTL_KERN_VER}") + local run_kv build_kv want_kv + run_kv=$(int_to_KV $(get_KV)) + build_kv=$(int_to_KV $(get_kheader_version)) + want_kv=${NPTL_KERN_VER} ebegin "Checking gcc for __thread support" if ! eend $(want__thread ; echo $?) ; then @@ -27,20 +40,18 @@ check_nptl_support() { if ! is_crosscompile && ! tc-is-cross-compiler ; then # Building fails on an non-supporting kernel - ebegin "Checking kernel version (>=${NPTL_KERN_VER})" - if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then + ebegin "Checking kernel version (${run_kv} >= ${want_kv})" + if ! eend_KV ${run_kv} ${want_kv} ; then echo - eerror "You need a kernel of at least version ${NPTL_KERN_VER}" - eerror "for NPTL support!" + eerror "You need a kernel of at least ${want_kv} for NPTL support!" die "Kernel version too low!" fi fi - ebegin "Checking linux-headers version (>=${NPTL_KERN_VER})" - if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then + ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" + if ! eend_KV ${build_kv} ${want_kv} ; then echo - eerror "You need linux-headers of at least version ${NPTL_KERN_VER}" - eerror "for NPTL support!" + eerror "You need linux-headers of at least ${want_kv} for NPTL support!" die "linux-headers version too low!" fi } |