diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-14 20:53:08 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-14 20:53:08 +0000 |
commit | 2607ccb3ed1a3dea53991eee25bdde7097af584a (patch) | |
tree | 4f456d04bd50dcb3ccaf1bb09bca09de2f1aeabf /dev-libs/klibc | |
parent | bump (diff) | |
download | historical-2607ccb3ed1a3dea53991eee25bdde7097af584a.tar.gz historical-2607ccb3ed1a3dea53991eee25bdde7097af584a.tar.bz2 historical-2607ccb3ed1a3dea53991eee25bdde7097af584a.zip |
Version bump.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64
Diffstat (limited to 'dev-libs/klibc')
-rw-r--r-- | dev-libs/klibc/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/klibc/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/klibc/klibc-1.5.12.ebuild | 237 |
3 files changed, 246 insertions, 2 deletions
diff --git a/dev-libs/klibc/ChangeLog b/dev-libs/klibc/ChangeLog index acbc45d54f54..f7cb16a4fa65 100644 --- a/dev-libs/klibc/ChangeLog +++ b/dev-libs/klibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/klibc # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.59 2008/06/26 18:23:46 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.60 2008/07/14 20:53:08 robbat2 Exp $ + +*klibc-1.5.12 (14 Jul 2008) + + 14 Jul 2008; Robin H. Johnson <robbat2@gentoo.org> +klibc-1.5.12.ebuild: + Version bump. 26 Jun 2008; Robin H. Johnson <robbat2@gentoo.org> -files/klibc-1.2.1-nostdinc-flags.patch, -files/klibc-1.2.4-kbuild.patch, diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest index 5bade1a6994b..c4f971ff1297 100644 --- a/dev-libs/klibc/Manifest +++ b/dev-libs/klibc/Manifest @@ -9,11 +9,13 @@ AUX klibc-1.5.7-strip-fix-dash-s.patch 420 RMD160 8dae7b8452fe5328c276fc192cad17 AUX klibc.m4 3619 RMD160 aee79c8296f375e3614fcf5d97b21ed9e043c719 SHA1 ebe92893215e7d7ec2e44af846c6ce83e7ef7f4b SHA256 02901ef2ca8b320d77b03fab4fa9bef809c11e2e418e7da00aa2c13c4a84dd44 DIST klibc-1.1.tar.bz2 444770 RMD160 d25df89a8468f05e480ea7348c8cfa25aa4a061e SHA1 167832f15b48f0d7eda160eee4b05b9afa446a69 SHA256 42de47159a382d852750e38fe4877ee2f97f2ff4c47e27f3ce512193d31f63e7 DIST klibc-1.5.11.tar.bz2 492789 RMD160 3f32b9ee98dce354110a685c7178ba8fcc9f55f2 SHA1 a5d49f6476ae66b42e0d0ecd55dcb7c02eefc7e4 SHA256 8b38c69e5b851df0634122a3d0d1b8d34284f30d3bf3186c8fceab4d75ebeaef +DIST klibc-1.5.12.tar.bz2 492589 RMD160 ab0376c784111f11a080c71828aa2b0f9face0e6 SHA1 899442d299de08a8e0067f8c9bdc73384293caf9 SHA256 83c92f40e4e010485dd443fd4d70cd12c83bc7065d2e78d2145723a7f2c96363 DIST klibc-1.5.8.tar.bz2 490132 RMD160 870bf1df35c05c2fbac7b1623c2250bed1b39e92 SHA1 db0beb7bf00a97e2ab0ab48f13f1aaea3e402ffe SHA256 b010fd9ea4624f4abc62a0ec93cecae9e9f0a7f856dd678da3fc61cc1d59ca0d DIST linux-2.6.23.tar.bz2 45488158 RMD160 755690e80751d5de86d260fe05c6eeadde116c4e SHA1 3a186adf13e44415796ab6381aa8979b16a5d5ca SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb DIST patch-2.6.24-rc7.bz2 9658462 RMD160 18cba35c94c0923b71a64798ad06946b4afc23d2 SHA1 4edc59937ca4157c3ee542f6a0ff204acfa8e7d1 SHA256 dbd8403cc9ad11afb51b8050d6cbda97caec87d1b07c80266b1e4b1f437268a3 EBUILD klibc-1.1.ebuild 4163 RMD160 3bdee15ca33572451ff609634cf178ac3019f6e2 SHA1 7a63688d69a3802da9198c6d7821d0909cbaeb0a SHA256 d28076cc05974dc7c5ef32d9e771d1ce13c9dd7d6cfec98567e3d4724b8d8915 EBUILD klibc-1.5.11.ebuild 7057 RMD160 ae7d7d8cec09e9a1b787d2ea25b3501ebacd9d1e SHA1 f9d3f81fad94ba9f9ec6df2a02070f763b5cc314 SHA256 ca9c7f31dd9b9f13c57be6bdf1523cd8c626136d72bdfd5d3cb6550b427af314 +EBUILD klibc-1.5.12.ebuild 7057 RMD160 847822e71e4669b8cf59eafb7ea89d7581d13bda SHA1 7c22d053ef05019e03f15add166b4acc2b60f1b6 SHA256 09ef34ed8ba11c9f6a84988286ed3190af2d5073d51231da1695283dbbf00f4c EBUILD klibc-1.5.8.ebuild 6920 RMD160 de5ba665e0baaa105d386bfd3242ea4036569385 SHA1 dc95c9e02959be2b2700d02f35659c8af140d148 SHA256 13bf15851856be9cf1f9bcdbfd48f8daf98efc72aac25f44de3b7b636e0aaf34 -MISC ChangeLog 10390 RMD160 24688671002d00a919a21dd9d1c4304c395cdd2c SHA1 4b263ea4f569fcd3e31fd87f75c9ef0274b9436a SHA256 d2ea97235a068fb05bfaaafcfe9ac2a54292701938a63d7b51d66e0f0b779796 +MISC ChangeLog 10511 RMD160 fba985251f842d2e8ed724f9f52165b421c83b34 SHA1 d8a2feb39b391e67ade442621f88328b128ad95b SHA256 2f59cec40ecfdecd70ad2798445f1cb00fd5b20a44df41d1abb92051ec8d6640 MISC metadata.xml 166 RMD160 42fd2b8820fe5c74ccd8bda2141e90fa1b3802d8 SHA1 dd2e6ea8806cfa18885ac2f0dee3e6aceee06fd0 SHA256 8a8cfc597620bb23a385c7d463e7eeab947d58038f7739a58d24fb37fdd0a83f diff --git a/dev-libs/klibc/klibc-1.5.12.ebuild b/dev-libs/klibc/klibc-1.5.12.ebuild new file mode 100644 index 000000000000..5c3d9bc3806b --- /dev/null +++ b/dev-libs/klibc/klibc-1.5.12.ebuild @@ -0,0 +1,237 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.12.ebuild,v 1.1 2008/07/14 20:53:08 robbat2 Exp $ + +# Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007: +# This still needs major work. +# But it is significently better than the previous version. +# In that it will now build on biarch systems, such as ppc64-32ul. + +# NOTES: +# ====== +# We need to bring in the kernel sources seperately +# Because they have to be configured in a way that differs from the copy in +# /usr/src/. The sys-kernel/linux-headers are too stripped down to use +# unfortunetly. +# This will be able to go away once the klibc author updates his code +# to build again the headers provided by the kernel's 'headers_install' target. + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="A minimal libc subset for use with initramfs." +HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" +KV_MAJOR="2" KV_MINOR="6" KV_SUB="23" +OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}" +PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-rc7" +PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.bz2" +KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.bz2" +SRC_URI=" + mirror://kernel/linux/libs/klibc/${P}.tar.bz2 + mirror://kernel/linux/libs/klibc/Testing/${P}.tar.bz2 + ${PATCH_URI} + ${KERNEL_URI}" + +LICENSE="|| ( GPL-2 LGPL-2 )" +KEYWORDS="~amd64 -mips ~ppc ~sparc ~x86" +SLOT="0" +IUSE="debug n32" + +DEPEND="dev-lang/perl" +RDEPEND="${DEPEND}" + +KS="${WORKDIR}/linux-${OKV}" + +# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot +QA_EXECSTACK="*" +# Do not strip +RESTRICT="strip" + +src_unpack() { + unpack linux-${OKV}.tar.bz2 ${P}.tar.bz2 + EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.bz2 + cd "${S}" + + # Symlink /usr/src/linux to ${S}/linux + ln -snf "${KS}" linux + #ln -snf "/usr" linux + + # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) + epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch + + # Fixes for sparc and ppc + epatch "${FILESDIR}"/${PN}-1.5-sigaction.patch + + # Prevent klibc from prestripping stuff +# epatch "${FILESDIR}"/${P}-nostrip.patch + + # Fix the asm-ppc vs. asm-powerpc issue, bug #196521 + epatch "${FILESDIR}"/${PN}-1.5.11-klibcasmarch.patch + + # Fix usage of -s, bug #201006 + epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch + + # bug 229525, usr/include/arch/x86_64/sys/io.h has undefined variables + epatch "${FILESDIR}"/${PN}-1.5.11-x86_64-io.h-return.diff +} + +# For a given Gentoo ARCH, +# specify the kernel defconfig most relevant +kernel_defconfig() { + a="${1:${ARCH}}" + # most, but not all arches have a sanely named defconfig + case ${a} in + ppc64) echo ppc64_defconfig ;; + ppc) echo pmac32_defconfig ;; + arm*|sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;; + *) echo defconfig ;; + esac +} + +# klibc has it's own ideas of arches +# They reflect userspace strictly. +# This functions maps from a Gentoo ARCH, to an arch that klibc expects +# Look at klibc-${S}/usr/klibc/arch for a list of these arches +klibc_arch() { + a="${1:${ARCH}}" + case ${a} in + amd64) echo x86_64;; + mips) die 'TODO: Use the $ABI' ;; + x86) echo i386;; + *) echo ${a} ;; + esac +} + +kernel_asm_arch() { + a="${1:${ARCH}}" + case ${a} in + # Merged arches + x86|amd64) echo x86 ;; + ppc*) echo powerpc ;; + # Non-merged + alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; + *) die "TODO: Update the code for your asm-ARCH symlink" ;; + esac +} + +src_compile() { + local myargs + local myARCH="${ARCH}" myABI="${ABI}" + # TODO: For cross-compiling + # You should set ARCH and ABI here + CC="$(tc-getCC)" + HOSTCC="$(tc-getBUILD_CC)" + KLIBCARCH="$(klibc_arch ${ARCH})" + KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" + libdir="$(get_libdir)" + # This should be the defconfig corresponding to your userspace! + # NOT your kernel. PPC64-32ul would choose 'ppc' for example. + defconfig=$(kernel_defconfig ${ARCH}) + unset ABI ARCH # Unset these, because they interfere + unset KBUILD_OUTPUT # we are using a private copy + + cd "${KS}" + emake ${defconfig} || die "No defconfig" + emake prepare || die "Failed to prepare kernel sources for header usage" + + cd "${S}" + + use debug && myargs="${myargs} V=1" + + emake \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + HOSTCC="${HOSTCC}" CC="${CC}" \ + INSTALLDIR="/usr/${libdir}/klibc" \ + KLIBCARCH=${KLIBCARCH} \ + KLIBCASMARCH=${KLIBCASMARCH} \ + SHLIBDIR="/${libdir}" \ + libdir="/usr/${libdir}" \ + mandir="/usr/share/man" \ + ${myargs} || die "Compile failed!" + + #SHLIBDIR="/${libdir}" \ + + ARCH="${myARCH}" ABI="${myABI}" +} + +src_install() { + local myargs + local myARCH="${ARCH}" myABI="${ABI}" + # TODO: For cross-compiling + # You should set ARCH and ABI here + CC="$(tc-getCC)" + HOSTCC="$(tc-getBUILD_CC)" + KLIBCARCH="$(klibc_arch ${ARCH})" + KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" + libdir="$(get_libdir)" + # This should be the defconfig corresponding to your userspace! + # NOT your kernel. PPC64-32ul would choose 'ppc' for example. + defconfig=$(kernel_defconfig ${ARCH}) + + use debug && myargs="${myargs} V=1" + + local klibc_prefix + if tc-is-cross-compiler ; then + klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix) + else + klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) + fi + + unset ABI ARCH # Unset these, because they interfere + unset KBUILD_OUTPUT # we are using a private copy + + emake \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + HOSTCC="${HOSTCC}" CC="${CC}" \ + INSTALLDIR="/usr/${libdir}/klibc" \ + INSTALLROOT="${D}" \ + KLIBCARCH=${KLIBCARCH} \ + KLIBCASMARCH=${KLIBCASMARCH} \ + SHLIBDIR="/${libdir}" \ + libdir="/usr/${libdir}" \ + mandir="/usr/share/man" \ + ${myargs} \ + install || die "Install failed!" + + #SHLIBDIR="/${libdir}" \ + + # klibc doesn't support prelinking, so we need to mask it + cat > "${T}/70klibc" <<-EOF + PRELINK_PATH_MASK="/usr/${libdir}/klibc" + EOF + + doenvd "${T}"/70klibc + + # Fix the permissions (bug #178053) on /usr/${libdir}/klibc/include + # Actually I have no idea, why the includes have those weird-ass permissions + # on a particular system, might be due to inherited permissions from parent + # directory + find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX + + # Hardlinks becoming copies + for x in gunzip zcat ; do + rm -f "${D}/${klibc_prefix}/bin/${x}" + dosym gzip "${klibc_prefix}/bin/${x}" + done + + # Restore now, so we can use the tc- functions + ARCH="${myARCH}" ABI="${myABI}" + if ! tc-is-cross-compiler ; then + cd "${S}" + insinto /usr/share/aclocal + doins contrib/klibc.m4 + + dodoc README usr/klibc/CAVEATS usr/klibc/README + newdoc usr/klibc/arch/README README.klibc.arch + docinto dash; newdoc usr/dash/README.klibc README + docinto gzip; dodoc usr/gzip/README + fi + + # Fix up the symlink + # Mainly for merged arches + linkname="${D}/usr/${libdir}/klibc/include/asm" + if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then + ln -snf asm-${KLIBCASMARCH} "${linkname}" + fi +} |