diff options
author | Keri Harris <keri@gentoo.org> | 2010-02-14 07:24:57 +0000 |
---|---|---|
committer | Keri Harris <keri@gentoo.org> | 2010-02-14 07:24:57 +0000 |
commit | ce08aab2babad3d9eb1ef54d481d723258bfa1cd (patch) | |
tree | f2774ac7375a23016c83ff96901fe35141476bf1 /dev-lang/mercury | |
parent | fixed checksum, bug #302995. (diff) | |
download | gentoo-2-ce08aab2babad3d9eb1ef54d481d723258bfa1cd.tar.gz gentoo-2-ce08aab2babad3d9eb1ef54d481d723258bfa1cd.tar.bz2 gentoo-2-ce08aab2babad3d9eb1ef54d481d723258bfa1cd.zip |
Add generic mach_dep for ASM_CLEAR_CODE targets
(Portage version: 2.1.7.16/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/mercury')
-rw-r--r-- | dev-lang/mercury/ChangeLog | 6 | ||||
-rw-r--r-- | dev-lang/mercury/files/mercury-10.04_beta1-boehm_gc.patch | 97 | ||||
-rw-r--r-- | dev-lang/mercury/mercury-10.04_beta1.ebuild | 3 |
3 files changed, 104 insertions, 2 deletions
diff --git a/dev-lang/mercury/ChangeLog b/dev-lang/mercury/ChangeLog index 0c3107bf8715..8c62cf261537 100644 --- a/dev-lang/mercury/ChangeLog +++ b/dev-lang/mercury/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/mercury # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.96 2010/02/13 02:50:34 keri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/ChangeLog,v 1.97 2010/02/14 07:24:57 keri Exp $ + + 14 Feb 2010; <keri@gentoo.org> mercury-10.04_beta1.ebuild, + +files/mercury-10.04_beta1-boehm_gc.patch: + Add generic mach_dep for ASM_CLEAR_CODE targets *mercury-10.04_beta1 (13 Feb 2010) diff --git a/dev-lang/mercury/files/mercury-10.04_beta1-boehm_gc.patch b/dev-lang/mercury/files/mercury-10.04_beta1-boehm_gc.patch new file mode 100644 index 000000000000..0a7011700de8 --- /dev/null +++ b/dev-lang/mercury/files/mercury-10.04_beta1-boehm_gc.patch @@ -0,0 +1,97 @@ +diff -urN mercury-compiler-10.04-beta.orig//boehm_gc/Makefile mercury-compiler-10.04-beta/boehm_gc/Makefile +--- mercury-compiler-10.04-beta.orig//boehm_gc/Makefile 2009-10-10 23:44:13.000000000 +1300 ++++ mercury-compiler-10.04-beta/boehm_gc/Makefile 2010-02-14 18:04:39.000000000 +1300 +@@ -648,6 +648,7 @@ + ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S + ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s + ./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s ++ ./if_mach SPARC LINUX $(CC) -c -o mach_dep2.o $(SPECIALCFLAGS) $(srcdir)/sparc_generic_mach_dep.c + ./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c + ./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o + ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s +diff -urN mercury-compiler-10.04-beta.orig/boehm_gc/sparc_generic_mach_dep.c mercury-compiler-10.04-beta/boehm_gc/sparc_generic_mach_dep.c +--- mercury-compiler-10.04-beta.orig/boehm_gc/sparc_generic_mach_dep.c 1970-01-01 12:00:00.000000000 +1200 ++++ mercury-compiler-10.04-beta/boehm_gc/sparc_generic_mach_dep.c 2010-02-14 19:18:42.000000000 +1300 +@@ -0,0 +1,82 @@ ++# include "private/gc_priv.h" ++ ++/* On register window machines, we need a way to force registers into */ ++/* the stack. Return sp. */ ++# ifdef SPARC ++ asm(" .seg \"text\""); ++# if defined(SVR4) || defined(NETBSD) || defined(FREEBSD) ++ asm(" .globl GC_save_regs_in_stack"); ++ asm("GC_save_regs_in_stack:"); ++ asm(" .type GC_save_regs_in_stack,#function"); ++# else ++ asm(" .globl _GC_save_regs_in_stack"); ++ asm("_GC_save_regs_in_stack:"); ++# endif ++# if defined(__arch64__) || defined(__sparcv9) ++ asm(" save %sp,-128,%sp"); ++ asm(" flushw"); ++ asm(" ret"); ++ asm(" restore %sp,2047+128,%o0"); ++# else ++ asm(" ta 0x3 ! ST_FLUSH_WINDOWS"); ++ asm(" retl"); ++ asm(" mov %sp,%o0"); ++# endif ++# ifdef SVR4 ++ asm(" .GC_save_regs_in_stack_end:"); ++ asm(" .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack"); ++# endif ++# ifdef LINT ++ word GC_save_regs_in_stack() { return(0 /* sp really */);} ++# endif ++# endif ++ ++/* GC_clear_stack_inner(arg, limit) clears stack area up to limit and */ ++/* returns arg. Stack clearing is crucial on SPARC, so we supply */ ++/* an assembly version that's more careful. Assumes limit is hotter */ ++/* than sp, and limit is 8 byte aligned. */ ++#if defined(ASM_CLEAR_CODE) ++# ifdef SUNOS4 ++ asm(".globl _GC_clear_stack_inner"); ++ asm("_GC_clear_stack_inner:"); ++# else ++ asm(".globl GC_clear_stack_inner"); ++ asm("GC_clear_stack_inner:"); ++ asm(".type GC_save_regs_in_stack,#function"); ++# endif ++#if defined(__arch64__) || defined(__sparcv9) ++ asm("mov %sp,%o2"); /* Save sp */ ++ asm("add %sp,2047-8,%o3"); /* p = sp+bias-8 */ ++ asm("add %o1,-2047-192,%sp"); /* Move sp out of the way, */ ++ /* so that traps still work. */ ++ /* Includes some extra words */ ++ /* so we can be sloppy below. */ ++ asm("loop:"); ++ asm("stx %g0,[%o3]"); /* *(long *)p = 0 */ ++ asm("cmp %o3,%o1"); ++ asm("bgu,pt %xcc, loop"); /* if (p > limit) goto loop */ ++ asm("add %o3,-8,%o3"); /* p -= 8 (delay slot) */ ++ asm("retl"); ++ asm("mov %o2,%sp"); /* Restore sp., delay slot */ ++#else ++ asm("mov %sp,%o2"); /* Save sp */ ++ asm("add %sp,-8,%o3"); /* p = sp-8 */ ++ asm("clr %g1"); /* [g0,g1] = 0 */ ++ asm("add %o1,-0x60,%sp"); /* Move sp out of the way, */ ++ /* so that traps still work. */ ++ /* Includes some extra words */ ++ /* so we can be sloppy below. */ ++ asm("loop:"); ++ asm("std %g0,[%o3]"); /* *(long long *)p = 0 */ ++ asm("cmp %o3,%o1"); ++ asm("bgu loop "); /* if (p > limit) goto loop */ ++ asm("add %o3,-8,%o3"); /* p -= 8 (delay slot) */ ++ asm("retl"); ++ asm("mov %o2,%sp"); /* Restore sp., delay slot */ ++#endif /* old SPARC */ ++ /* First argument = %o0 = return value */ ++# ifdef SVR4 ++ asm(" .GC_clear_stack_inner_end:"); ++ asm(" .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner"); ++# endif ++#endif diff --git a/dev-lang/mercury/mercury-10.04_beta1.ebuild b/dev-lang/mercury/mercury-10.04_beta1.ebuild index 31574d1abe8b..2aa91c9db3ff 100644 --- a/dev-lang/mercury/mercury-10.04_beta1.ebuild +++ b/dev-lang/mercury/mercury-10.04_beta1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-10.04_beta1.ebuild,v 1.1 2010/02/13 02:50:34 keri Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/mercury/mercury-10.04_beta1.ebuild,v 1.2 2010/02/14 07:24:57 keri Exp $ inherit elisp-common eutils flag-o-matic java-pkg-opt-2 multilib @@ -35,6 +35,7 @@ src_unpack() { unpack ${A} epatch "${FILESDIR}"/${P}-multilib.patch + epatch "${FILESDIR}"/${P}-boehm_gc.patch epatch "${FILESDIR}"/${P}-docs.patch epatch "${FILESDIR}"/${P}-no-reconf.patch |