summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Ahlberg <aliz@gentoo.org>2004-01-02 10:48:06 +0000
committerDaniel Ahlberg <aliz@gentoo.org>2004-01-02 10:48:06 +0000
commit3b60773a1d9be3c7352321fa7fa6fc3f09ab251a (patch)
treee04fbccf63f677daae9382cb1e8be4d0dea0b653 /sys-libs/lwp
parentAdding amd64 keyword, closing #36525 (diff)
downloadhistorical-3b60773a1d9be3c7352321fa7fa6fc3f09ab251a.tar.gz
historical-3b60773a1d9be3c7352321fa7fa6fc3f09ab251a.tar.bz2
historical-3b60773a1d9be3c7352321fa7fa6fc3f09ab251a.zip
Adding amd64 keyword, closing #34542
Diffstat (limited to 'sys-libs/lwp')
-rw-r--r--sys-libs/lwp/Manifest5
-rw-r--r--sys-libs/lwp/files/lwp-1.10-amd64.patch81
-rw-r--r--sys-libs/lwp/lwp-1.10.ebuild8
3 files changed, 91 insertions, 3 deletions
diff --git a/sys-libs/lwp/Manifest b/sys-libs/lwp/Manifest
index 01e533ce7b0b..05d6e09b192e 100644
--- a/sys-libs/lwp/Manifest
+++ b/sys-libs/lwp/Manifest
@@ -1,6 +1,7 @@
-MD5 de0cc810f892d35a20f2c1cc1ccffd38 ChangeLog 510
-MD5 ff192cd6486b0a29636998405bc616c0 lwp-1.10.ebuild 605
+MD5 121d0d81ffbb1bb5985b0735d10ea0d6 lwp-1.10.ebuild 694
MD5 047b49e8a1a825359f48fce874a7a9c9 lwp-1.9.ebuild 813
+MD5 de0cc810f892d35a20f2c1cc1ccffd38 ChangeLog 510
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
MD5 6351dda3b3e5484743b2295bf48f09ad files/digest-lwp-1.10 60
MD5 34a83e1b814b348b742cc8eb36f13130 files/digest-lwp-1.9 59
+MD5 642fb581dc4613a8c351d35ddfbfeaaf files/lwp-1.10-amd64.patch 1929
diff --git a/sys-libs/lwp/files/lwp-1.10-amd64.patch b/sys-libs/lwp/files/lwp-1.10-amd64.patch
new file mode 100644
index 000000000000..acd7c7de10ac
--- /dev/null
+++ b/sys-libs/lwp/files/lwp-1.10-amd64.patch
@@ -0,0 +1,81 @@
+--- lwp-1.9/src/process.S.amd64 2001-10-04 23:14:08.000000000 +0200
++++ lwp-1.9/src/process.S 2003-09-26 17:18:35.000000000 +0200
+@@ -472,6 +472,61 @@ ENTRY(returnto)
+ #endif /* i386 */
+
+
++#if defined(__x86_64__)
++
++#ifdef __linux__
++#include <linux/linkage.h>
++#endif
++
++#define FRAME_SIZE (8*8)
++
++/*
++ savecontext(f, area1, newsp)
++ int (*f)();
++ struct savearea *area1;
++ char *newsp;
++
++*/
++
++#define f rdi
++#define area1 rsi
++#define newsp rdx
++#define topstack 0
++
++ .text
++ENTRY(savecontext)
++ sub $FRAME_SIZE, %rsp
++ mov %rbx, (0*8)(%rsp) /* Save registers. */
++ mov %rbp, (1*8)(%rsp)
++ mov %r12, (2*8)(%rsp)
++ mov %r13, (3*8)(%rsp)
++ mov %r14, (4*8)(%rsp)
++ mov %r15, (5*8)(%rsp)
++ mov %rsp, topstack(%area1) /* Store sp in savearea. */
++ cmp $0, %newsp
++ cmovne %newsp, %rsp /* Don't change the stack if newsp is zero. */
++ jmp *%f /* f(); */
++
++/*
++ returnto(area2)
++ struct savearea *area2;
++*/
++
++#define area2 rdi
++
++ENTRY(returnto)
++ mov topstack(%area2), %rsp /* Restore stack pointer. */
++ mov (0*8)(%rsp), %rbx /* Restore registers. */
++ mov (1*8)(%rsp), %rbp
++ mov (2*8)(%rsp), %r12
++ mov (3*8)(%rsp), %r13
++ mov (4*8)(%rsp), %r14
++ mov (5*8)(%rsp), %r15
++ add $FRAME_SIZE, %rsp
++ ret
++
++#endif /* amd64 */
++
+ #ifdef luna88k
+ /* Luna88K Code from Dan Stodolsky via Brad White */
+
+--- lwp-1.9/src/lwp.c.amd64 2001-04-02 14:16:16.000000000 +0200
++++ lwp-1.9/src/lwp.c 2003-09-26 17:14:30.000000000 +0200
+@@ -565,6 +565,14 @@ int LWP_CreateProcess(PFIC ep, int stack
+ #else
+ pagesize = getpagesize();
+
++#if defined(__x86_64__)
++ /* [gb] Ensure minimal stack size. Heuristically determined
++ through tdb test that 2048 is too small when printf() et al. come
++ into action. */
++ if (stacksize < pagesize)
++ stacksize = pagesize;
++#endif
++
+ #ifdef MAP_ANON
+ stackptr = mmap(lwp_stackbase, stacksize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANON, -1, 0);
diff --git a/sys-libs/lwp/lwp-1.10.ebuild b/sys-libs/lwp/lwp-1.10.ebuild
index 17a3f0550ea3..f81c2766b97a 100644
--- a/sys-libs/lwp/lwp-1.10.ebuild
+++ b/sys-libs/lwp/lwp-1.10.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/lwp/lwp-1.10.ebuild,v 1.1 2003/11/15 10:24:49 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/lwp/lwp-1.10.ebuild,v 1.2 2004/01/02 10:47:56 aliz Exp $
DESCRIPTION="Light weight process library (used by Coda). This is NOT libwww-perl."
HOMEPAGE="http://www.coda.cs.cmu.edu/"
@@ -12,6 +12,12 @@ KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~arm ~amd64 ~ia64"
DEPEND="virtual/glibc"
+src_unpack() {
+ unpack ${A} ; cd ${S}
+
+ use amd64 && epatch ${FILESDIR}/${P}-amd64.patch
+}
+
src_install() {
einstall || die