public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2016-06-15 18:50 Austin English
  0 siblings, 0 replies; 17+ messages in thread
From: Austin English @ 2016-06-15 18:50 UTC (permalink / raw
  To: gentoo-commits

commit:     07040a4f3d2d4e603b75b2972d29cc2379fd1cce
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 18:47:30 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 18:50:15 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07040a4f

dev-libs/klibc: fix typo

Package-Manager: portage-2.2.28

 dev-libs/klibc/klibc-1.5.25.ebuild   | 2 +-
 dev-libs/klibc/klibc-2.0.2-r1.ebuild | 2 +-
 dev-libs/klibc/klibc-2.0.2.ebuild    | 2 +-
 dev-libs/klibc/klibc-2.0.3-r1.ebuild | 2 +-
 dev-libs/klibc/klibc-2.0.3.ebuild    | 2 +-
 dev-libs/klibc/klibc-2.0.4.ebuild    | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-libs/klibc/klibc-1.5.25.ebuild b/dev-libs/klibc/klibc-1.5.25.ebuild
index 2c131f6..5f1934a 100644
--- a/dev-libs/klibc/klibc-1.5.25.ebuild
+++ b/dev-libs/klibc/klibc-1.5.25.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 

diff --git a/dev-libs/klibc/klibc-2.0.2-r1.ebuild b/dev-libs/klibc/klibc-2.0.2-r1.ebuild
index 52fdcb5..4ffba27 100644
--- a/dev-libs/klibc/klibc-2.0.2-r1.ebuild
+++ b/dev-libs/klibc/klibc-2.0.2-r1.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 

diff --git a/dev-libs/klibc/klibc-2.0.2.ebuild b/dev-libs/klibc/klibc-2.0.2.ebuild
index af0158b..f301d43 100644
--- a/dev-libs/klibc/klibc-2.0.2.ebuild
+++ b/dev-libs/klibc/klibc-2.0.2.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 

diff --git a/dev-libs/klibc/klibc-2.0.3-r1.ebuild b/dev-libs/klibc/klibc-2.0.3-r1.ebuild
index 81969b9..319325d 100644
--- a/dev-libs/klibc/klibc-2.0.3-r1.ebuild
+++ b/dev-libs/klibc/klibc-2.0.3-r1.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 

diff --git a/dev-libs/klibc/klibc-2.0.3.ebuild b/dev-libs/klibc/klibc-2.0.3.ebuild
index 6a9b53c..5d2f8f7 100644
--- a/dev-libs/klibc/klibc-2.0.3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.3.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 

diff --git a/dev-libs/klibc/klibc-2.0.4.ebuild b/dev-libs/klibc/klibc-2.0.4.ebuild
index 81969b9..319325d 100644
--- a/dev-libs/klibc/klibc-2.0.4.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4.ebuild
@@ -12,7 +12,7 @@
 # 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.
+# unfortunately.
 # 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.
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2016-08-25 16:13 Pacho Ramos
  0 siblings, 0 replies; 17+ messages in thread
From: Pacho Ramos @ 2016-08-25 16:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c5cea15507f919e3ecefac52551ab99912830c23
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 25 16:10:28 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Aug 25 16:13:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5cea155

dev-libs/klibc: Fix build on Raspberry PI (#446700 by Adam Martak)

Package-Manager: portage-2.3.0

 dev-libs/klibc/klibc-2.0.4.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4.ebuild b/dev-libs/klibc/klibc-2.0.4.ebuild
index 319325d..7593537 100644
--- a/dev-libs/klibc/klibc-2.0.4.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -165,6 +165,7 @@ src_compile() {
 		-e '1iCONFIG_AEABI=y' \
 		-e '/CONFIG_OABI_COMPAT/d' \
 		-e '1iCONFIG_OABI_COMPAT=y' \
+		-e '1iCONFIG_ARM_UNWIND=y' \
 		"${KS}"/.config \
 		"${S}"/defconfig
 	fi


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2016-08-25 16:13 Pacho Ramos
  0 siblings, 0 replies; 17+ messages in thread
From: Pacho Ramos @ 2016-08-25 16:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c32b58a8b456af4da6b766fd26bc0d54e3b7cb05
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 25 16:08:54 2016 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Aug 25 16:13:49 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c32b58a8

dev-libs/klibc: Drop old

Package-Manager: portage-2.3.0

 dev-libs/klibc/Manifest              |   3 -
 dev-libs/klibc/klibc-2.0.2-r1.ebuild | 295 --------------------------------
 dev-libs/klibc/klibc-2.0.2.ebuild    | 286 -------------------------------
 dev-libs/klibc/klibc-2.0.3-r1.ebuild | 316 -----------------------------------
 dev-libs/klibc/klibc-2.0.3.ebuild    | 304 ---------------------------------
 5 files changed, 1204 deletions(-)

diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest
index df9bca8..4d5cec7 100644
--- a/dev-libs/klibc/Manifest
+++ b/dev-libs/klibc/Manifest
@@ -1,8 +1,5 @@
 DIST klibc-1.5.25.tar.bz2 510064 SHA256 0b910ec0b2a97d4c775ed06e44ad7bca7be150efdf2a77a19253a573e16367d3 SHA512 e550afb319cd995fb9c7fb086bc8ede550e5e4a48856ff5856e2296f691ba643c9fcc314c5e973f4d5b4f33b543ef4bc10d29b389f83e5418ec860a80e7cac45 WHIRLPOOL d986dcdcc95e2c7846d2eda9338519d5d84f50e94f82f1eee0234a17504ae10abaa75b6c89e9cf4c228690c0cc489d4323d98e5e62cde10cf7a04581026309f3
-DIST klibc-2.0.2.tar.xz 466696 SHA256 1e9d4ba6fe2aeea0bd27d14a9a674c29fb7cf766ff021e9c5f99256cb409474e SHA512 14c862ac58da37db98b40cc03a216643a4d2c424ea1b988f6ea274c999515c6661f711adcf5aac8ed10c7668e05004b8844b0a862c2f32fa28c240dd37003722 WHIRLPOOL 6fea496b32e08e8fd0c54b60997da70db2d6216a8f4a2c6d56ce83485f41c82cce291344ecffac0a38cfa88308033fe768e9b50d2102d803f7b8ff18412100a0
-DIST klibc-2.0.3.tar.xz 468920 SHA256 02035f2b230020de569d40605485121e0fe481ed33a93bdb8bf8c6ee2695fffa SHA512 47a27496d8fa7c57279f9215367369dc9bae496f04b023a2e506813efca7db5de766ddcdb227804123a2fff7f6691dbf01cfaaed3396ce149e6b091f356fa233 WHIRLPOOL bba62fc57372053fdf78dac234f5210ce196723a27499da0fbcf4de05d06eee3ad1963ee5919680c3dcea3941c597a035e7110ad87545585b7430abb6d0d4c6b
 DIST klibc-2.0.4.tar.xz 469348 SHA256 7f9a0850586def7cf4faeeb75e5d0f66e613674c524f6e77b0f4d93a26c801cb SHA512 7a01d1744b49f3de64111fefc522b1d63f054199acf671254bc046d6f1d0b6ca68e050c99025bf8303751c2466a5e034677555649ae5909c40997858d393db8d WHIRLPOOL f5dc71b48f118155df512d8ac839b66d361b22ff4e040e49a562722d82f18ac83a8c682bf0b4c59a9b108473f74bebc673d38456cf0ab5b1051071ca3fa9b78e
 DIST klibc_2.0.2-1.debian.tar.gz 21305 SHA256 93f4b9be5a3c725a38b7ac137850311e3cf8d8094874006c7dce793d2b71e469 SHA512 9cbcc39396a49bc37ace79eaefad6e704ddc9f30aba1b39f40dd2888dad06eeeb7b9c1a387cee60a95cf5641f50bd7f225cf8209547c75a8bae8af4285152d91 WHIRLPOOL a42e148550a27426e8f38b54cb4f3b1f355759d573ab27c0ecadb0c68d0afd54a5950471628ec4e2e27ac9c8b9d841940d6b0f2c0a873d4feab7af37e7989a52
 DIST linux-2.6.39.tar.bz2 76096559 SHA256 584d17f2a3ee18a9501d7ff36907639e538cfdba4529978b8550c461d45c61f6 SHA512 06cb5aba7c53c68d43afcebbbb9507d8b398b3e994d8a237c66a49374ca569237f074adaa3fccba7f908eab4f51f99bae40656793eab5c2f5ce03cd3a65fa02c WHIRLPOOL 2f2c833ab1d8ddbe3e0b862b71a38d47fd3fc5688ea81cdd818369b09e72fa50481bf84533ddcea992af1130b2ceec10b6ff5eaff393a14ee70639293a555912
 DIST linux-3.12.tar.xz 76384600 SHA256 2e120ec7fde19fa51dc6b6cc11c81860a0775defcad5a5bf910ed9a50e845a02 SHA512 4ba5797e0772726d05c9f2eee66dc6dc2a5033c749ef44764c805a83da739ed5d0c6443b76785e38fe1ef74cc7ade787e48144faed0cfcb6f124f05248c700ff WHIRLPOOL a40195f6b53ba3440cf90a44495f6a59670f750851d1518e2bdfe3b949f0e898d1df5d37e271c31c555087026ddb6cc2c9109b22b9639e3222735e6f650a1417
-DIST linux-3.2.tar.xz 65065516 SHA256 dd96ed02b53fb5d57762e4b1f573460909de472ca588f81ec6660e4a172e7ba7 SHA512 77e9a52d78d6c8e951df1e166023eebe5defc5ef3c45d3ac84b613137b3c2e55cee5693d828ebd06c5034bd89ea2a5f862f55824f2b7839c9ad7212c81e3ecb0 WHIRLPOOL 7cc68baac4441740e2171fbbc4195ee6c0351de099aadaee8cb3487f6d1f8b7e1d3144ee54ba38dbd24d6be431a1ea3b921ffce82ff84df21a98da7bc61c1d17

diff --git a/dev-libs/klibc/klibc-2.0.2-r1.ebuild b/dev-libs/klibc/klibc-2.0.2-r1.ebuild
deleted file mode 100644
index 4ffba27..00000000
--- a/dev-libs/klibc/klibc-2.0.2-r1.ebuild
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=5
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils multilib toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		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
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX}
-}
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-	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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}

