r1858 - in trunk/cacao/debian: . patches
Stephan Michels
tashiro-guest at costa.debian.org
Thu Feb 2 06:51:07 UTC 2006
Author: tashiro-guest
Date: 2006-02-02 06:51:06 +0000 (Thu, 02 Feb 2006)
New Revision: 1858
Added:
trunk/cacao/debian/patches/
trunk/cacao/debian/patches/01cacao-fpu-prec.patch
Modified:
trunk/cacao/debian/changelog
trunk/cacao/debian/control
trunk/cacao/debian/rules
Log:
* debian/patches/01cacao-fpu-prec.patch: Add patch to fix incorrect
results of computations in extended precision on x86.
Closes: #350729
* debian/rules: Using the CDBS scripts.
Modified: trunk/cacao/debian/changelog
===================================================================
--- trunk/cacao/debian/changelog 2006-02-01 20:55:49 UTC (rev 1857)
+++ trunk/cacao/debian/changelog 2006-02-02 06:51:06 UTC (rev 1858)
@@ -1,3 +1,12 @@
+cacao (0.94-2) unstable; urgency=low
+
+ * debian/patches/01cacao-fpu-prec.patch: Add patch to fix incorrect
+ results of computations in extended precision on x86.
+ Closes: #350729
+ * debian/rules: Using the CDBS scripts.
+
+ -- Stephan Michels <stephan at apache.org> Wed, 1 Feb 2006 23:43:13 +0100
+
cacao (0.94-1) unstable; urgency=low
[ Michael Koch ]
Modified: trunk/cacao/debian/control
===================================================================
--- trunk/cacao/debian/control 2006-02-01 20:55:49 UTC (rev 1857)
+++ trunk/cacao/debian/control 2006-02-02 06:51:06 UTC (rev 1858)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: Stephan Michels <stephan at apache.org>, Michael Koch <konqueror at gmx.de>
-Build-Depends: debhelper (>= 4.0.0), classpath (>= 0.19), classpath-common (>= 0.19), gcj, jikes-classpath, zlib1g-dev, binutils-dev, libltdl3-dev, zip
+Build-Depends: debhelper (>= 4.0.0), classpath (>= 0.19), classpath-common (>= 0.19), gcj, jikes-classpath, zlib1g-dev, binutils-dev, libltdl3-dev, zip, cdbs (>= 0.4.17)
Standards-Version: 3.6.2
Package: cacao
Added: trunk/cacao/debian/patches/01cacao-fpu-prec.patch
===================================================================
--- trunk/cacao/debian/patches/01cacao-fpu-prec.patch 2006-02-01 20:55:49 UTC (rev 1857)
+++ trunk/cacao/debian/patches/01cacao-fpu-prec.patch 2006-02-02 06:51:06 UTC (rev 1858)
@@ -0,0 +1,230 @@
+Index: src/vm/jit/i386/md.c
+===================================================================
+--- src/vm/jit/i386/md.c (revision 4390)
++++ src/vm/jit/i386/md.c (working copy)
+@@ -37,6 +37,7 @@
+ #include "vm/types.h"
+
+ #include "vm/global.h"
++#include "vm/jit/asmpart.h"
+ #include "vm/jit/codegen-common.h"
+
+
+@@ -48,7 +49,7 @@
+
+ void md_init(void)
+ {
+- /* nothing to do */
++ (void) asm_md_init();
+ }
+
+
+Index: src/vm/jit/i386/asmpart.S
+===================================================================
+--- src/vm/jit/i386/asmpart.S (revision 4390)
++++ src/vm/jit/i386/asmpart.S (working copy)
+@@ -50,6 +50,8 @@
+
+ /* exported functions and variables *******************************************/
+
++ .globl asm_md_init
++
+ .globl asm_calljavafunction
+ .globl asm_calljavafunction_int
+
+@@ -77,6 +79,33 @@
+ .globl asm_getclassvalues_atomic
+
+
++/* asm_md_init *****************************************************************
++
++ Initialize machine dependent stuff.
++
++ See: http://www.srware.com/linux_numerics.txt
++
++ This puts the X86 FPU in 64-bit precision mode. The default under
++ Linux is to use 80-bit mode, which produces subtle differences from
++ FreeBSD and other systems, eg, (int)(1000*atof("0.3")) is 300 in
++ 64-bit mode, 299 in 80-bit mode.
++
++ Fixes: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=350729
++
++*******************************************************************************/
++
++asm_md_init:
++ sub $4,sp /* allocate space for the FPU state */
++ fnstcw (sp) /* get the FPU state */
++ mov (sp),%eax
++ and $0xfcff,%ax /* remove the extended mode flag */
++ or $0x0200,%ax /* put the double mode flag */
++ mov %eax,(sp) /* store new FPU state */
++ fldcw (sp) /* setup new FPU state */
++ add $4,sp
++ ret
++
++
+ /********************* function asm_calljavafunction ***************************
+ * *
+ * This function calls a Java-method (which possibly needs compilation) *
+Index: src/vm/jit/asmpart.h
+===================================================================
+--- src/vm/jit/asmpart.h (revision 4390)
++++ src/vm/jit/asmpart.h (working copy)
+@@ -224,14 +224,12 @@ struct castinfo {
+ };
+
+
+-#if defined(__ALPHA__)
+-/*
+- determines if the byte support instruction set (21164a and higher)
+- is available.
+-*/
+-int has_no_x_instr_set(void);
++/* function prototypes ********************************************************/
++
++/* machine dependent initialization */
++s4 asm_md_init(void);
++
+ void asm_sync_instruction_cache(void);
+-#endif
+
+
+ /*
+Index: src/vm/options.h
+===================================================================
+--- src/vm/options.h (revision 4390)
++++ src/vm/options.h (working copy)
+@@ -118,8 +118,6 @@ extern bool makeinitializations;
+ extern bool getloadingtime;
+ extern bool getcompilingtime;
+
+-extern int has_ext_instr_set;
+-
+ extern bool opt_stat;
+ extern bool opt_verify;
+ extern bool opt_eager;
+Index: src/vm/options.c
+===================================================================
+--- src/vm/options.c (revision 4390)
++++ src/vm/options.c (working copy)
+@@ -104,8 +104,6 @@ bool makeinitializations = true;
+ bool getloadingtime = false; /* to measure the runtime */
+ bool getcompilingtime = false; /* compute compile time */
+
+-int has_ext_instr_set = 0; /* has instruction set extensions */
+-
+ bool opt_stat = false;
+ bool opt_verify = true; /* true if classfiles should be verified */
+ bool opt_eager = false;
+Index: src/vm/jit/jit.c
+===================================================================
+--- src/vm/jit/jit.c (revision 4390)
++++ src/vm/jit/jit.c (working copy)
+@@ -1203,10 +1203,6 @@ void jit_init(void)
+ {
+ s4 i;
+
+-#if defined(__ALPHA__)
+- has_ext_instr_set = ! has_no_x_instr_set();
+-#endif
+-
+ for (i = 0; i < 256; i++)
+ stackreq[i] = 1;
+
+Index: src/vm/jit/alpha/asmpart.S
+===================================================================
+--- src/vm/jit/alpha/asmpart.S (revision 4390)
++++ src/vm/jit/alpha/asmpart.S (working copy)
+@@ -52,8 +52,9 @@
+
+ /********************* exported functions and variables ***********************/
+
++ .globl asm_md_init
++
+ .globl asm_sync_instruction_cache
+- .globl has_no_x_instr_set
+
+ .globl asm_calljavafunction
+ .globl asm_calljavafunction_int
+@@ -91,20 +92,24 @@ asm_sync_instruction_cache:
+
+ .end asm_sync_instruction_cache
+
+-/*********************** function has_no_x_instr_set ***************************
+-* *
+-* determines if the byte support instruction set (21164a and higher) *
+-* is available. *
+-* *
++
++/* asm_md_init *****************************************************************
++
++ Initialize machine dependent stuff.
++
++ Determines if the byte support instruction set (21164a and higher)
++ is available.
++
+ *******************************************************************************/
+
+- .ent has_no_x_instr_set
+-has_no_x_instr_set:
++ .ent asm_md_init
++
++asm_md_init:
+
+- .long 0x47e03c20 /* amask 1,v0 */
+- jmp zero,(ra) /* return */
++ .long 0x47e03c20 /* amask 1,v0 */
++ jmp zero,(ra) /* return */
+
+- .end has_no_x_instr_set
++ .end asm_md_init
+
+
+ /********************* function asm_calljavafunction ***************************
+Index: src/vm/jit/alpha/md.h
+===================================================================
+--- src/vm/jit/alpha/md.h (revision 4390)
++++ src/vm/jit/alpha/md.h (working copy)
+@@ -36,6 +36,14 @@
+ #ifndef _MD_H
+ #define _MD_H
+
++#include "config.h"
++#include "vm/global.h"
++
++
++/* global variables ***********************************************************/
++
++extern bool has_ext_instr_set;
++
+ /* function prototypes ********************************************************/
+
+ #endif /* _MD_H_ */
+Index: src/vm/jit/alpha/md.c
+===================================================================
+--- src/vm/jit/alpha/md.c (revision 4390)
++++ src/vm/jit/alpha/md.c (working copy)
+@@ -57,6 +57,11 @@ extern void ieee_set_fp_control(unsigned
+ #include "vm/jit/stacktrace.h"
+
+
++/* global variables ***********************************************************/
++
++bool has_ext_instr_set = false; /* has instruction set extensions */
++
++
+ /* md_init *********************************************************************
+
+ Do some machine dependent initialization.
+@@ -65,7 +70,9 @@ extern void ieee_set_fp_control(unsigned
+
+ void md_init(void)
+ {
+- /* XXX TWISTI: do we really need this? fptest's seem to work fine */
++ /* check for extended instruction set */
++
++ has_ext_instr_set = !asm_md_init();
+
+ #if defined(__LINUX__)
+ /* Linux on Digital Alpha needs an initialisation of the ieee
+
Modified: trunk/cacao/debian/rules
===================================================================
--- trunk/cacao/debian/rules 2006-02-01 20:55:49 UTC (rev 1857)
+++ trunk/cacao/debian/rules 2006-02-02 06:51:06 UTC (rev 1858)
@@ -1,93 +1,21 @@
#!/usr/bin/make -f
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+DEB_CONFIGURE_EXTRA_FLAGS := --with-classpath-prefix=/usr
+DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="$(LDFLAGS) -Wl,-z,defs" \
+ JAVAC="jikes-classpath"
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-
-config.status: configure
- dh_testdir
- LDFLAGS="$(LDFLAGS) -Wl,-z,defs" \
- JAVAC="jikes-classpath" \
- ./configure \
- --host=$(DEB_HOST_GNU_TYPE) \
- --build=$(DEB_BUILD_GNU_TYPE) \
- --prefix=/usr \
- --mandir=\$${prefix}/share/man \
- --infodir=\$${prefix}/share/info \
- --with-classpath-prefix=/usr
-
-
-build: build-stamp
-
-build-stamp: config.status
- dh_testdir
-
- $(MAKE)
-
- touch build-stamp
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- -$(MAKE) distclean
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- $(MAKE) install DESTDIR=$(CURDIR)/debian/cacao
-
+binary-predeb/cacao::
# Remove files, which conflicts with other programs
rm $(CURDIR)/debian/cacao/usr/bin/rmiregistry
rm $(CURDIR)/debian/cacao/usr/bin/java
# Remove unecessary directories
rm -rf $(CURDIR)/debian/cacao/usr/include
- rm -rf $(CURDIR)/debian/cacao/usr/lib
# Install lintian overrides
- cp debian/cacao.lintian-overrides debian/cacao/usr/share/lintian/overrides/cacao
-
-binary-indep: build install
-
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs ChangeLog
- dh_installdocs
-# dh_install
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+ cp $(CURDIR)/debian/cacao.lintian-overrides \
+ $(CURDIR)/debian/cacao/usr/share/lintian/overrides/cacao
More information about the pkg-java-commits
mailing list