summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-10-31 07:59:57 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-10-31 07:59:57 +0000
commit70cb716f8f0bd5cd9bf4574438149dd0799d981b (patch)
treef1397c2e77b5731a2d361b74d9eee6f04d383877 /sys-libs
parent0.6.20 version bump. (diff)
downloadgentoo-2-70cb716f8f0bd5cd9bf4574438149dd0799d981b.tar.gz
gentoo-2-70cb716f8f0bd5cd9bf4574438149dd0799d981b.tar.bz2
gentoo-2-70cb716f8f0bd5cd9bf4574438149dd0799d981b.zip
Version bump so it can be used for new memcached fun. src_test needs some work still.
(Portage version: 2.2_rc46/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libhugetlbfs/ChangeLog11
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch44
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild86
3 files changed, 139 insertions, 2 deletions
diff --git a/sys-libs/libhugetlbfs/ChangeLog b/sys-libs/libhugetlbfs/ChangeLog
index 65d47360899f..08dc2b69f7b9 100644
--- a/sys-libs/libhugetlbfs/ChangeLog
+++ b/sys-libs/libhugetlbfs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-libs/libhugetlbfs
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog,v 1.2 2008/02/05 21:39:00 tgall Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog,v 1.3 2009/10/31 07:59:56 robbat2 Exp $
+
+*libhugetlbfs-2.6 (31 Oct 2009)
+
+ 31 Oct 2009; Robin H. Johnson <robbat2@gentoo.org>
+ +libhugetlbfs-2.6.ebuild, +files/libhugetlbfs-2.6-noexec-stack.patch:
+ Version bump so it can be used for new memcached fun. src_test needs some
+ work still.
*libhugetlbfs-1.2 (5 Feb 2008)
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
new file mode 100644
index 000000000000..bf964cda7a68
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
@@ -0,0 +1,44 @@
+diff -Nuar libhugetlbfs-2.6.orig/sys-elf32ppclinux.S libhugetlbfs-2.6/sys-elf32ppclinux.S
+--- libhugetlbfs-2.6.orig/sys-elf32ppclinux.S 2009-08-24 12:56:07.000000000 +0000
++++ libhugetlbfs-2.6/sys-elf32ppclinux.S 2009-10-31 06:43:49.040319417 +0000
+@@ -32,3 +32,7 @@
+ mr 8,9
+ sc
+ blr
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff -Nuar libhugetlbfs-2.6.orig/sys-elf64ppc.S libhugetlbfs-2.6/sys-elf64ppc.S
+--- libhugetlbfs-2.6.orig/sys-elf64ppc.S 2009-08-24 12:56:07.000000000 +0000
++++ libhugetlbfs-2.6/sys-elf64ppc.S 2009-10-31 06:43:54.303652251 +0000
+@@ -41,3 +41,7 @@
+ mr 8,9
+ sc
+ blr
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff -Nuar libhugetlbfs-2.6.orig/sys-elf_i386.S libhugetlbfs-2.6/sys-elf_i386.S
+--- libhugetlbfs-2.6.orig/sys-elf_i386.S 2009-08-24 12:56:07.000000000 +0000
++++ libhugetlbfs-2.6/sys-elf_i386.S 2009-10-31 06:43:57.536975670 +0000
+@@ -40,3 +40,7 @@
+ pop %edi
+ pop %ebp
+ ret
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff -Nuar libhugetlbfs-2.6.orig/sys-elf_x86_64.S libhugetlbfs-2.6/sys-elf_x86_64.S
+--- libhugetlbfs-2.6.orig/sys-elf_x86_64.S 2009-08-24 12:56:07.000000000 +0000
++++ libhugetlbfs-2.6/sys-elf_x86_64.S 2009-10-31 06:44:26.943648847 +0000
+@@ -32,3 +32,7 @@
+ mov 0x8(%rsp),%r9
+ syscall
+ retq
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild
new file mode 100644
index 000000000000..20b0df493f0f
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild,v 1.1 2009/10/31 07:59:56 robbat2 Exp $
+
+EAPI=2
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="easy hugepage access"
+HOMEPAGE="http://libhugetlbfs.ozlabs.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+IUSE=""
+
+DEPEND=""
+
+# testsuite requires specific kernel options, and LOTS of free memory.
+# with 16GiB of RAM available, I hit swap :-) - robbat2
+RESTRICT=test
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
+ sed -i \
+ -e '/^PREFIX/s:/local::' \
+ -e '1iBUILDTYPE = NATIVEONLY' \
+ -e '1iV = 1' \
+ -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
+ -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
+ Makefile
+ if [ "$(get_libdir)" == "lib64" ]; then
+ sed -i \
+ -e "/^LIB\(32\)/s:=.*:= lib32:" \
+ Makefile
+ fi
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ tc-export AR CC
+ emake libs tools || die
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc HOWTO NEWS README
+ rm "${D}"/usr/bin/oprofile*
+}
+
+src_test() {
+ emake tests || die "Failed to build tests"
+ hugeadm='obj/hugeadm'
+ ${hugeadm} --create-mounts
+ PAGESIZES="$(${hugeadm} --page-sizes-all)"
+ MIN_HUGEPAGE_RAM=$((64*1024*1024))
+ ALLOCATED=''
+ for p in ${PAGESIZES} ; do
+ pagecount=$((${MIN_HUGEPAGE_RAM}/${p}))
+ ${hugeadm} \
+ --pool-pages-min ${p}:+${pagecount} \
+ --pool-pages-max ${p}:+${pagecount} \
+ && ALLOCATED="${ALLOCATED} ${p}:${pagecount}" \
+ || die "Failed to set pages"
+ done
+ cd "${S}"/tests
+ TESTOPTS="-t func"
+ case $ARCH in
+ amd64|ppc64)
+ TESTOPTS="${TESTOPTS} -b 64"
+ ;;
+ x86)
+ TESTOPTS="${TESTOPTS} -b 32"
+ ;;
+ esac
+ ./run_tests.py ${TESTOPTS}
+ # TODO: undo the allocation here.
+ for p in ${ALLOCATED} ; do
+ :
+ done
+}
+
+