diff --git a/dev-libs/klibc/klibc-2.0.2.ebuild b/dev-libs/klibc/klibc-2.0.2.ebuild
deleted file mode 100644
index f301d43..00000000
--- a/dev-libs/klibc/klibc-2.0.2.ebuild
+++ /dev/null
@@ -1,286 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=5
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		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
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX}
-}
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-	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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}

diff --git a/dev-libs/klibc/klibc-2.0.3-r1.ebuild b/dev-libs/klibc/klibc-2.0.3-r1.ebuild
deleted file mode 100644
index 319325d..00000000
--- a/dev-libs/klibc/klibc-2.0.3-r1.ebuild
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=5
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils multilib toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="12"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-DEBIAN_PV=2.0.2
-DEBIAN_PR=1
-DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.gz"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		amd64) echo x86 ;;
-		ppc*) echo powerpc ;;
-		# Non-merged
-		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
-		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
-	esac
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
-}
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-	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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-
-	# The inline definition from sys/stat.h does not seem to get used
-	# So just copy it to  make this compile for now
-	epatch "${FILESDIR}"/klibc-2.0.2-mkfifo.patch
-
-	# Newer kernels have some headers in the uapi dir
-	epatch "${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
-
-	# Borrow the debian fixes too
-	for p in $(<"${S}"/debian/patches/series) ; do
-		epatch "${S}/debian/patches/${p}"
-	done
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-	append-flags -nostdlib
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}

diff --git a/dev-libs/klibc/klibc-2.0.3.ebuild b/dev-libs/klibc/klibc-2.0.3.ebuild
deleted file mode 100644
index 5d2f8f7..00000000
--- a/dev-libs/klibc/klibc-2.0.3.ebuild
+++ /dev/null
@@ -1,304 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=5
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils multilib toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc"
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		amd64) echo x86 ;;
-		ppc*) echo powerpc ;;
-		# Non-merged
-		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
-		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
-	esac
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX}
-}
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-	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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-
-	# The inline definition from sys/stat.h does not seem to get used
-	# So just copy it to  make this compile for now
-	epatch "${FILESDIR}"/klibc-2.0.2-mkfifo.patch
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-	append-flags -nostdlib
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-01-11 20:58 Andreas Sturmlechner
  0 siblings, 0 replies; 17+ messages in thread
From: Andreas Sturmlechner @ 2017-01-11 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     8f4ae8558247f281be5822d913ff3c89ec204468
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 20:49:17 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 20:51:27 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f4ae855

dev-libs/klibc: Drop broken ebuild

