- add amd64 support

- add build depend on pkgconfig->=0.19p0

in collaboration with and ok ian@
This commit is contained in:
kurt 2006-05-12 03:01:04 +00:00
parent c5f4fe1b86
commit 562f3f86f6
9 changed files with 228 additions and 43 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.27 2006/04/20 04:42:38 kurt Exp $
# $OpenBSD: Makefile,v 1.28 2006/05/12 03:01:04 kurt Exp $
ONLY_FOR_ARCHS= i386 powerpc
ONLY_FOR_ARCHS= amd64 i386 powerpc
COMMENT= "kaffe.org's Java JDK1.4 compiler, runtime and libs"
DISTNAME= kaffe-1.1.7
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= lang
@ -28,7 +28,8 @@ USE_LIBTOOL= Yes
USE_GMAKE= yes
BUILD_DEPENDS= ::archivers/zip \
:jikes->=1.22p0:lang/jikes
:jikes->=1.22p0:lang/jikes \
:pkgconfig->=0.19p0:devel/pkgconfig
LIB_DEPENDS= gdk-x11-2.0.0.0,gdk_pixbuf-2.0.0.0,gtk-x11-2.0.0.0::x11/gtk+2 \
gmp.4.::devel/gmp \
audiofile::devel/libaudiofile \
@ -47,6 +48,8 @@ SEPARATE_BUILD= concurrent
PREFIX= ${LOCALBASE}/kaffe
CONFIGURE_STYLE=gnu
GNU_ARCH= ${MACHINE_ARCH:S/amd64/x86_64/}
SUBST_VARS= GNU_ARCH
MODGNU_CONFIG_GUESS_DIRS= \
${WRKSRC}/libraries/javalib/external/classpath \

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-config_Makefile_am,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/Makefile.am.orig Sun Apr 30 21:18:26 2006
+++ config/Makefile.am Sun Apr 30 21:15:35 2006
@@ -144,6 +144,9 @@ EXTRA_DIST = \
x86_64/linux/md.c \
x86_64/linux/md.h \
x86_64/linux/sigcontextinfo.h \
+ x86_64/openbsd2/config.frag \
+ x86_64/openbsd2/md.c \
+ x86_64/openbsd2/md.h \
x86_64/threads.h \
x86_64/sysdepCallMethod.h \
i386/atomic.h \

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-config_Makefile_in,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/Makefile.in.orig Sun Apr 30 21:19:20 2006
+++ config/Makefile.in Sun Apr 30 21:17:29 2006
@@ -481,6 +481,9 @@ EXTRA_DIST = \
x86_64/linux/md.c \
x86_64/linux/md.h \
x86_64/linux/sigcontextinfo.h \
+ x86_64/openbsd2/config.frag \
+ x86_64/openbsd2/md.c \
+ x86_64/openbsd2/md.h \
x86_64/threads.h \
x86_64/sysdepCallMethod.h \
i386/atomic.h \
@@ -870,7 +873,7 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/alpha $(distdir)/alpha/freebsd2 $(distdir)/alpha/linux $(distdir)/alpha/netbsd1 $(distdir)/alpha/osf $(distdir)/arm $(distdir)/arm/linux $(distdir)/arm/netbsd1 $(distdir)/arm/riscos $(distdir)/bfin $(distdir)/bfin/uclinux $(distdir)/generic $(distdir)/i386 $(distdir)/i386/beos $(distdir)/i386/bsdi $(distdir)/i386/cygwin32 $(distdir)/i386/darwin $(distdir)/i386/dgux $(distdir)/i386/freebsd2 $(distdir)/i386/gnu $(distdir)/i386/linux $(distdir)/i386/netbsd1 $(distdir)/i386/nextstep3 $(distdir)/i386/openbsd2 $(distdir)/i386/oskit $(distdir)/i386/qnx $(distdir)/i386/sco3.2v5 $(distdir)/i386/solaris2 $(distdir)/i386/univel_svr4 $(distdir)/i386/win32 $(distdir)/ia64 $(distdir)/ia64/freebsd2 $(distdir)/ia64/hpux $(distdir)/ia64/linux $(distdir)/m68k $(distdir)/m68k/a-ux $(distdir)/m68k/amigaos $(distdir)/m68k/linux $(distdir)/m68k/netbsd1 $(distdir)/m68k/nextstep3 $(distdir)/m68k/openbsd2 $(distdir)/m68k/sunos4 $(distdir)/mips $(distdir)/mips/irix5 $(distdir)/mips/linux $(distdir)/mips/netbsd1 $(distdir)/mips/ultrix4 $(distdir)/parisc $(distdir)/parisc/hpux $(distdir)/parisc/linux $(distdir)/powerpc $(distdir)/powerpc/aix $(distdir)/powerpc/bits $(distdir)/powerpc/darwin $(distdir)/powerpc/linux $(distdir)/powerpc/machten $(distdir)/powerpc/netbsd1 $(distdir)/powerpc/openbsd2 $(distdir)/powerpc/powerpc32 $(distdir)/powerpc/powerpc64 $(distdir)/s390 $(distdir)/s390/linux $(distdir)/sh $(distdir)/sh/linux $(distdir)/sparc $(distdir)/sparc/bsdi3 $(distdir)/sparc/linux $(distdir)/sparc/netbsd1 $(distdir)/sparc/nextstep3 $(distdir)/sparc/openbsd2 $(distdir)/sparc/solaris2 $(distdir)/sparc/sunos4 $(distdir)/sparc/uxpds $(distdir)/x86_64 $(distdir)/x86_64/freebsd2 $(distdir)/x86_64/linux
+ $(mkdir_p) $(distdir)/alpha $(distdir)/alpha/freebsd2 $(distdir)/alpha/linux $(distdir)/alpha/netbsd1 $(distdir)/alpha/osf $(distdir)/arm $(distdir)/arm/linux $(distdir)/arm/netbsd1 $(distdir)/arm/riscos $(distdir)/bfin $(distdir)/bfin/uclinux $(distdir)/generic $(distdir)/i386 $(distdir)/i386/beos $(distdir)/i386/bsdi $(distdir)/i386/cygwin32 $(distdir)/i386/darwin $(distdir)/i386/dgux $(distdir)/i386/freebsd2 $(distdir)/i386/gnu $(distdir)/i386/linux $(distdir)/i386/netbsd1 $(distdir)/i386/nextstep3 $(distdir)/i386/openbsd2 $(distdir)/i386/oskit $(distdir)/i386/qnx $(distdir)/i386/sco3.2v5 $(distdir)/i386/solaris2 $(distdir)/i386/univel_svr4 $(distdir)/i386/win32 $(distdir)/ia64 $(distdir)/ia64/freebsd2 $(distdir)/ia64/hpux $(distdir)/ia64/linux $(distdir)/m68k $(distdir)/m68k/a-ux $(distdir)/m68k/amigaos $(distdir)/m68k/linux $(distdir)/m68k/netbsd1 $(distdir)/m68k/nextstep3 $(distdir)/m68k/openbsd2 $(distdir)/m68k/sunos4 $(distdir)/mips $(distdir)/mips/irix5 $(distdir)/mips/linux $(distdir)/mips/netbsd1 $(distdir)/mips/ultrix4 $(distdir)/parisc $(distdir)/parisc/hpux $(distdir)/parisc/linux $(distdir)/powerpc $(distdir)/powerpc/aix $(distdir)/powerpc/bits $(distdir)/powerpc/darwin $(distdir)/powerpc/linux $(distdir)/powerpc/machten $(distdir)/powerpc/netbsd1 $(distdir)/powerpc/openbsd2 $(distdir)/powerpc/powerpc32 $(distdir)/powerpc/powerpc64 $(distdir)/s390 $(distdir)/s390/linux $(distdir)/sh $(distdir)/sh/linux $(distdir)/sparc $(distdir)/sparc/bsdi3 $(distdir)/sparc/linux $(distdir)/sparc/netbsd1 $(distdir)/sparc/nextstep3 $(distdir)/sparc/openbsd2 $(distdir)/sparc/solaris2 $(distdir)/sparc/sunos4 $(distdir)/sparc/uxpds $(distdir)/x86_64 $(distdir)/x86_64/freebsd2 $(distdir)/x86_64/linux $(distdir)/x86_64/openbsd2
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \

View File

@ -0,0 +1,7 @@
$OpenBSD: patch-config_x86_64_openbsd2_config_frag,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/x86_64/openbsd2/config.frag.orig Sun Apr 30 21:08:40 2006
+++ config/x86_64/openbsd2/config.frag Sun Apr 30 21:04:44 2006
@@ -0,0 +1,3 @@
+#
+# amd64/OpenBSD configuration
+#

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-config_x86_64_openbsd2_md_c,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/x86_64/openbsd2/md.c.orig Thu May 4 16:30:44 2006
+++ config/x86_64/openbsd2/md.c Thu May 11 22:38:30 2006
@@ -0,0 +1,48 @@
+/*
+ * amd64/openbsd2/md.c
+ * OpenBSD amd64 specific functions.
+ *
+ * Copyright (c) 2006
+ * Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#include "config.h"
+
+#if defined(KAFFE_SYSTEM_UNIX_PTHREADS)
+
+#include <sys/signal.h>
+#include <pthread.h>
+#include <pthread_np.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void *mdGetStackEnd(void)
+{
+ stack_t stack;
+ if (pthread_stackseg_np(pthread_self(), &stack) != 0)
+ {
+ fprintf(stderr,
+ "Kaffe VM was unable to retrieve the pointer to the stack base\n"
+ "Aborting...\n");
+ exit(1);
+ }
+ return stack.ss_sp;
+}
+
+size_t mdGetStackSize(void)
+{
+ stack_t stack;
+ if (pthread_stackseg_np(pthread_self(), &stack) != 0)
+ {
+ fprintf(stderr,
+ "Kaffe VM has not been able to retrieve the stack size\n"
+ "Aborting...\n");
+ exit(1);
+ }
+ return stack.ss_size;
+}
+
+#endif

View File

@ -0,0 +1,76 @@
$OpenBSD: patch-config_x86_64_openbsd2_md_h,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/x86_64/openbsd2/md.h.orig Sun Apr 30 21:21:52 2006
+++ config/x86_64/openbsd2/md.h Mon May 1 21:41:30 2006
@@ -0,0 +1,72 @@
+/*
+ * amd64/openbsd2/md.h
+ * OpenBSD amd64 configuration information.
+ *
+ * Copyright (c) 2006
+ * Kaffe.org contributors. See ChangeLog for details.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file.
+ */
+
+#ifndef __amd64_openbsd2_md_h
+#define __amd64_openbsd2_md_h
+
+#include "x86_64/common.h"
+#include "x86_64/threads.h"
+
+#if defined(HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#endif
+#if defined(HAVE_SYS_RESOURCE_H)
+#include <sys/resource.h>
+#endif
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#undef SP_OFFSET
+#define SP_OFFSET 2
+#undef FP_OFFSET
+#define FP_OFFSET 3
+
+/* Define signal context macros for xprofiling */
+#define SIGNAL_ARGS(sig, sc) int sig, int __code, struct sigcontext *sc
+#define SIGNAL_CONTEXT_POINTER(scp) struct sigcontext *scp
+#define GET_SIGNAL_CONTEXT_POINTER(sc) (sc)
+#define SIGNAL_PC(scp) (scp)->sc_rip
+#define STACK_POINTER(scp) (scp)->sc_rsp
+
+#if defined(TRANSLATOR)
+#include "jit-md.h"
+#endif
+
+#if defined(KAFFE_SYSTEM_UNIX_PTHREADS)
+
+#define KAFFEMD_STACK_ERROR 0
+#define KAFFEMD_STACK_INFINITE KAFFEMD_STACK_ERROR
+
+#define KAFFEMD_STACKSIZE
+extern size_t mdGetStackSize(void);
+
+/* this is only used for the main thread and is ok for that */
+/* this may change with rthreads when thats done */
+static inline void mdSetStackSize(rlim_t limit)
+{
+ struct rlimit rl;
+
+ getrlimit(RLIMIT_STACK, &rl);
+ rl.rlim_cur = limit;
+ setrlimit(RLIMIT_STACK, &rl);
+}
+
+#define KAFFEMD_STACKEND
+extern void *mdGetStackEnd(void);
+
+#else /* KAFFE_SYSTEM_UNIX_PTHREADS */
+
+#include "kaffe-unix-stack.h"
+
+#endif /* KAFFE_SYSTEM_UNIX_PTHREADS */
+
+#endif

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-config_x86_64_threads_h,v 1.1 2006/05/12 03:01:04 kurt Exp $
--- config/x86_64/threads.h.orig Tue May 2 11:30:55 2006
+++ config/x86_64/threads.h Tue May 2 11:31:02 2006
@@ -16,7 +16,7 @@
* Set a default size for the stack.
*/
#if defined(INTERPRETER)
-#define THREADSTACKSIZE (128 * 1024)
+#define THREADSTACKSIZE (512 * 1024)
#else
#define THREADSTACKSIZE (64 * 1024)
#endif

View File

@ -1,13 +1,13 @@
@comment $OpenBSD: PFRAG.shared,v 1.6 2006/04/11 01:09:44 kurt Exp $
@lib jre/lib/${MACHINE_ARCH}/libgtkpeer.so.${LIBgtkpeer_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libjavaio.so.${LIBjavaio_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libjavalang.so.${LIBjavalang_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libjavanet.so.${LIBjavanet_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libjavanio.so.${LIBjavanio_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libjawtgnu.so.${LIBjawtgnu_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libkaffevm.so.${LIBkaffevm_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libmanagement.so.${LIBmanagement_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libmath.so.${LIBmath_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libsecurity.so.${LIBsecurity_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libtritonusesd.so.${LIBtritonusesd_VERSION}
@lib jre/lib/${MACHINE_ARCH}/libzip.so.${LIBzip_VERSION}
@comment $OpenBSD: PFRAG.shared,v 1.7 2006/05/12 03:01:04 kurt Exp $
@lib jre/lib/${GNU_ARCH}/libgtkpeer.so.${LIBgtkpeer_VERSION}
@lib jre/lib/${GNU_ARCH}/libjavaio.so.${LIBjavaio_VERSION}
@lib jre/lib/${GNU_ARCH}/libjavalang.so.${LIBjavalang_VERSION}
@lib jre/lib/${GNU_ARCH}/libjavanet.so.${LIBjavanet_VERSION}
@lib jre/lib/${GNU_ARCH}/libjavanio.so.${LIBjavanio_VERSION}
@lib jre/lib/${GNU_ARCH}/libjawtgnu.so.${LIBjawtgnu_VERSION}
@lib jre/lib/${GNU_ARCH}/libkaffevm.so.${LIBkaffevm_VERSION}
@lib jre/lib/${GNU_ARCH}/libmanagement.so.${LIBmanagement_VERSION}
@lib jre/lib/${GNU_ARCH}/libmath.so.${LIBmath_VERSION}
@lib jre/lib/${GNU_ARCH}/libsecurity.so.${LIBsecurity_VERSION}
@lib jre/lib/${GNU_ARCH}/libtritonusesd.so.${LIBtritonusesd_VERSION}
@lib jre/lib/${GNU_ARCH}/libzip.so.${LIBzip_VERSION}

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.11 2006/04/11 01:09:44 kurt Exp $
@comment $OpenBSD: PLIST,v 1.12 2006/05/12 03:01:04 kurt Exp $
%%SHARED%%
bin/
bin/appletviewer
@ -48,31 +48,31 @@ jre/bin/rmiregistry
jre/lib/
jre/lib/glibj.zip
jre/lib/gmpjavamath.jar
jre/lib/${MACHINE_ARCH}/
jre/lib/${MACHINE_ARCH}/libgtkpeer.a
jre/lib/${MACHINE_ARCH}/libgtkpeer.la
jre/lib/${MACHINE_ARCH}/libjavaio.a
jre/lib/${MACHINE_ARCH}/libjavaio.la
jre/lib/${MACHINE_ARCH}/libjavalang.a
jre/lib/${MACHINE_ARCH}/libjavalang.la
jre/lib/${MACHINE_ARCH}/libjavanet.a
jre/lib/${MACHINE_ARCH}/libjavanet.la
jre/lib/${MACHINE_ARCH}/libjavanio.a
jre/lib/${MACHINE_ARCH}/libjavanio.la
jre/lib/${MACHINE_ARCH}/libjawtgnu.a
jre/lib/${MACHINE_ARCH}/libjawtgnu.la
jre/lib/${MACHINE_ARCH}/libkaffevm.a
jre/lib/${MACHINE_ARCH}/libkaffevm.la
jre/lib/${MACHINE_ARCH}/libmanagement.a
jre/lib/${MACHINE_ARCH}/libmanagement.la
jre/lib/${MACHINE_ARCH}/libmath.a
jre/lib/${MACHINE_ARCH}/libmath.la
jre/lib/${MACHINE_ARCH}/libsecurity.a
jre/lib/${MACHINE_ARCH}/libsecurity.la
jre/lib/${MACHINE_ARCH}/libtritonusesd.a
jre/lib/${MACHINE_ARCH}/libtritonusesd.la
jre/lib/${MACHINE_ARCH}/libzip.a
jre/lib/${MACHINE_ARCH}/libzip.la
jre/lib/${GNU_ARCH}/
jre/lib/${GNU_ARCH}/libgtkpeer.a
jre/lib/${GNU_ARCH}/libgtkpeer.la
jre/lib/${GNU_ARCH}/libjavaio.a
jre/lib/${GNU_ARCH}/libjavaio.la
jre/lib/${GNU_ARCH}/libjavalang.a
jre/lib/${GNU_ARCH}/libjavalang.la
jre/lib/${GNU_ARCH}/libjavanet.a
jre/lib/${GNU_ARCH}/libjavanet.la
jre/lib/${GNU_ARCH}/libjavanio.a
jre/lib/${GNU_ARCH}/libjavanio.la
jre/lib/${GNU_ARCH}/libjawtgnu.a
jre/lib/${GNU_ARCH}/libjawtgnu.la
jre/lib/${GNU_ARCH}/libkaffevm.a
jre/lib/${GNU_ARCH}/libkaffevm.la
jre/lib/${GNU_ARCH}/libmanagement.a
jre/lib/${GNU_ARCH}/libmanagement.la
jre/lib/${GNU_ARCH}/libmath.a
jre/lib/${GNU_ARCH}/libmath.la
jre/lib/${GNU_ARCH}/libsecurity.a
jre/lib/${GNU_ARCH}/libsecurity.la
jre/lib/${GNU_ARCH}/libtritonusesd.a
jre/lib/${GNU_ARCH}/libtritonusesd.la
jre/lib/${GNU_ARCH}/libzip.a
jre/lib/${GNU_ARCH}/libzip.la
jre/lib/logging.properties
jre/lib/security/
jre/lib/security/Kaffe.security