summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-11-12 10:36:30 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-11-12 10:36:30 +0000
commitc8d8aa45af4b1e422d0a66ac42c9ac362bbc4704 (patch)
tree85e4b72029984a9d246aae2709566ff992f7b375 /dev-libs/klibc
parentstable x86 (diff)
downloadhistorical-c8d8aa45af4b1e422d0a66ac42c9ac362bbc4704.tar.gz
historical-c8d8aa45af4b1e422d0a66ac42c9ac362bbc4704.tar.bz2
historical-c8d8aa45af4b1e422d0a66ac42c9ac362bbc4704.zip
Bug #196521, some arches have a shared asm-ARCH directory in the kernel sources, and klibc is not aware of this.
Package-Manager: portage-2.1.3.19
Diffstat (limited to 'dev-libs/klibc')
-rw-r--r--dev-libs/klibc/ChangeLog9
-rw-r--r--dev-libs/klibc/Manifest19
-rw-r--r--dev-libs/klibc/files/digest-klibc-1.5.7-r16
-rw-r--r--dev-libs/klibc/files/klibc-1.5-klibcasmarch.patch25
-rw-r--r--dev-libs/klibc/klibc-1.5.7-r1.ebuild201
5 files changed, 255 insertions, 5 deletions
diff --git a/dev-libs/klibc/ChangeLog b/dev-libs/klibc/ChangeLog
index 48741284e77b..685d997b2302 100644
--- a/dev-libs/klibc/ChangeLog
+++ b/dev-libs/klibc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/klibc
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.49 2007/11/12 10:17:27 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/ChangeLog,v 1.50 2007/11/12 10:36:29 robbat2 Exp $
+
+*klibc-1.5.7-r1 (12 Nov 2007)
+
+ 12 Nov 2007; Robin H. Johnson <robbat2@gentoo.org>
+ +files/klibc-1.5-klibcasmarch.patch, +klibc-1.5.7-r1.ebuild:
+ Bug #196521, some arches have a shared asm-ARCH directory in the kernel
+ sources, and klibc is not aware of this.
*klibc-1.5.7 (12 Nov 2007)
diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest
index ad8bb5c490cc..a1131f95d779 100644
--- a/dev-libs/klibc/Manifest
+++ b/dev-libs/klibc/Manifest
@@ -30,6 +30,10 @@ AUX klibc-1.4.9-mips32.patch 632 RMD160 7f9769770208f6b5e44df88f22a682b29acbad3b
MD5 b74d27999ddd26a5b44477849bda10d1 files/klibc-1.4.9-mips32.patch 632
RMD160 7f9769770208f6b5e44df88f22a682b29acbad3b files/klibc-1.4.9-mips32.patch 632
SHA256 546ca8b913721671767fc0c119d694ddaead20f259738ea822a295e20e4f22d3 files/klibc-1.4.9-mips32.patch 632
+AUX klibc-1.5-klibcasmarch.patch 1109 RMD160 7c0b30335346b219db0f68427c76cf6113eabce2 SHA1 2524c67b74b42541a7c6f446ec5337768a292668 SHA256 7a84dacc12b93a58ac70dda11b977183c48ebc39fd101b0dbd0c16d3f0b5293e
+MD5 aab928db6a0d81f108a7aeb552acf215 files/klibc-1.5-klibcasmarch.patch 1109
+RMD160 7c0b30335346b219db0f68427c76cf6113eabce2 files/klibc-1.5-klibcasmarch.patch 1109
+SHA256 7a84dacc12b93a58ac70dda11b977183c48ebc39fd101b0dbd0c16d3f0b5293e files/klibc-1.5-klibcasmarch.patch 1109
AUX klibc-1.5-nostrip.patch 1 RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 SHA1 adc83b19e793491b1c6ea0fd8b46cd9f32e592fc SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
MD5 68b329da9893e34099c7d8ad5cb9c940 files/klibc-1.5-nostrip.patch 1
RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/klibc-1.5-nostrip.patch 1
@@ -69,6 +73,10 @@ EBUILD klibc-1.4.13.ebuild 6734 RMD160 45f074e86ac677fd1a2e65af3c59730352931618
MD5 b85fd296bc7db59ca79e0232c6f7529b klibc-1.4.13.ebuild 6734
RMD160 45f074e86ac677fd1a2e65af3c59730352931618 klibc-1.4.13.ebuild 6734
SHA256 b04c5b1cd886dd126bbdfa30232a42b14cb18d7c568e7d84565f481f5edebb95 klibc-1.4.13.ebuild 6734
+EBUILD klibc-1.5.7-r1.ebuild 5848 RMD160 dc3c271004bd2d6e9456ff5da95964b02dcc37ea SHA1 1b3d03f52a71ab12a56bf1df3ada32e71386e181 SHA256 6e83b4de037b506364dbf675fe7cab0d373319e063b15205a2316485e0e95b0b
+MD5 221f98f8738489007ae637b80fb0c7d7 klibc-1.5.7-r1.ebuild 5848
+RMD160 dc3c271004bd2d6e9456ff5da95964b02dcc37ea klibc-1.5.7-r1.ebuild 5848
+SHA256 6e83b4de037b506364dbf675fe7cab0d373319e063b15205a2316485e0e95b0b klibc-1.5.7-r1.ebuild 5848
EBUILD klibc-1.5.7.ebuild 5707 RMD160 1f5337af7e0085e0ca023c38d985b76a1c7349b9 SHA1 fcd98940cf26eada6f9b7df3d5e91a1ac236e4a7 SHA256 4664cccdf2f37b75bddf8c9e651470a5e0e26e8dc3478f09237a40f17f4d8f20
MD5 af73fd2e0c5587f3927d2228b648aeb7 klibc-1.5.7.ebuild 5707
RMD160 1f5337af7e0085e0ca023c38d985b76a1c7349b9 klibc-1.5.7.ebuild 5707
@@ -77,10 +85,10 @@ EBUILD klibc-1.5.ebuild 5765 RMD160 c81daa87ba892d53e20f6aa6b18296477ebd3338 SHA
MD5 381a1225c216a2371ed83610d2e28d00 klibc-1.5.ebuild 5765
RMD160 c81daa87ba892d53e20f6aa6b18296477ebd3338 klibc-1.5.ebuild 5765
SHA256 fbbf0bded7141336b6769ab9c2d9b5f7b2880ef87b592f095ddbcd9a438f32c7 klibc-1.5.ebuild 5765
-MISC ChangeLog 8402 RMD160 e5298639cd48d522106ccab93776d4301cfc7751 SHA1 5432e35ecd317cb181476d2f83dffc8b41355bc2 SHA256 f85e1506089592eb81033dd6ac99a641dd89899b5c30247eff9cee917c04eb96
-MD5 e7e38990d2ce78140c6744fbfb5cef3d ChangeLog 8402
-RMD160 e5298639cd48d522106ccab93776d4301cfc7751 ChangeLog 8402
-SHA256 f85e1506089592eb81033dd6ac99a641dd89899b5c30247eff9cee917c04eb96 ChangeLog 8402
+MISC ChangeLog 8667 RMD160 771135210869519f59eee2eb921b4a4a62f0632a SHA1 4e3104e56954f2e1418efcc09031c339d2d064c2 SHA256 8ad97dc1ee7968cb2c8b3f319545998ed42b6c92162d7e28f9b67dc898dff17f
+MD5 54db090607a6d581f6207cf42f9f41aa ChangeLog 8667
+RMD160 771135210869519f59eee2eb921b4a4a62f0632a ChangeLog 8667
+SHA256 8ad97dc1ee7968cb2c8b3f319545998ed42b6c92162d7e28f9b67dc898dff17f ChangeLog 8667
MISC metadata.xml 166 RMD160 42fd2b8820fe5c74ccd8bda2141e90fa1b3802d8 SHA1 dd2e6ea8806cfa18885ac2f0dee3e6aceee06fd0 SHA256 8a8cfc597620bb23a385c7d463e7eeab947d58038f7739a58d24fb37fdd0a83f
MD5 ff2140a8d0a2aac189c948cdbe6fc230 metadata.xml 166
RMD160 42fd2b8820fe5c74ccd8bda2141e90fa1b3802d8 metadata.xml 166
@@ -106,3 +114,6 @@ SHA256 9b784615ed975d744c25afbf8716126d2e2446a20b4a9146d0ced31cda10e26e files/di
MD5 5300f060a65e7a482b1303a17153eed5 files/digest-klibc-1.5.7 485
RMD160 113ac4feda3efa53817b4663b008c8ec2c0a2ded files/digest-klibc-1.5.7 485
SHA256 b4a0e3a4ca4f12d48ea26ded0ec99bf436df33c285535c2f8ed93439247f73a1 files/digest-klibc-1.5.7 485
+MD5 5300f060a65e7a482b1303a17153eed5 files/digest-klibc-1.5.7-r1 485
+RMD160 113ac4feda3efa53817b4663b008c8ec2c0a2ded files/digest-klibc-1.5.7-r1 485
+SHA256 b4a0e3a4ca4f12d48ea26ded0ec99bf436df33c285535c2f8ed93439247f73a1 files/digest-klibc-1.5.7-r1 485
diff --git a/dev-libs/klibc/files/digest-klibc-1.5.7-r1 b/dev-libs/klibc/files/digest-klibc-1.5.7-r1
new file mode 100644
index 000000000000..eb6432b52976
--- /dev/null
+++ b/dev-libs/klibc/files/digest-klibc-1.5.7-r1
@@ -0,0 +1,6 @@
+MD5 c40fb3fc772350d721555a230fc136e5 klibc-1.5.7.tar.bz2 490790
+RMD160 664448f24b6335502f40bc74a4c3f4291c6e1295 klibc-1.5.7.tar.bz2 490790
+SHA256 d5298ba2b1f575ff058e652a6cdf753f11c2fa6efa943b1318d0874b9b03e068 klibc-1.5.7.tar.bz2 490790
+MD5 2cc2fd4d521dc5d7cfce0d8a9d1b3472 linux-2.6.23.tar.bz2 45488158
+RMD160 755690e80751d5de86d260fe05c6eeadde116c4e linux-2.6.23.tar.bz2 45488158
+SHA256 d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb linux-2.6.23.tar.bz2 45488158
diff --git a/dev-libs/klibc/files/klibc-1.5-klibcasmarch.patch b/dev-libs/klibc/files/klibc-1.5-klibcasmarch.patch
new file mode 100644
index 000000000000..854d5337057d
--- /dev/null
+++ b/dev-libs/klibc/files/klibc-1.5-klibcasmarch.patch
@@ -0,0 +1,25 @@
+--- a/scripts/Kbuild.install 2007-03-04 02:52:10.000000000 +0100
++++ b/scripts/Kbuild.install 2007-11-04 15:43:28.000000000 +0100
+@@ -84,6 +84,13 @@
+ # 1) Create directories, install headers and man pages
+ # 2) Tell that we now install binaries
+ # 3) Install binaries by descending
++
++# Arch specific definitions for klibc
++include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
++
++# include/asm-* architecture
++KLIBCASMARCH ?= $(KLIBCARCH)
++
+ .PHONY: header footer descend
+ header:
+ $(Q)echo " INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)"
+@@ -95,7 +102,7 @@
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
+- $(Q)set -e ; for d in linux scsi asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \
++ $(Q)set -e ; for d in linux scsi asm-$(KLIBCASMARCH) asm-generic $(ASMKLIBCARCH); do \
+ mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
+ for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
+ $(KLIBCKERNELOBJ)/include2 ; do \
diff --git a/dev-libs/klibc/klibc-1.5.7-r1.ebuild b/dev-libs/klibc/klibc-1.5.7-r1.ebuild
new file mode 100644
index 000000000000..408f7890f42e
--- /dev/null
+++ b/dev-libs/klibc/klibc-1.5.7-r1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/klibc/klibc-1.5.7-r1.ebuild,v 1.1 2007/11/12 10:36:29 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"
+OKV="2.6.23" KV_MAJOR="2" KV_MINOR="6"
+KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
+SRC_URI="ftp://ftp.kernel.org/pub/linux/libs/klibc/${P}.tar.bz2
+ ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2
+ ${KERNEL_URI}"
+
+LICENSE="|| ( GPL-2 LGPL-2 )"
+KEYWORDS="~amd64 -mips ~ppc ~x86 ~sparc"
+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 ${A}
+ 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-klibcasmarch.patch
+}
+
+# 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
+}
+
+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})"
+ 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
+
+ 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} \
+ 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})"
+ 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
+
+ emake \
+ EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
+ EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
+ HOSTCC="${HOSTCC}" CC="${CC}" \
+ INSTALLDIR="/usr/${libdir}/klibc" \
+ INSTALLROOT="${D}" \
+ KLIBCARCH=${KLIBCARCH} \
+ 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
+
+}