Package-Manager: portage-2.3.0

 dev-libs/klibc/klibc-2.0.4-r1.ebuild | 317 -----------------------------------
 1 file changed, 317 deletions(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r1.ebuild b/dev-libs/klibc/klibc-2.0.4-r1.ebuild
deleted file mode 100644
index 702d35e..00000000
--- a/dev-libs/klibc/klibc-2.0.4-r1.ebuild
+++ /dev/null
@@ -1,317 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=6
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
-KV_MAJOR="4" KV_MINOR="x" KV_SUB="4"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-DEBIAN_PV=2.0.4
-DEBIAN_PR=9
-DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.xz"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		amd64) echo x86 ;;
-		ppc*) echo powerpc ;;
-		# Non-merged
-		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
-		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
-	esac
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
-}
-
-PATCHES=(
-	# Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
-	"${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-	# Fix usage of -s, bug #201006
-	"${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-	# The inline definition from sys/stat.h does not seem to get used
-	# So just copy it to make this compile for now
-	"${FILESDIR}"/klibc-2.0.2-mkfifo.patch
-	# Newer kernels have some headers in the uapi dir
-	"${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
-)
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" eapply "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-
-	# Symlink /usr/src/linux to ${S}/linux
-	ln -snf "${KS}" linux
-	#ln -snf "/usr" linux
-
-	# Borrow the debian fixes too
-	for p in $(<"${WORKDIR}"/debian/patches/series) ; do
-		PATCHES+=( "${WORKDIR}/debian/patches/${p}" )
-	done
-
-	default
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		-e '1iCONFIG_ARM_UNWIND=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-	append-flags -nostdlib
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-01-11 20:58 Andreas Sturmlechner
  0 siblings, 0 replies; 17+ messages in thread
