diff options
author | gahr <gahr@FreeBSD.org> | 2008-03-07 21:25:51 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2008-03-07 21:25:51 +0800 |
commit | c0367cd0e0fdafa094831ea90781c2850c8a3ec7 (patch) | |
tree | cf2d7a80eb8bdf52ec8c5cda6e26f91887b1d322 /lang/guile | |
parent | 1b40def6ee565ed165a441363875efee2c86df34 (diff) | |
download | freebsd-ports-gnome-c0367cd0e0fdafa094831ea90781c2850c8a3ec7.tar.gz freebsd-ports-gnome-c0367cd0e0fdafa094831ea90781c2850c8a3ec7.tar.zst freebsd-ports-gnome-c0367cd0e0fdafa094831ea90781c2850c8a3ec7.zip |
- Fix build on sparc64
Approved by: Maintainer, miwi (mentor)
Diffstat (limited to 'lang/guile')
-rw-r--r-- | lang/guile/Makefile | 6 | ||||
-rw-r--r-- | lang/guile/files/patch-libguile_gc_os_dep.c | 117 |
2 files changed, 109 insertions, 14 deletions
diff --git a/lang/guile/Makefile b/lang/guile/Makefile index c91362ec979c..972f8ee640d7 100644 --- a/lang/guile/Makefile +++ b/lang/guile/Makefile @@ -29,8 +29,9 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ GUILE_VER= 1.8 PLIST_SUB= GUILE_VER=${GUILE_VER} -REINPLACE_FILES= libguile/gc.c libguile/mallocs.c \ - libguile/ports.c libguile/smob.c +REINPLACE_FILES= libguile/smob.c libguile/filesys.c libguile/gc.c \ + libguile/mallocs.c libguile/eval.c libguile/gc-malloc.c \ + libguile/ports.c libguile/gc-mark.c libguile/gc_os_dep.c INFO= goops guile-tut guile r5rs @@ -45,6 +46,5 @@ post-patch: ${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g' ${REINPLACE_FILES} @${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|g ; \ s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/libguile/load.c - @${REINPLACE_CMD} -e 's^sparc-\*-\*^sparc-*-*|sparc64-*-*^' ${WRKSRC}/configure .include <bsd.port.post.mk> diff --git a/lang/guile/files/patch-libguile_gc_os_dep.c b/lang/guile/files/patch-libguile_gc_os_dep.c index 4368fdcab6cc..508f201fe0a7 100644 --- a/lang/guile/files/patch-libguile_gc_os_dep.c +++ b/lang/guile/files/patch-libguile_gc_os_dep.c @@ -1,21 +1,19 @@ ---- libguile/gc_os_dep.c 2008-02-23 18:14:28.087264270 -0600 -+++ libguile/gc_os_dep.c 2008-02-23 18:22:25.194095724 -0600 -@@ -115,6 +115,14 @@ +--- libguile/gc_os_dep.c.orig 2008-02-16 19:50:24.000000000 +0100 ++++ libguile/gc_os_dep.c 2008-03-06 16:21:40.000000000 +0100 +@@ -115,6 +115,12 @@ # define NETBSD # define mach_type_known # endif +# if defined(__FreeBSD__) && defined(__sparc__) ++# define SPARC +# define FREEBSD +# include <machine/frame.h> -+# define ALIGNMENT 8 -+# define CPP_WORDSZ 64 -+# define ALIGN_DOUBLE +# define mach_type_known +# endif # if defined(__NetBSD__) && defined(__powerpc__) # define POWERPC # define NETBSD -@@ -249,7 +257,21 @@ +@@ -249,7 +255,21 @@ # define ARM32 # define mach_type_known # endif @@ -38,7 +36,24 @@ # define ALPHA # if !defined(LINUX) && !defined (NETBSD) # define OSF1 /* a.k.a Digital Unix */ -@@ -1159,6 +1181,13 @@ +@@ -701,8 +721,6 @@ + + # ifdef SPARC + # define MACH_TYPE "SPARC" +-# define ALIGNMENT 4 /* Required by hardware */ +-# define ALIGN_DOUBLE + extern int etext; + # ifdef SUNOS5 + # define OS_TYPE "SUNOS5" +@@ -750,7 +768,6 @@ + # define DYNAMIC_LOADING + # endif + # ifdef DRSNX +-# define CPP_WORDSZ 32 + # define OS_TYPE "DRSNX" + extern char * GC_SysVGetDataStart(); + extern int etext; +@@ -1159,6 +1176,13 @@ # endif # endif @@ -52,16 +67,24 @@ # ifdef IA64 # define MACH_TYPE "IA64" # define ALIGN_DOUBLE -@@ -1504,7 +1533,7 @@ +@@ -1504,8 +1528,15 @@ # include <setjmp.h> #endif -#ifdef FREEBSD +#if defined(FREEBSD) && defined(I386) # include <machine/trap.h> ++# define ALIGNMENT 4 ++# define CPP_WORDSZ 32 ++#endif ++ ++#if defined(FREEBSD) && defined(SPARC) ++# define ALIGNMENT 8 ++# define ALIGN_DOUBLE #endif -@@ -1537,7 +1566,7 @@ + #ifdef AMIGA +@@ -1537,7 +1568,7 @@ #endif #ifdef SUNOS5SIGS @@ -70,4 +93,76 @@ # undef setjmp # undef longjmp # define setjmp(env) sigsetjmp(env, 1) -Only in guile-1.8.4/libguile: gc_os_dep.c.orig +@@ -1716,11 +1747,13 @@ + /* static */ jmp_buf GC_jmp_buf; + + /*ARGSUSED*/ ++#if !(defined(FREEBSD) && defined(SPARC)) + static void GC_fault_handler(sig) + int sig; + { + longjmp(GC_jmp_buf, 1); + } ++#endif + + # ifdef __STDC__ + typedef void (*handler)(int); +@@ -1728,6 +1761,7 @@ + typedef void (*handler)(); + # endif + ++#if !(defined(FREEBSD) && defined(SPARC)) + # if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) + static struct sigaction old_segv_act; + # if defined(_sigargs) || defined(HPUX) /* !Irix6.x */ +@@ -1736,7 +1770,9 @@ + # else + static handler old_segv_handler, old_bus_handler; + # endif ++#endif + ++#if !(defined(FREEBSD) && defined(SPARC)) + static void GC_setup_temporary_fault_handler() + { + # if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) +@@ -1773,7 +1809,9 @@ + # endif + # endif + } ++#endif + ++#if !(defined(FREEBSD) && defined(SPARC)) + static void GC_reset_fault_handler() + { + # if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1) +@@ -1789,8 +1827,10 @@ + # endif + # endif + } ++#endif + + /* Single argument version, robust against whole program analysis. */ ++#if !(defined(FREEBSD) && defined(SPARC)) + static void + GC_noop1(x) + word x; +@@ -1798,9 +1838,11 @@ + static VOLATILE word sink; + sink = x; + } ++#endif + + /* Return the first nonaddressible location > p (up) or */ + /* the smallest location q s.t. [q,p] is addressible (!up). */ ++#if !(defined(FREEBSD) && defined(SPARC)) + static ptr_t GC_find_limit(p, up) + ptr_t p; + GC_bool up; +@@ -1831,6 +1873,7 @@ + } + return(result); + } ++#endif + + # endif + |