aboutsummaryrefslogtreecommitdiffstats
path: root/java/openjit
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2003-10-17 14:35:54 +0800
committerglewis <glewis@FreeBSD.org>2003-10-17 14:35:54 +0800
commit2ad10bcd1cfc6dedb2a8690bb780016749c86868 (patch)
tree7ce88ad47098224dbb4ff672522d0911503d76c4 /java/openjit
parent7e33b28f80e73724a4f239d7a773f04e27655f2e (diff)
downloadfreebsd-ports-gnome-2ad10bcd1cfc6dedb2a8690bb780016749c86868.tar.gz
freebsd-ports-gnome-2ad10bcd1cfc6dedb2a8690bb780016749c86868.tar.zst
freebsd-ports-gnome-2ad10bcd1cfc6dedb2a8690bb780016749c86868.zip
. Update to 1.1.16.
. Allow build with any native JDK, not just 1.1.8. The default is the Diablo Caffe JDK. This part should be revisited once bsd.java.mk 2.0 hits the scene. One could also consider doing it so it could install for all the native JDKs, not just one at a time. . Fix build on 5.x. . Respect NOPORTDOCS.
Diffstat (limited to 'java/openjit')
-rw-r--r--java/openjit/Makefile52
-rw-r--r--java/openjit/distinfo2
-rw-r--r--java/openjit/files/patch-aa21
-rw-r--r--java/openjit/files/patch-ac48
-rw-r--r--java/openjit/files/patch-rt-X86.c263
-rw-r--r--java/openjit/pkg-plist38
6 files changed, 339 insertions, 85 deletions
diff --git a/java/openjit/Makefile b/java/openjit/Makefile
index 234615eb3fe1..1c48015bedd3 100644
--- a/java/openjit/Makefile
+++ b/java/openjit/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= openjit
-PORTVERSION= 1.1.15
+PORTVERSION= 1.1.16
CATEGORIES= java
MASTER_SITES= http://www.openjit.org/dist/
DISTNAME= OpenJIT-${PORTVERSION}
@@ -14,40 +14,56 @@ DISTNAME= OpenJIT-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= A high-performance reflective Java Just-In-Time (JIT) bytecode compiler
-BUILD_DEPENDS= ${JAVADIR}/bin/java:${PORTSDIR}/java/jdk11
+# Only native JDKs are allowed. Default is java/diablo-jdk13
+.if defined(WITH_JDK13)
+JAVA_HOME= ${PREFIX}/jdk1.3.1
+BUILD_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/jdk13
+.elif defined(WITH_JDK12)
+JAVA_HOME= ${PREFIX}/jdk1.2.2
+BUILD_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/jdk12
+.elif defined(WITH_JDK11)
+JAVA_HOME= ${PREFIX}/jdk1.1.8
+BUILD_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/jdk11
+.else
+JAVA_HOME= ${PREFIX}/diablo-jdk1.3.1
+BUILD_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/diablo-jdk13
+.endif
ONLY_FOR_ARCHS= i386
USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-jdk=${JAVADIR}
+CONFIGURE_ARGS+= --with-jdk=${JAVA_HOME}
-ALL_TARGET= OpenJIT.jar
+CPIO?= /usr/bin/cpio
-JAVADIR= ${LOCALBASE}/jdk1.1.8
+.if defined(WITH_JDK11)
JAVALIBDIR= ${PREFIX}/lib/OpenJIT
-DOCDIR= ${PREFIX}/share/OpenJIT
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 501000
-BROKEN= "Does not compile"
.endif
post-configure:
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/INSTALL
do-install:
+.if defined(WITH_JDK11)
@${MKDIR} ${JAVALIBDIR}
- @${INSTALL_PROGRAM} ${WRKSRC}/libOpenJIT.so ${JAVALIBDIR}
+ @${INSTALL_DATA} ${WRKSRC}/libOpenJIT.so ${JAVALIBDIR}
@${INSTALL_DATA} ${WRKSRC}/OpenJIT.jar ${JAVALIBDIR}
-
-post-install:
- @${MKDIR} ${DOCDIR}
- @${INSTALL_MAN} ${WRKSRC}/INSTALL ${DOCDIR}/README
+.else
+ @${MKDIR} ${JAVA_HOME}/jre/classes
+ @${INSTALL_DATA} ${WRKSRC}/libOpenJIT.so ${JAVA_HOME}/jre/lib/i386
+ @cd ${WRKSRC} && ${FIND} org -name '*.class' \
+ | ${CPIO} -pdmu -R ${LIBOWN}:${LIBGRP} ${JAVA_HOME}/jre/classes
+ @${FIND} ${JAVA_HOME}/jre/classes -type d | ${XARGS} ${CHMOD} a+rx
+.endif
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/README
+ @${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}/INSTALL
@${ECHO_MSG} ""
- @${ECHO_MSG} "See ${DOCDIR}/README for usage instructions."
+ @${ECHO_MSG} "See ${DOCSDIR}/INSTALL for usage instructions."
@${ECHO_MSG} ""
+.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/java/openjit/distinfo b/java/openjit/distinfo
index 46e698b2d2d0..56236dc83e16 100644
--- a/java/openjit/distinfo
+++ b/java/openjit/distinfo
@@ -1 +1 @@
-MD5 (OpenJIT-1.1.15.tar.gz) = 249fda720491d62ac2c6188ad1caad55
+MD5 (OpenJIT-1.1.16.tar.gz) = a22b4144c2e56fa2ea4afd67c1196d30
diff --git a/java/openjit/files/patch-aa b/java/openjit/files/patch-aa
index 066a903d9c96..a7bfb473b2e7 100644
--- a/java/openjit/files/patch-aa
+++ b/java/openjit/files/patch-aa
@@ -1,17 +1,12 @@
---- Makefile.in.orig Tue Sep 26 10:43:57 2000
-+++ Makefile.in Tue Sep 26 15:34:34 2000
-@@ -112,12 +112,12 @@
+$FreeBSD$
+
+--- Makefile.in.orig Thu Sep 6 18:01:03 2001
++++ Makefile.in Thu Oct 16 19:34:18 2003
+@@ -117,7 +117,7 @@
+ library: debug optimized OpenJIT.jar
- .PHONY: all optimized debug clean
-
--all: debug optimized
-+all: optimized
-
- library: debug optimized
-
--OpenJIT.jar: org/OpenJIT/*.class
+ OpenJIT.jar: debug optimized
- jar cvf OpenJIT.jar org/OpenJIT/*.class
-+OpenJIT.jar: all
+ $(JAVA_HOME)/bin/jar cvf OpenJIT.jar org/OpenJIT/*.class
CC = @CC@
@@ -24,4 +19,4 @@
+CFLAGS_OPT = -Wall @CFLAGS@
CFLAGS_DBG = -g
CFLAGS = $(CFLAGS_$(VARIANT)) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
- INCLUDES = -I@JDK_INCLUDE@ -I@JDK_INCLUDE@/$(PLATFORM) -I./CClassHeaders
+ INCLUDES = -I@JDK_INCLUDE@ -I@JDK_INCLUDE@/$(PLATFORM) -I@JDK_INCLUDE_OLD@ -I@JDK_INCLUDE_OLD@/$(PLATFORM) -I./CClassHeaders
diff --git a/java/openjit/files/patch-ac b/java/openjit/files/patch-ac
deleted file mode 100644
index 22401114c810..000000000000
--- a/java/openjit/files/patch-ac
+++ /dev/null
@@ -1,48 +0,0 @@
---- INSTALL.orig Tue Dec 21 05:10:46 1999
-+++ INSTALL Tue Sep 26 15:58:13 2000
-@@ -2,39 +2,17 @@
-
- A Reflective JIT Compiler for Java
-
--REQUIREMENTS
--============
--OpenJIT requires a running port of the JDK 1.1.x or 1.2.x on Solaris,
--Linux or FreeBSD platform. Please download JDK 1.1.x or later and
--install it on your system. The current version of OpenJIT was tested
--on the following JDK packages:
--
-- * Solaris (SPARC) JDK1.1.8 and JDK1.2.2
-- downloaded from http://java.sun.com/jdk/
-- * Linux (x86) JDK1.1.7 and JDK1.2.2
-- downloaded from http://www.blackdown.org/
-- * FreeBSD (x86) JDK1.1.8
-- downloaded from http://www.freebsd.org/java/
--
--And to build OpenJIT will require the GNU C Compiler (version 2.7.2.3
--or egcs-1.1.2, or later)
--
--
--BUILDING AND INSTALLATION
--=========================
--To install the OpenJIT into JDK, perform the following steps in your
--shell:
--
-- $ ./configure --with-jdk=/path/to/jdk
-- $ make
-- $ make install
--
--
- HOW TO RUN
- ==========
- You may either specify the compiler to the JVM on the command line, or
- you may set an environment variable that will let the JVM find the
- compiler.
-+
-+In both cases first you should set LD_LIBRARY_PATH and CLASSPATH enviropment
-+variables as follows:
-+
-+ $ export LD_LIBRARY_PATH=%%PREFIX%%/lib/OpenJIT
-+ $ export CLASSPATH=%%PREFIX%%/lib/OpenJIT/OpenJIT.jar
-
- For the command line option, run Java using option "-Djava.compiler=",
- like this example:
diff --git a/java/openjit/files/patch-rt-X86.c b/java/openjit/files/patch-rt-X86.c
new file mode 100644
index 000000000000..7da35fc10daf
--- /dev/null
+++ b/java/openjit/files/patch-rt-X86.c
@@ -0,0 +1,263 @@
+$FreeBSD$
+
+--- rt-X86.c.orig Thu Oct 16 20:16:17 2003
++++ rt-X86.c Thu Oct 16 20:22:19 2003
+@@ -127,14 +127,14 @@
+ #define ASM __asm__ volatile
+
+ #ifdef SYM_UNDERSCORE
+-__asm__("
+-_OpenJIT_f2i = OpenJIT_f2i
+-_OpenJIT_d2i = OpenJIT_f2i
+-_OpenJIT_f2l = OpenJIT_f2l
+-_OpenJIT_d2l = OpenJIT_d2l
+-_OpenJIT_invokeinterface_quick = OpenJIT_invokeinterface_quick
+-_throw_internal = throw_internal
+-");
++__asm__(
++"_OpenJIT_f2i = OpenJIT_f2i\n"
++"_OpenJIT_d2i = OpenJIT_f2i\n"
++"_OpenJIT_f2l = OpenJIT_f2l\n"
++"_OpenJIT_d2l = OpenJIT_d2l\n"
++"_OpenJIT_invokeinterface_quick = OpenJIT_invokeinterface_quick\n"
++"_throw_internal = throw_internal\n"
++);
+ #define ASM_TEXT_LABEL(X) __asm__(".text\n_" #X ":\n");
+ #else
+ #define ASM_TEXT_LABEL(X) __asm__(".text\n" #X ":\n");
+@@ -2051,107 +2051,107 @@
+ extern int OpenJIT_d2i(); /* One arg is passed via floating ST(0) */
+ extern int64_t OpenJIT_f2l(float f);
+ extern int64_t OpenJIT_d2l(double d);
+-__asm__("
+-OpenJIT_d2i = OpenJIT_f2i
+-.text
+- .align 4
+- .type OpenJIT_f2i,@function
+-OpenJIT_f2i:
+- pushl %ebp
+- movl %esp,%ebp
+- subl $8,%esp
+- ftst
+- fnstcw -4(%ebp)
+- movl -4(%ebp),%eax
+- movb $0xc,%ah
+- movw %ax,-2(%ebp)
+- fldcw -2(%ebp)
+- fistpl -8(%ebp)
+- fldcw -4(%ebp)
+- movl -8(%ebp),%eax
+- cmp $0x80000000,%eax
+- je IntOverFlow
+- leave
+- ret
+-
+-IntOverFlow:
+- fnstsw
+- sahf
+- jp IntNaN
+- movl $0x80000000,%eax
+- adcl $-1,%eax
+- leave
+- ret
+-IntNaN:
+- xorl %eax,%eax
+- leave
+- ret
+-
+-.text
+- .align 4
+- .type OpenJIT_f2l,@function
+-OpenJIT_f2l:
+- pushl %ebp
+- movl %esp,%ebp
+- subl $12,%esp
+- flds 8(%ebp)
+- ftst
+- fnstcw -4(%ebp)
+- movl -4(%ebp),%eax
+- movb $0xc,%ah
+- movw %ax,-2(%ebp)
+- fldcw -2(%ebp)
+- fistpll -12(%ebp)
+- fldcw -4(%ebp)
+- movl -12(%ebp),%eax
+- movl $0x80000000,%ecx
+- movl -8(%ebp),%edx
+- xorl %edx,%ecx
+- orl %eax,%ecx
+- je LongOverFlow
+- leave
+- ret
+-
+- .align 4
+- .type OpenJIT_d2l,@function
+-OpenJIT_d2l:
+- pushl %ebp
+- movl %esp,%ebp
+- subl $12,%esp
+- fldl 8(%ebp)
+- ftst
+- fnstcw -4(%ebp)
+- movl -4(%ebp),%eax
+- movb $0xc,%ah
+- movw %ax,-2(%ebp)
+- fldcw -2(%ebp)
+- fistpll -12(%ebp)
+- fldcw -4(%ebp)
+- movl -12(%ebp),%eax
+- movl $0x80000000,%ecx
+- movl -8(%ebp),%edx
+- xorl %edx,%ecx
+- orl %eax,%ecx
+- je LongOverFlow
+- leave
+- ret
+-
+-LongOverFlow:
+- fnstsw
+- sahf
+- jp LongNaN
+- movl $0,%eax
+- adcl $-1,%eax
+- adcl $-1,%edx
+- leave
+- ret
+-
+-LongNaN:
+- xorl %eax,%eax
+- xorl %edx,%edx
+- leave
+- ret
+-");
++__asm__(
++"OpenJIT_d2i = OpenJIT_f2i\n"
++".text\n"
++" .align 4\n"
++" .type OpenJIT_f2i,@function\n"
++"OpenJIT_f2i:\n"
++" pushl %ebp\n"
++" movl %esp,%ebp\n"
++" subl $8,%esp\n"
++" ftst\n"
++" fnstcw -4(%ebp)\n"
++" movl -4(%ebp),%eax\n"
++" movb $0xc,%ah\n"
++" movw %ax,-2(%ebp)\n"
++" fldcw -2(%ebp)\n"
++" fistpl -8(%ebp)\n"
++" fldcw -4(%ebp)\n"
++" movl -8(%ebp),%eax\n"
++" cmp $0x80000000,%eax\n"
++" je IntOverFlow\n"
++" leave\n"
++" ret\n"
++"\n"
++"IntOverFlow:\n"
++" fnstsw\n"
++" sahf\n"
++" jp IntNaN\n"
++" movl $0x80000000,%eax\n"
++" adcl $-1,%eax\n"
++" leave\n"
++" ret\n"
++"IntNaN:\n"
++" xorl %eax,%eax\n"
++" leave\n"
++" ret\n"
++"\n"
++".text\n"
++" .align 4\n"
++" .type OpenJIT_f2l,@function\n"
++"OpenJIT_f2l:\n"
++" pushl %ebp\n"
++" movl %esp,%ebp\n"
++" subl $12,%esp\n"
++" flds 8(%ebp)\n"
++" ftst\n"
++" fnstcw -4(%ebp)\n"
++" movl -4(%ebp),%eax\n"
++" movb $0xc,%ah\n"
++" movw %ax,-2(%ebp)\n"
++" fldcw -2(%ebp)\n"
++" fistpll -12(%ebp)\n"
++" fldcw -4(%ebp)\n"
++" movl -12(%ebp),%eax\n"
++" movl $0x80000000,%ecx\n"
++" movl -8(%ebp),%edx\n"
++" xorl %edx,%ecx\n"
++" orl %eax,%ecx\n"
++" je LongOverFlow\n"
++" leave\n"
++" ret\n"
++"\n"
++" .align 4\n"
++" .type OpenJIT_d2l,@function\n"
++"OpenJIT_d2l:\n"
++" pushl %ebp\n"
++" movl %esp,%ebp\n"
++" subl $12,%esp\n"
++" fldl 8(%ebp)\n"
++" ftst\n"
++" fnstcw -4(%ebp)\n"
++" movl -4(%ebp),%eax\n"
++" movb $0xc,%ah\n"
++" movw %ax,-2(%ebp)\n"
++" fldcw -2(%ebp)\n"
++" fistpll -12(%ebp)\n"
++" fldcw -4(%ebp)\n"
++" movl -12(%ebp),%eax\n"
++" movl $0x80000000,%ecx\n"
++" movl -8(%ebp),%edx\n"
++" xorl %edx,%ecx\n"
++" orl %eax,%ecx\n"
++" je LongOverFlow\n"
++" leave\n"
++" ret\n"
++"\n"
++"LongOverFlow:\n"
++" fnstsw\n"
++" sahf\n"
++" jp LongNaN\n"
++" movl $0,%eax\n"
++" adcl $-1,%eax\n"
++" adcl $-1,%edx\n"
++" leave\n"
++" ret\n"
++"\n"
++"LongNaN:\n"
++" xorl %eax,%eax\n"
++" xorl %edx,%edx\n"
++" leave\n"
++" ret\n"
++);
+
+ static int64_t
+ OpenJIT_lshr(int64_t ll, unsigned b)
+@@ -2383,16 +2383,16 @@
+ }
+
+ extern void throw_internal();
+-__asm__("
+-.text
+- .align 4
+- .type throw_internal,@function
+-throw_internal:
+- pushl %eax
+- jmp *%edx
+-.Lfe_throw_internal:
+- .size throw_internal,.Lfe_throw_internal-throw_internal
+-");
++__asm__(
++".text\n"
++" .align 4\n"
++" .type throw_internal,@function\n"
++"throw_internal:\n"
++" pushl %eax\n"
++" jmp *%edx\n"
++".Lfe_throw_internal:\n"
++" .size throw_internal,.Lfe_throw_internal-throw_internal\n"
++);
+
+ #if defined(__linux__)
+ static int signal_nest_count = -1;
diff --git a/java/openjit/pkg-plist b/java/openjit/pkg-plist
index f33acb0678ea..27cc96c99ebc 100644
--- a/java/openjit/pkg-plist
+++ b/java/openjit/pkg-plist
@@ -1,5 +1,33 @@
-lib/OpenJIT/OpenJIT.jar
-lib/OpenJIT/libOpenJIT.so
-share/OpenJIT/README
-@dirrm share/OpenJIT
-@dirrm lib/OpenJIT
+%%JAVA11:%%lib/OpenJIT/OpenJIT.jar
+%%JAVA11:%%lib/OpenJIT/libOpenJIT.so
+%%JAVA2:%%%%JAVADIR%%/jre/lib/i386/libOpenJIT.so
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/BCinfo.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/Compile.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/CompilerError.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/Constants.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/ConvertRTL.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/Debug.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/ExceptionHandler.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/ILnode.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/InlineInfo.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/LinkageInfo.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/LinkedList.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/OpenJITLoader.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/OptimizeRTL.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/PCList.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/PCReloc.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/ParseBytecode.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/Select.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/SubrNode.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/SubrNodeList.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/Var.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/X86.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/X86code.class
+%%JAVA2:%%%%JAVADIR%%/jre/classes/org/OpenJIT/X86reg.class
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%JAVA11:%%@dirrm lib/OpenJIT
+%%JAVA2:%%@dirrm %%JAVADIR%%/jre/classes/org/OpenJIT
+%%JAVA2:%%@dirrm %%JAVADIR%%/jre/classes/org
+%%JAVA2:%%@dirrm %%JAVADIR%%/jre/classes