From: Andreas Sturmlechner @ 2017-01-11 20:58 UTC (permalink / raw
  To: gentoo-commits

commit:     34e73fb5f83aa1c62c51bdab51d7338dc82061a9
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 20:46:44 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 20:51:26 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e73fb5

dev-libs/klibc: Fix sandbox violation

Gentoo-bug: 605180

Package-Manager: portage-2.3.0

 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 318 +++++++++++++++++++++++++++++++++++
 1 file changed, 318 insertions(+)

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
new file mode 100644
index 00000000..2aba1a0
--- /dev/null
+++ b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# 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
+# unfortunately.
+# 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.
+
+EAPI=6
+K_TARBALL_SUFFIX="xz"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="A minimal libc subset for use with initramfs"
+HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
+KV_MAJOR="4" KV_MINOR="x" KV_SUB="4"
+PKV_EXTRA=""
+if [[ ${PKV_EXTRA} ]]; then
+	if [[ ${KV_MAJOR} == 2 ]]; then
+		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
+	else
+		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
+	fi
+	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
+fi
+if [[ ${KV_MAJOR} == 2 ]]; then
+	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
+else
+	OKV="${KV_MAJOR}.${KV_SUB}"
+fi
+KERNEL_URI="
+	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
+	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
+DEBIAN_PV=2.0.4
+DEBIAN_PR=9
+DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.xz"
+SRC_URI="
+	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
+	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
+	${PATCH_URI}
+	${KERNEL_URI}"
+
+LICENSE="|| ( GPL-2 LGPL-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE="debug test custom-cflags"
+
+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"
+
+kernel_asm_arch() {
+	a="${1:${ARCH}}"
+	case ${a} in
+		# Merged arches
+		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
+		amd64) echo x86 ;;
+		ppc*) echo powerpc ;;
+		# Non-merged
+		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
+	esac
+}
+
+# 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 ;;
+		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
+		*) echo defconfig ;;
+	esac
+}
+
+src_unpack() {
+	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
+}
+
+PATCHES=(
+	# Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
+	"${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
+	# Fix usage of -s, bug #201006
+	"${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
+	# The inline definition from sys/stat.h does not seem to get used
+	# So just copy it to make this compile for now
+	"${FILESDIR}"/klibc-2.0.2-mkfifo.patch
+	# Newer kernels have some headers in the uapi dir
+	"${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
+)
+
+src_prepare() {
+	[[ ${PKV} ]] && eapply "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
+
+	# Symlink /usr/src/linux to ${S}/linux
+	ln -snf "${KS}" linux
+	#ln -snf "/usr" linux
+
+	# Borrow the debian fixes too
+	for p in $(<"${WORKDIR}"/debian/patches/series) ; do
+		PATCHES+=( "${WORKDIR}/debian/patches/${p}" )
+	done
+
+	default
+}
+
+# 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="all"
+	local myARCH="${ARCH}" myABI="${ABI}"
+	# TODO: For cross-compiling
+	# You should set ARCH and ABI here
+	CC="$(tc-getCC)"
+	LD="$(tc-getLD)"
+	HOSTCC="$(tc-getBUILD_CC)"
+	HOSTLD="$(tc-getBUILD_LD)"
+	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
+	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
+	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
+		# The delete and insert are seperate statements
+		# so that they are reliably used.
+		sed -i \
+		-e '/CONFIG_AEABI/d' \
+		-e '1iCONFIG_AEABI=y' \
+		-e '/CONFIG_OABI_COMPAT/d' \
+		-e '1iCONFIG_OABI_COMPAT=y' \
+		-e '1iCONFIG_ARM_UNWIND=y' \
+		"${KS}"/.config \
+		"${S}"/defconfig
+	fi
+	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
+
+	cd "${S}"
+
+	use debug && myargs="${myargs} V=1"
+	use test && myargs="${myargs} test"
+	append-ldflags -z noexecstack
+	append-flags -nostdlib
+
+	emake \
+		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
+		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
+		HOSTLDFLAGS="-z noexecstack" \
+		KLIBCOPTFLAGS='-nostdlib' \
+		HOSTCC="${HOSTCC}" CC="${CC}" \
+		HOSTLD="${HOSTLD}" LD="${LD}" \
+		INSTALLDIR="/usr/${libdir}/klibc" \
+		KLIBCARCH=${KLIBCARCH} \
+		KLIBCASMARCH=${KLIBCASMARCH} \
+		SHLIBDIR="/${libdir}" \
+		libdir="/usr/${libdir}" \
+		mandir="/usr/share/man" \
+		T="${T}" \
+		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
+		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
+		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
+		${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" \
+		HOSTLDFLAGS="-z noexecstack" \
+		KLIBCOPTFLAGS='-nostdlib' \
+		HOSTCC="${HOSTCC}" CC="${CC}" \
+		HOSTLD="${HOSTLD}" LD="${LD}" \
+		INSTALLDIR="/usr/${libdir}/klibc" \
+		INSTALLROOT="${D}" \
+		KLIBCARCH=${KLIBCARCH} \
+		KLIBCASMARCH=${KLIBCASMARCH} \
+		SHLIBDIR="/${libdir}" \
+		libdir="/usr/${libdir}" \
+		mandir="/usr/share/man" \
+		T="${T}" \
+		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
+		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
+		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
+		${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
+	# NOTE: This totally violates sandbox <asturm@gentoo.org>
+	# find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX
+	find "${D}"/usr/${libdir}/klibc/include -type f \
+		\( -name '.install' -o -name '..install.cmd' \) -delete || die
+
+	# 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
+		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
+}
+
+src_test() {
+	if ! tc-is-cross-compiler ; then
+		cd "${S}"/usr/klibc/tests
+		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
+		BROKEN_TESTS="fcntl fnmatch testrand48"
+		failed=0
+		for t in $ALL_TESTS ; do
+			if has $t $BROKEN_TESTS ; then
+				echo "=== $t SKIP"
+			else
+				echo -n "=== $t "
+				./$t </dev/null >/dev/null
+				rc=$?
+				if [ $rc -eq 0 ]; then
+					echo PASS
+				else
+					echo FAIL
+					failed=1
+				fi
+			fi
+		done
+		[ $failed -ne 0 ] && die "Some tests failed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-01-23 13:51 Agostino Sarubbo
  0 siblings, 0 replies; 17+ messages in thread
From: Agostino Sarubbo @ 2017-01-23 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     3fedd96c507843459fc273b8d69043a5801405c1
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 13:48:56 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 13:50:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fedd96c

dev-libs/klibc: amd64 stable wrt bug #605608

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
index 2aba1a0..6174ae6 100644
--- a/dev-libs/klibc/klibc-2.0.4-r2.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
@@ -51,7 +51,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-01-23 15:46 Agostino Sarubbo
  0 siblings, 0 replies; 17+ messages in thread
From: Agostino Sarubbo @ 2017-01-23 15:46 UTC (permalink / raw
  To: gentoo-commits

commit:     9ff94ac50de56e99a38dd5e98b482f3d70bb0a50
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 15:44:23 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 15:44:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ff94ac5

dev-libs/klibc: x86 stable wrt bug #605608

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
index 6174ae6..deb6d6f 100644
--- a/dev-libs/klibc/klibc-2.0.4-r2.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
@@ -51,7 +51,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-01-23 16:27 Agostino Sarubbo
  0 siblings, 0 replies; 17+ messages in thread
From: Agostino Sarubbo @ 2017-01-23 16:27 UTC (permalink / raw
  To: gentoo-commits

commit:     5db7c3f766bb2f34328cb6466f4bd8eabb11b694
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 16:26:09 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 16:27:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5db7c3f7

dev-libs/klibc: ia64 stable wrt bug #605608

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="ia64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
index deb6d6f..6a90006 100644
--- a/dev-libs/klibc/klibc-2.0.4-r2.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
@@ -51,7 +51,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="~alpha amd64 ~arm ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2017-06-06 11:45 Pacho Ramos
  0 siblings, 0 replies; 17+ messages in thread
From: Pacho Ramos @ 2017-06-06 11:45 UTC (permalink / raw
  To: gentoo-commits

commit:     6114d8e6b583c16894291087a0ae995a0c2b566a
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  6 11:44:22 2017 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Jun  6 11:44:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6114d8e6

dev-libs/klibc: Drop old

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 dev-libs/klibc/Manifest            |   4 -
 dev-libs/klibc/klibc-1.5.25.ebuild | 265 -------------------------------
 dev-libs/klibc/klibc-2.0.4.ebuild  | 316 -------------------------------------
 3 files changed, 585 deletions(-)

diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest
index cec70f846d2..b011c20c02a 100644
--- a/dev-libs/klibc/Manifest
+++ b/dev-libs/klibc/Manifest
@@ -1,7 +1,3 @@
-DIST klibc-1.5.25.tar.bz2 510064 SHA256 0b910ec0b2a97d4c775ed06e44ad7bca7be150efdf2a77a19253a573e16367d3 SHA512 e550afb319cd995fb9c7fb086bc8ede550e5e4a48856ff5856e2296f691ba643c9fcc314c5e973f4d5b4f33b543ef4bc10d29b389f83e5418ec860a80e7cac45 WHIRLPOOL d986dcdcc95e2c7846d2eda9338519d5d84f50e94f82f1eee0234a17504ae10abaa75b6c89e9cf4c228690c0cc489d4323d98e5e62cde10cf7a04581026309f3
 DIST klibc-2.0.4.tar.xz 469348 SHA256 7f9a0850586def7cf4faeeb75e5d0f66e613674c524f6e77b0f4d93a26c801cb SHA512 7a01d1744b49f3de64111fefc522b1d63f054199acf671254bc046d6f1d0b6ca68e050c99025bf8303751c2466a5e034677555649ae5909c40997858d393db8d WHIRLPOOL f5dc71b48f118155df512d8ac839b66d361b22ff4e040e49a562722d82f18ac83a8c682bf0b4c59a9b108473f74bebc673d38456cf0ab5b1051071ca3fa9b78e
-DIST klibc_2.0.2-1.debian.tar.gz 21305 SHA256 93f4b9be5a3c725a38b7ac137850311e3cf8d8094874006c7dce793d2b71e469 SHA512 9cbcc39396a49bc37ace79eaefad6e704ddc9f30aba1b39f40dd2888dad06eeeb7b9c1a387cee60a95cf5641f50bd7f225cf8209547c75a8bae8af4285152d91 WHIRLPOOL a42e148550a27426e8f38b54cb4f3b1f355759d573ab27c0ecadb0c68d0afd54a5950471628ec4e2e27ac9c8b9d841940d6b0f2c0a873d4feab7af37e7989a52
 DIST klibc_2.0.4-9.debian.tar.xz 28628 SHA256 069f3496d66bda23bca227acdbf2b5e5b57e57419db619c293b81ed4929aba12 SHA512 0fe9a6642be962fa631919850d7eeed5a87c10682766ee10fe31dec2b19a6179e0067602acb26bdc2aa8ceecfd39b1dc95a76f3b0a9bc813b172c0ffe9f0ff53 WHIRLPOOL 96de652f4b0cea4e2c117f541d820b9e869c05763e408b7bd203d04ae2b70a89939713794e0dda27f253b2662ef03aea62bd669b06de4a2290f807890b1b01e8
-DIST linux-2.6.39.tar.bz2 76096559 SHA256 584d17f2a3ee18a9501d7ff36907639e538cfdba4529978b8550c461d45c61f6 SHA512 06cb5aba7c53c68d43afcebbbb9507d8b398b3e994d8a237c66a49374ca569237f074adaa3fccba7f908eab4f51f99bae40656793eab5c2f5ce03cd3a65fa02c WHIRLPOOL 2f2c833ab1d8ddbe3e0b862b71a38d47fd3fc5688ea81cdd818369b09e72fa50481bf84533ddcea992af1130b2ceec10b6ff5eaff393a14ee70639293a555912
-DIST linux-3.12.tar.xz 76384600 SHA256 2e120ec7fde19fa51dc6b6cc11c81860a0775defcad5a5bf910ed9a50e845a02 SHA512 4ba5797e0772726d05c9f2eee66dc6dc2a5033c749ef44764c805a83da739ed5d0c6443b76785e38fe1ef74cc7ade787e48144faed0cfcb6f124f05248c700ff WHIRLPOOL a40195f6b53ba3440cf90a44495f6a59670f750851d1518e2bdfe3b949f0e898d1df5d37e271c31c555087026ddb6cc2c9109b22b9639e3222735e6f650a1417
 DIST linux-4.4.tar.xz 87295988 SHA256 401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2 SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e WHIRLPOOL 02abc203d867404b9934aaa4c1e5b5dcbb0b0021e91a03f3a7e7fd224eed106821d8b4949f32a590536db150e5a88c16fcde88538777a26d0c17900f0257b1bc

diff --git a/dev-libs/klibc/klibc-1.5.25.ebuild b/dev-libs/klibc/klibc-1.5.25.ebuild
deleted file mode 100644
index 0a7041be858..00000000000
--- a/dev-libs/klibc/klibc-1.5.25.ebuild
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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
-# unfortunately.
-# 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="39"
-PKV_EXTRA=""
-if [ -n "${PKV_EXTRA}" ]; then
-	PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.bz2"
-fi
-OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.bz2"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.bz2
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha amd64 ~arm ia64 -mips ~ppc ~ppc64 ~sparc x86"
-SLOT="0"
-IUSE="debug"
-
-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"
-
-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
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.bz2 ${P}.tar.bz2
-	[ -n "${PKV}" ] && 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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-}
-
-# 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="all"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-
-	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" \
-		T="${T}" \
-		${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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}

diff --git a/dev-libs/klibc/klibc-2.0.4.ebuild b/dev-libs/klibc/klibc-2.0.4.ebuild
deleted file mode 100644
index 907298dfb3d..00000000000
--- a/dev-libs/klibc/klibc-2.0.4.ebuild
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=5
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils multilib toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="12"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-DEBIAN_PV=2.0.2
-DEBIAN_PR=1
-DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.gz"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-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"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		amd64) echo x86 ;;
-		ppc*) echo powerpc ;;
-		# Non-merged
-		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
-		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
-	esac
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
-}
-
-src_prepare() {
-	[[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-	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
-
-	# Fix usage of -s, bug #201006
-	epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-
-	# The inline definition from sys/stat.h does not seem to get used
-	# So just copy it to  make this compile for now
-	epatch "${FILESDIR}"/klibc-2.0.2-mkfifo.patch
-
-	# Newer kernels have some headers in the uapi dir
-	epatch "${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
-
-	# Borrow the debian fixes too
-	for p in $(<"${S}"/debian/patches/series) ; do
-		epatch "${S}/debian/patches/${p}"
-	done
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		-e '1iCONFIG_ARM_UNWIND=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-	append-flags -nostdlib
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-01-04 19:21 Craig Andrews
  0 siblings, 0 replies; 17+ messages in thread
From: Craig Andrews @ 2018-01-04 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     460f2b41f46a8d1316a404eedba8e59fdb4705e2
Author:     Geaaru <geaaru <AT> gmail <DOT> com>
AuthorDate: Mon Jan  1 22:22:04 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Thu Jan  4 19:20:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=460f2b41

dev-libs/klibc: Add dependency to sys-devel/bc

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
index eea7eee113f..0e44a71bc25 100644
--- a/dev-libs/klibc/klibc-2.0.4-r2.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007:
@@ -54,8 +54,9 @@ KEYWORDS="~alpha amd64 ~arm ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 
-DEPEND="dev-lang/perl"
-RDEPEND="${DEPEND}"
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}
+	sys-devel/bc"
 
 KS="${WORKDIR}/linux-${OKV}"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-02-25 12:53 Patrick Lauer
  0 siblings, 0 replies; 17+ messages in thread
From: Patrick Lauer @ 2018-02-25 12:53 UTC (permalink / raw
  To: gentoo-commits

commit:     2753a68af8707031ce6c2a368784f7533d8cd5cd
Author:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 25 12:50:52 2018 +0000
Commit:     Patrick Lauer <patrick <AT> gentoo <DOT> org>
CommitDate: Sun Feb 25 12:52:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2753a68a

dev-libs/klibc: Bump KV, #621848

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-libs/klibc/Manifest              |   1 +
 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 318 +++++++++++++++++++++++++++++++++++
 2 files changed, 319 insertions(+)

diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest
index 5b833d7cec0..10df3d3198b 100644
--- a/dev-libs/klibc/Manifest
+++ b/dev-libs/klibc/Manifest
@@ -1,3 +1,4 @@
 DIST klibc-2.0.4.tar.xz 469348 BLAKE2B 5975e3d25f72b70c4cbaa56ea5363417407e8dace1e02e2da0b835bbb2cad56648b0084e5404528206ef3facf4ffd3611e8bd729eadd80b00e30d1a70b3057cf SHA512 7a01d1744b49f3de64111fefc522b1d63f054199acf671254bc046d6f1d0b6ca68e050c99025bf8303751c2466a5e034677555649ae5909c40997858d393db8d
 DIST klibc_2.0.4-9.debian.tar.xz 28628 BLAKE2B aaad6fafb7372152987eebda5951b9f3de2e33da583e0ea7597f666461977f461303566f9e363e9c96994c7b0eb6213c6a17b2fab72df7460db3cfbc0c2e1cf8 SHA512 0fe9a6642be962fa631919850d7eeed5a87c10682766ee10fe31dec2b19a6179e0067602acb26bdc2aa8ceecfd39b1dc95a76f3b0a9bc813b172c0ffe9f0ff53
+DIST linux-4.14.tar.xz 100770500 BLAKE2B 85dc4aa953fe65e273a24473d8de98e4f204f97c43be9fc87cf5be01f796f94cfde5c8f9c84619751f1cac51f83ce0b4681fb19c5f2965a72d4a94fe5577846a SHA512 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8
 DIST linux-4.4.tar.xz 87295988 BLAKE2B f260f1858994f5d481fd078c86e51bddbc958f7c5d1586f60dced772e1b1107ecf3aae0558c3e6f39c36f7d3aa1e6cd1e5c64ec9d6f2218f47b98413da6466fb SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
new file mode 100644
index 00000000000..8e334dc61ba
--- /dev/null
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -0,0 +1,318 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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
+# unfortunately.
+# 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.
+
+EAPI=6
+K_TARBALL_SUFFIX="xz"
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="A minimal libc subset for use with initramfs"
+HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
+KV_MAJOR="4" KV_MINOR="x" KV_SUB="14"
+PKV_EXTRA=""
+if [[ ${PKV_EXTRA} ]]; then
+	if [[ ${KV_MAJOR} == 2 ]]; then
+		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
+	else
+		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
+	fi
+	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
+fi
+if [[ ${KV_MAJOR} == 2 ]]; then
+	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
+else
+	OKV="${KV_MAJOR}.${KV_SUB}"
+fi
+KERNEL_URI="
+	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
+	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
+DEBIAN_PV=2.0.4
+DEBIAN_PR=9
+DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.xz"
+SRC_URI="
+	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
+	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
+	${PATCH_URI}
+	${KERNEL_URI}"
+
+LICENSE="|| ( GPL-2 LGPL-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE="debug test custom-cflags"
+
+RDEPEND="dev-lang/perl"
+DEPEND="${RDEPEND}
+	sys-devel/bc"
+
+KS="${WORKDIR}/linux-${OKV}"
+
+# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
+QA_EXECSTACK="*"
+# Do not strip
+RESTRICT="strip"
+
+kernel_asm_arch() {
+	a="${1:${ARCH}}"
+	case ${a} in
+		# Merged arches
+		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
+		amd64) echo x86 ;;
+		ppc*) echo powerpc ;;
+		# Non-merged
+		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
+		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
+	esac
+}
+
+# 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 ;;
+		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
+		*) echo defconfig ;;
+	esac
+}
+
+src_unpack() {
+	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
+}
+
+PATCHES=(
+	# Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
+	"${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
+	# Fix usage of -s, bug #201006
+	"${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
+	# The inline definition from sys/stat.h does not seem to get used
+	# So just copy it to make this compile for now
+	"${FILESDIR}"/klibc-2.0.2-mkfifo.patch
+	# Newer kernels have some headers in the uapi dir
+	"${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
+)
+
+src_prepare() {
+	[[ ${PKV} ]] && eapply "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
+
+	# Symlink /usr/src/linux to ${S}/linux
+	ln -snf "${KS}" linux
+	#ln -snf "/usr" linux
+
+	# Borrow the debian fixes too
+	for p in $(<"${WORKDIR}"/debian/patches/series) ; do
+		PATCHES+=( "${WORKDIR}/debian/patches/${p}" )
+	done
+
+	default
+}
+
+# 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="all"
+	local myARCH="${ARCH}" myABI="${ABI}"
+	# TODO: For cross-compiling
+	# You should set ARCH and ABI here
+	CC="$(tc-getCC)"
+	LD="$(tc-getLD)"
+	HOSTCC="$(tc-getBUILD_CC)"
+	HOSTLD="$(tc-getBUILD_LD)"
+	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
+	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
+	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
+		# The delete and insert are seperate statements
+		# so that they are reliably used.
+		sed -i \
+		-e '/CONFIG_AEABI/d' \
+		-e '1iCONFIG_AEABI=y' \
+		-e '/CONFIG_OABI_COMPAT/d' \
+		-e '1iCONFIG_OABI_COMPAT=y' \
+		-e '1iCONFIG_ARM_UNWIND=y' \
+		"${KS}"/.config \
+		"${S}"/defconfig
+	fi
+	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
+
+	cd "${S}"
+
+	use debug && myargs="${myargs} V=1"
+	use test && myargs="${myargs} test"
+	append-ldflags -z noexecstack
+	append-flags -nostdlib
+
+	emake \
+		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
+		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
+		HOSTLDFLAGS="-z noexecstack" \
+		KLIBCOPTFLAGS='-nostdlib' \
+		HOSTCC="${HOSTCC}" CC="${CC}" \
+		HOSTLD="${HOSTLD}" LD="${LD}" \
+		INSTALLDIR="/usr/${libdir}/klibc" \
+		KLIBCARCH=${KLIBCARCH} \
+		KLIBCASMARCH=${KLIBCASMARCH} \
+		SHLIBDIR="/${libdir}" \
+		libdir="/usr/${libdir}" \
+		mandir="/usr/share/man" \
+		T="${T}" \
+		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
+		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
+		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
+		${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" \
+		HOSTLDFLAGS="-z noexecstack" \
+		KLIBCOPTFLAGS='-nostdlib' \
+		HOSTCC="${HOSTCC}" CC="${CC}" \
+		HOSTLD="${HOSTLD}" LD="${LD}" \
+		INSTALLDIR="/usr/${libdir}/klibc" \
+		INSTALLROOT="${D}" \
+		KLIBCARCH=${KLIBCARCH} \
+		KLIBCASMARCH=${KLIBCASMARCH} \
+		SHLIBDIR="/${libdir}" \
+		libdir="/usr/${libdir}" \
+		mandir="/usr/share/man" \
+		T="${T}" \
+		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
+		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
+		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
+		${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
+	# NOTE: This totally violates sandbox <asturm@gentoo.org>
+	# find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX
+	find "${D}"/usr/${libdir}/klibc/include -type f \
+		\( -name '.install' -o -name '..install.cmd' \) -delete || die
+
+	# 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
+		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
+}
+
+src_test() {
+	if ! tc-is-cross-compiler ; then
+		cd "${S}"/usr/klibc/tests
+		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
+		BROKEN_TESTS="fcntl fnmatch testrand48"
+		failed=0
+		for t in $ALL_TESTS ; do
+			if has $t $BROKEN_TESTS ; then
+				echo "=== $t SKIP"
+			else
+				echo -n "=== $t "
+				./$t </dev/null >/dev/null
+				rc=$?
+				if [ $rc -eq 0 ]; then
+					echo PASS
+				else
+					echo FAIL
+					failed=1
+				fi
+			fi
+		done
+		[ $failed -ne 0 ] && die "Some tests failed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-03-27 17:02 Anthony G. Basile
  0 siblings, 0 replies; 17+ messages in thread
From: Anthony G. Basile @ 2018-03-27 17:02 UTC (permalink / raw
  To: gentoo-commits

commit:     f9e24964982637efe864a8d340517d59ec355dac
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 27 17:02:26 2018 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Mar 27 17:02:45 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9e24964

dev-libs/klibc: workaround for parallel make error

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
index 8e334dc61ba..d882a5476cb 100644
--- a/dev-libs/klibc/klibc-2.0.4-r3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -178,7 +178,8 @@ src_compile() {
 	append-ldflags -z noexecstack
 	append-flags -nostdlib
 
-	emake \
+	# Parallel build intermittantly fails when doing `LIST usr/klibc/syscalls/klib.list'
+	emake -j1 \
 		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
 		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
 		HOSTLDFLAGS="-z noexecstack" \


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-04-17 22:09 Thomas Deutschmann
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Deutschmann @ 2018-04-17 22:09 UTC (permalink / raw
  To: gentoo-commits

commit:     5440e68d92c66cbe1994587732ff2ba7c04011c5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 17 22:03:34 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 17 22:09:33 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5440e68d

dev-libs/klibc: x86 stable (bug #653384)

Package-Manager: Portage-2.3.30, Repoman-2.3.9

 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
index d882a5476cb..fa47aae61a0 100644
--- a/dev-libs/klibc/klibc-2.0.4-r3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -50,7 +50,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-04-19 20:06 Mikle Kolyada
  0 siblings, 0 replies; 17+ messages in thread
From: Mikle Kolyada @ 2018-04-19 20:06 UTC (permalink / raw
  To: gentoo-commits

commit:     236ce40ed9cbdd8433d988d35d70654bcd580c5e
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 19 20:06:47 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Apr 19 20:06:47 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=236ce40e

dev-libs/klibc: amd64 stable wrt bug #653384

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
index fa47aae61a0..83a3b13cfcd 100644
--- a/dev-libs/klibc/klibc-2.0.4-r3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -50,7 +50,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2018-04-20  6:54 Sergei Trofimovich
  0 siblings, 0 replies; 17+ messages in thread
From: Sergei Trofimovich @ 2018-04-20  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     2aab4f582e7a2d2466e916bb1addf90ef881a1e0
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 20 06:52:27 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 06:53:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aab4f58

dev-libs/klibc: stable 2.0.4-r3 for ia64, bug #653384

Bug: https://bugs.gentoo.org/653384
Package-Manager: Portage-2.3.28, Repoman-2.3.9
RepoMan-Options: --include-arches="ia64"

 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
index 83a3b13cfcd..12adc7e8033 100644
--- a/dev-libs/klibc/klibc-2.0.4-r3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -50,7 +50,7 @@ SRC_URI="
 	${KERNEL_URI}"
 
 LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="~alpha amd64 ~arm ia64 -mips ~ppc ~ppc64 ~sparc x86"
 SLOT="0"
 IUSE="debug test custom-cflags"
 


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2019-01-27 11:05 Pacho Ramos
  0 siblings, 0 replies; 17+ messages in thread
From: Pacho Ramos @ 2019-01-27 11:05 UTC (permalink / raw
  To: gentoo-commits

commit:     25d6028f2bbd8b8e7313a4f307f3115332ebc062
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 27 11:02:15 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun Jan 27 11:05:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25d6028f

dev-libs/klibc: Drop old

Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 dev-libs/klibc/Manifest              |   1 -
 dev-libs/klibc/klibc-2.0.4-r2.ebuild | 318 -----------------------------------
 2 files changed, 319 deletions(-)

diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest
index 10df3d3198b..d2bab8e8ae0 100644
--- a/dev-libs/klibc/Manifest
+++ b/dev-libs/klibc/Manifest
@@ -1,4 +1,3 @@
 DIST klibc-2.0.4.tar.xz 469348 BLAKE2B 5975e3d25f72b70c4cbaa56ea5363417407e8dace1e02e2da0b835bbb2cad56648b0084e5404528206ef3facf4ffd3611e8bd729eadd80b00e30d1a70b3057cf SHA512 7a01d1744b49f3de64111fefc522b1d63f054199acf671254bc046d6f1d0b6ca68e050c99025bf8303751c2466a5e034677555649ae5909c40997858d393db8d
 DIST klibc_2.0.4-9.debian.tar.xz 28628 BLAKE2B aaad6fafb7372152987eebda5951b9f3de2e33da583e0ea7597f666461977f461303566f9e363e9c96994c7b0eb6213c6a17b2fab72df7460db3cfbc0c2e1cf8 SHA512 0fe9a6642be962fa631919850d7eeed5a87c10682766ee10fe31dec2b19a6179e0067602acb26bdc2aa8ceecfd39b1dc95a76f3b0a9bc813b172c0ffe9f0ff53
 DIST linux-4.14.tar.xz 100770500 BLAKE2B 85dc4aa953fe65e273a24473d8de98e4f204f97c43be9fc87cf5be01f796f94cfde5c8f9c84619751f1cac51f83ce0b4681fb19c5f2965a72d4a94fe5577846a SHA512 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8
-DIST linux-4.4.tar.xz 87295988 BLAKE2B f260f1858994f5d481fd078c86e51bddbc958f7c5d1586f60dced772e1b1107ecf3aae0558c3e6f39c36f7d3aa1e6cd1e5c64ec9d6f2218f47b98413da6466fb SHA512 13c8459933a8b80608e226a1398e3d1848352ace84bcfb7e6a4a33cb230bbe1ab719d4b58e067283df91ce5311be6d2d595fc8c19e2ae6ecc652499415614b3e

diff --git a/dev-libs/klibc/klibc-2.0.4-r2.ebuild b/dev-libs/klibc/klibc-2.0.4-r2.ebuild
deleted file mode 100644
index f9435d7ad81..00000000000
--- a/dev-libs/klibc/klibc-2.0.4-r2.ebuild
+++ /dev/null
@@ -1,318 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# 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
-# unfortunately.
-# 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.
-
-EAPI=6
-K_TARBALL_SUFFIX="xz"
-
-inherit eutils toolchain-funcs flag-o-matic
-
-DESCRIPTION="A minimal libc subset for use with initramfs"
-HOMEPAGE="https://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/"
-KV_MAJOR="4" KV_MINOR="x" KV_SUB="4"
-PKV_EXTRA=""
-if [[ ${PKV_EXTRA} ]]; then
-	if [[ ${KV_MAJOR} == 2 ]]; then
-		PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	else
-		PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}"
-	fi
-	PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}"
-fi
-if [[ ${KV_MAJOR} == 2 ]]; then
-	OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}"
-else
-	OKV="${KV_MAJOR}.${KV_SUB}"
-fi
-KERNEL_URI="
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX}
-	mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}"
-DEBIAN_PV=2.0.4
-DEBIAN_PR=9
-DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.xz"
-SRC_URI="
-	mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX}
-	mirror://debian/pool/main/k/klibc/${DEBIAN_A}
-	${PATCH_URI}
-	${KERNEL_URI}"
-
-LICENSE="|| ( GPL-2 LGPL-2 )"
-KEYWORDS="~alpha amd64 ~arm ia64 -mips ~ppc ~ppc64 ~sparc x86"
-SLOT="0"
-IUSE="debug test custom-cflags"
-
-RDEPEND="dev-lang/perl"
-DEPEND="${RDEPEND}
-	sys-devel/bc"
-
-KS="${WORKDIR}/linux-${OKV}"
-
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
-QA_EXECSTACK="*"
-# Do not strip
-RESTRICT="strip"
-
-kernel_asm_arch() {
-	a="${1:${ARCH}}"
-	case ${a} in
-		# Merged arches
-		x86) echo i386 ;; # for build on x86 userspace & 64bit kernel
-		amd64) echo x86 ;;
-		ppc*) echo powerpc ;;
-		# Non-merged
-		alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;;
-		*) die "TODO: Update the code for your asm-ARCH symlink" ;;
-	esac
-}
-
-# 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 ;;
-		sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;;
-		*) echo defconfig ;;
-	esac
-}
-
-src_unpack() {
-	unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A}
-}
-
-PATCHES=(
-	# Build interp.o with EXTRA_KLIBCAFLAGS (.S source)
-	"${FILESDIR}"/${PN}-1.4.11-interp-flags.patch
-	# Fix usage of -s, bug #201006
-	"${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch
-	# The inline definition from sys/stat.h does not seem to get used
-	# So just copy it to make this compile for now
-	"${FILESDIR}"/klibc-2.0.2-mkfifo.patch
-	# Newer kernels have some headers in the uapi dir
-	"${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch
-)
-
-src_prepare() {
-	[[ ${PKV} ]] && eapply "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX}
-
-	# Symlink /usr/src/linux to ${S}/linux
-	ln -snf "${KS}" linux
-	#ln -snf "/usr" linux
-
-	# Borrow the debian fixes too
-	for p in $(<"${WORKDIR}"/debian/patches/series) ; do
-		PATCHES+=( "${WORKDIR}/debian/patches/${p}" )
-	done
-
-	default
-}
-
-# 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="all"
-	local myARCH="${ARCH}" myABI="${ABI}"
-	# TODO: For cross-compiling
-	# You should set ARCH and ABI here
-	CC="$(tc-getCC)"
-	LD="$(tc-getLD)"
-	HOSTCC="$(tc-getBUILD_CC)"
-	HOSTLD="$(tc-getBUILD_LD)"
-	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} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig"
-	if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \
-	   [[ "${CHOST/eabi}" != "${CHOST}" ]]; then
-		# The delete and insert are seperate statements
-		# so that they are reliably used.
-		sed -i \
-		-e '/CONFIG_AEABI/d' \
-		-e '1iCONFIG_AEABI=y' \
-		-e '/CONFIG_OABI_COMPAT/d' \
-		-e '1iCONFIG_OABI_COMPAT=y' \
-		-e '1iCONFIG_ARM_UNWIND=y' \
-		"${KS}"/.config \
-		"${S}"/defconfig
-	fi
-	emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage"
-
-	cd "${S}"
-
-	use debug && myargs="${myargs} V=1"
-	use test && myargs="${myargs} test"
-	append-ldflags -z noexecstack
-	append-flags -nostdlib
-
-	emake \
-		EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
-		EXTRA_KLIBCLDFLAGS="-z noexecstack" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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" \
-		HOSTLDFLAGS="-z noexecstack" \
-		KLIBCOPTFLAGS='-nostdlib' \
-		HOSTCC="${HOSTCC}" CC="${CC}" \
-		HOSTLD="${HOSTLD}" LD="${LD}" \
-		INSTALLDIR="/usr/${libdir}/klibc" \
-		INSTALLROOT="${D}" \
-		KLIBCARCH=${KLIBCARCH} \
-		KLIBCASMARCH=${KLIBCASMARCH} \
-		SHLIBDIR="/${libdir}" \
-		libdir="/usr/${libdir}" \
-		mandir="/usr/share/man" \
-		T="${T}" \
-		$(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \
-		$(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \
-		$(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \
-		${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
-	# NOTE: This totally violates sandbox <asturm@gentoo.org>
-	# find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX
-	find "${D}"/usr/${libdir}/klibc/include -type f \
-		\( -name '.install' -o -name '..install.cmd' \) -delete || die
-
-	# 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
-		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
-}
-
-src_test() {
-	if ! tc-is-cross-compiler ; then
-		cd "${S}"/usr/klibc/tests
-		ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')"
-		BROKEN_TESTS="fcntl fnmatch testrand48"
-		failed=0
-		for t in $ALL_TESTS ; do
-			if has $t $BROKEN_TESTS ; then
-				echo "=== $t SKIP"
-			else
-				echo -n "=== $t "
-				./$t </dev/null >/dev/null
-				rc=$?
-				if [ $rc -eq 0 ]; then
-					echo PASS
-				else
-					echo FAIL
-					failed=1
-				fi
-			fi
-		done
-		[ $failed -ne 0 ] && die "Some tests failed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/
@ 2019-12-12 16:46 Michał Górny
  0 siblings, 0 replies; 17+ messages in thread
From: Michał Górny @ 2019-12-12 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     99367034d36d834458300fb17edf317153c3f2e6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 15:32:44 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 16:34:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99367034

dev-libs/klibc: [QA] Fix MissingTestRestrict

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-libs/klibc/klibc-2.0.4-r3.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-libs/klibc/klibc-2.0.4-r3.ebuild b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
index 15cd0619685..ceaa4843485 100644
--- a/dev-libs/klibc/klibc-2.0.4-r3.ebuild
+++ b/dev-libs/klibc/klibc-2.0.4-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # Robin H. Johnson <robbat2@gentoo.org>, 12 Nov 2007:
@@ -63,7 +63,8 @@ KS="${WORKDIR}/linux-${OKV}"
 # Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot
 QA_EXECSTACK="*"
 # Do not strip
-RESTRICT="strip"
+RESTRICT="strip
+	!test? ( test )"
 
 kernel_asm_arch() {
 	a="${1:${ARCH}}"


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-12-12 16:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 16:27 [gentoo-commits] repo/gentoo:master commit in: dev-libs/klibc/ Agostino Sarubbo
  -- strict thread matches above, loose matches on Subject: below --
2019-12-12 16:46 Michał Górny
2019-01-27 11:05 Pacho Ramos
2018-04-20  6:54 Sergei Trofimovich
2018-04-19 20:06 Mikle Kolyada
2018-04-17 22:09 Thomas Deutschmann
2018-03-27 17:02 Anthony G. Basile
2018-02-25 12:53 Patrick Lauer
2018-01-04 19:21 Craig Andrews
2017-06-06 11:45 Pacho Ramos
2017-01-23 15:46 Agostino Sarubbo
2017-01-23 13:51 Agostino Sarubbo
2017-01-11 20:58 Andreas Sturmlechner
2017-01-11 20:58 Andreas Sturmlechner
2016-08-25 16:13 Pacho Ramos
2016-08-25 16:13 Pacho Ramos
2016-06-15 18:50 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox