diff options
author | 2007-06-13 18:26:41 +0000 | |
---|---|---|
committer | 2007-06-13 18:26:41 +0000 | |
commit | 18c22dc6d59990330c617d1e65b9ea9ea328f1fd (patch) | |
tree | 4932b48d7072f3f8e022fcb6cf1127f6adce8815 /bugfixes | |
parent | Initial ebuild (current state). (diff) | |
download | phreak-18c22dc6d59990330c617d1e65b9ea9ea328f1fd.tar.gz phreak-18c22dc6d59990330c617d1e65b9ea9ea328f1fd.tar.bz2 phreak-18c22dc6d59990330c617d1e65b9ea9ea328f1fd.zip |
Updated (hopefully improved) ebuild, fixing compilation issues for ppc/ppc64 due to multi userlandness, sparc and hopefully mips too.
svn path=/; revision=336
Diffstat (limited to 'bugfixes')
-rw-r--r-- | bugfixes/dev-libs/klibc/Manifest | 8 | ||||
-rw-r--r-- | bugfixes/dev-libs/klibc/klibc-1.5.ebuild | 143 |
2 files changed, 38 insertions, 113 deletions
diff --git a/bugfixes/dev-libs/klibc/Manifest b/bugfixes/dev-libs/klibc/Manifest index ae7ba53..96c7afc 100644 --- a/bugfixes/dev-libs/klibc/Manifest +++ b/bugfixes/dev-libs/klibc/Manifest @@ -7,10 +7,10 @@ MD5 b74d27999ddd26a5b44477849bda10d1 files/klibc-1.4.9-mips32.patch 632 RMD160 7f9769770208f6b5e44df88f22a682b29acbad3b files/klibc-1.4.9-mips32.patch 632 SHA256 546ca8b913721671767fc0c119d694ddaead20f259738ea822a295e20e4f22d3 files/klibc-1.4.9-mips32.patch 632 DIST klibc-1.5.tar.bz2 487483 RMD160 9329426693c39eca2c357987bfa37656570b9d35 SHA1 254444bcc3f42855ec69b3a2497d5e6162e2fe2f SHA256 27000ba4bc73a5977502b27d7036df24dd6ab94a1c33b8f5d6d54ba62772f0c7 -EBUILD klibc-1.5.ebuild 5552 RMD160 1f337596c065c4de1f4686650b4215cea3306fe7 SHA1 0a88bec3592b1803a48df8f155ac6b253492036c SHA256 1b9aac06365fcd06615e011bb1e084b905c25e8bccbd054b518f5da594ed2aea -MD5 b254cfa4fe704023e6e3f19b43d49d11 klibc-1.5.ebuild 5552 -RMD160 1f337596c065c4de1f4686650b4215cea3306fe7 klibc-1.5.ebuild 5552 -SHA256 1b9aac06365fcd06615e011bb1e084b905c25e8bccbd054b518f5da594ed2aea klibc-1.5.ebuild 5552 +EBUILD klibc-1.5.ebuild 3433 RMD160 eb7dfb8fd9d0cdd65ac634df58fad8ae04c6bf72 SHA1 f705f369288f82429171fa9bc2ce554be5ebfaf7 SHA256 993391e1ae9bb9c5258feb91f0d27b228921be685bd04fd8d3ab737c14833c45 +MD5 6edd47cb116fb26f45c3a07cb883f997 klibc-1.5.ebuild 3433 +RMD160 eb7dfb8fd9d0cdd65ac634df58fad8ae04c6bf72 klibc-1.5.ebuild 3433 +SHA256 993391e1ae9bb9c5258feb91f0d27b228921be685bd04fd8d3ab737c14833c45 klibc-1.5.ebuild 3433 MD5 b79c6ebc2ec3079964fc074dfe80e380 files/digest-klibc-1.5 232 RMD160 759a89e619b883990d30497b55d5042ca172a108 files/digest-klibc-1.5 232 SHA256 9b784615ed975d744c25afbf8716126d2e2446a20b4a9146d0ced31cda10e26e files/digest-klibc-1.5 232 diff --git a/bugfixes/dev-libs/klibc/klibc-1.5.ebuild b/bugfixes/dev-libs/klibc/klibc-1.5.ebuild index eb51c0a..492d501 100644 --- a/bugfixes/dev-libs/klibc/klibc-1.5.ebuild +++ b/bugfixes/dev-libs/klibc/klibc-1.5.ebuild @@ -4,79 +4,25 @@ inherit eutils linux-info multilib toolchain-funcs -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - export CTARGET=${CATEGORY/cross-} - fi -fi - DESCRIPTION="A minimal libc subset for use with initramfs." HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" SRC_URI="ftp://ftp.kernel.org/pub/linux/libs/klibc/${P}.tar.bz2 ftp://ftp.kernel.org/pub/linux/libs/klibc/Testing/${P}.tar.bz2" LICENSE="|| ( GPL-2 LGPL-2 )" -KEYWORDS="~amd64 -mips ~ppc ~x86" +KEYWORDS="~amd64 -mips ~ppc ~x86 ~sparc" +SLOT="0" IUSE="debug n32" DEPEND="dev-lang/perl virtual/linux-sources" RDEPEND="dev-lang/perl" -if [[ ${CTARGET} != ${CHOST} ]] ; then - SLOT="${CTARGET}" -else - SLOT="0" -fi - # Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot QA_EXECSTACK="*" -guess_arch() { - local x - local host=$(echo "${CTARGET%%-*}" | sed -e 's/i.86/i386/' \ - -e 's/sun4u/sparc64/' \ - -e 's/arm.*/arm/' \ - -e 's/sa110/arm/' \ - -e 's/powerpc/ppc/') - - # Sort reverse so that we will get ppc64 before ppc, etc - for x in $(ls -1 "${S}/usr/include/arch/" | sort -r) ; do - if [[ ${host} == "${x}" ]] ; then - echo "${x}" - return 0 - fi - done - - return 1 -} - src_unpack() { unpack ${A} - - if [[ ! -d /usr/${CTARGET} ]] ; then - echo - eerror "It does not look like your cross-compiler is setup properly!" - die "It does not look like your cross-compiler is setup properly!" - fi - - einfo "CTARGET = $CTARGET" - if ! guess_arch &>/dev/null ; then - echo - eerror "Could not guess klibc's ARCH from your CTARGET!" - die "Could not guess klibc's ARCH from your CTARGET!" - fi - - kernel_arch=$(readlink "${KV_OUT_DIR}/include/asm" | sed -e 's:asm-::' | \ - sed -e 's/powerpc/ppc/') - if [[ ${kernel_arch} != $(guess_arch) ]] ; then - echo - eerror "Your kernel sources are not configured for your chosen arch!" - eerror "(KERNEL_ARCH=\"${kernel_arch}\", ARCH=\"$(guess_arch)\")" - die "Your kernel sources are not configured for your chosen arch!" - fi - cd "${S}" # Symlink /usr/src/linux to ${S}/linux @@ -90,80 +36,60 @@ src_unpack() { if use mips ; then ! use n32 && epatch "${FILESDIR}"/${PN}-1.4.9-mips32.patch fi + + # Fixes for sparc +# epatch "${FILESDIR}"/${P}-sigaction.patch +# epatch "${FILESDIR}"/${P}-ppc-undef-signal.h.patch } src_compile() { - local myargs + local myconf="" [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \ - myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" + myconf="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" - use debug && myargs="${myargs} V=1" + use debug && myconf="${myargs} V=1" if tc-is-cross-compiler ; then - einfo "ARCH = \"$(guess_arch)\"" - einfo "CROSS = \"${CTARGET}-\"" - emake KLIBCARCH=$(guess_arch) \ - CROSS_COMPILE="${CTARGET}-" \ - EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ - EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ - libdir="/usr/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - mandir="/usr/share/man" \ - INSTALLDIR="/usr/$(get_libdir)/klibc" \ - ${myargs} || die "Compile failed!" - else - env -u ARCH \ - emake \ - EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ - EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ - libdir="/usr/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - mandir="/usr/share/man" \ - INSTALLDIR="/usr/$(get_libdir)/klibc" \ - ${myargs} || die "Compile failed!" + myconf="CROSS_COMPILE=${CTARGET}-" fi + + emake KLIBCARCH=$(tc-arch) \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myconf} || die "Compile failed!" } src_install() { - local myargs klibc_prefix + local myconf="" klibc_prefix="" [[ ${KV_DIR} != "${KV_OUT_DIR}" ]] && \ - myargs="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" + myconf="KLIBCKERNELOBJ='${KV_OUT_DIR}/' KBUILD_SRC='1'" - use debug && myargs="${myargs} V=1" + use debug && myconf="${myargs} V=1" if tc-is-cross-compiler ; then klibc_prefix=$("${S}/klcc/${CTARGET}-klcc" -print-klibc-prefix) - - make \ - EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ - EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ - INSTALLROOT="${D}" \ - KLIBCARCH=$(guess_arch) \ - CROSS_COMPILE="${CTARGET}-" \ - libdir="/usr/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - mandir="/usr/share/man" \ - INSTALLDIR="/usr/$(get_libdir)/klibc" \ - ${myargs} \ - install || die "Install failed!" + myconf="CROSS_COMPILE=${CTARGET}-" else klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) - - env -u ARCH \ - make \ - EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ - EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ - INSTALLROOT="${D}" \ - libdir="/usr/$(get_libdir)" \ - SHLIBDIR="/$(get_libdir)" \ - mandir="/usr/share/man" \ - INSTALLDIR="/usr/$(get_libdir)/klibc" \ - ${myargs} \ - install || die "Install failed!" fi + emake KLIBCARCH=$(tc-arch) \ + EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ + EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ + INSTALLROOT="${D}" \ + libdir="/usr/$(get_libdir)" \ + SHLIBDIR="/$(get_libdir)" \ + mandir="/usr/share/man" \ + INSTALLDIR="/usr/$(get_libdir)/klibc" \ + ${myargs} \ + install || die "Install failed!" + # klibc doesn't support prelinking, so we need to mask it cat > "${T}/70klibc" <<-EOF PRELINK_PATH_MASK="/usr/$(get_libdir)/klibc" @@ -175,7 +101,6 @@ src_install() { # 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/$(get_libdir)/klibc/include | xargs chmod o+rX # Hardlinks becoming copies |