← Back to team overview

openjdk team mailing list archive

Bug#787072: openjdk-8: fix build on mips and mipsel

 

Source: openjdk-8
Version: 8u45-b14-3
Severity: wishlist
Tags: patch

Hi,

It's unfortunate I didn't know about this before openjdk-8 was removed
from unstable.

openjdk-8 was failing on mips because it was calling java with
-Xmx1600M. Since mips programs only have 2GB of address space, I'm
guessing that there wasn't enough free space for the heap to be placed
in and so java always failed to start.

The size of the heap is controlled in src/common/autoconf/boot-jdk.m4.
It looks like there is some code to handle different sizes for different
platforms, but the condition is based on '$BUILD_NUM_BITS' which as far
as I can see isn't defined anywhere so it always chooses the 64-bit
path.

I've attached a patch which replaces the condition with
'$OPENJDK_BUILD_CPU_BITS'. After this openjdk-8 builds fine (but slowly)
on mipsel. I have not tested it on mips big endian.

Thanks,
James
--- a/common/autoconf/boot-jdk.m4
+++ b/common/autoconf/boot-jdk.m4
@@ -323,7 +323,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_AR
 
   # Maximum amount of heap memory.
   # Maximum stack size.
-  if test "x$BUILD_NUM_BITS" = x32; then
+  if test "x$OPENJDK_BUILD_CPU_BITS" = x32; then
     JVM_MAX_HEAP=1100M
     STACK_SIZE=768
   else
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@
 Vcs-Browser: https://code.launchpad.net/~openjdk/openjdk/openjdk8
 
 Package: openjdk-8-jdk
-Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 Multi-Arch: same
 Pre-Depends: ${dpkg:Depends}
 Depends: openjdk-8-jre (= ${binary:Version}),
@@ -36,7 +36,7 @@
  from the IcedTea project.
 
 Package: openjdk-8-jre-headless
-Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 Multi-Arch: same
 Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends}
 Depends: ${jredefault:Depends}, ${cacert:Depends},
@@ -59,7 +59,7 @@
  from the IcedTea project.
 
 Package: openjdk-8-jre
-Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 Multi-Arch: same
 Pre-Depends: ${dpkg:Depends}
 Depends: openjdk-8-jre-headless (= ${binary:Version}),
@@ -80,7 +80,7 @@
  from the IcedTea project.
 
 Package: openjdk-8-demo
-Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 Priority: extra
 Pre-Depends: ${dpkg:Depends}
 Depends: openjdk-8-jre (= ${binary:Version}),
@@ -126,7 +126,7 @@
  from the IcedTea project.
 
 Package: openjdk-8-dbg
-Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+Architecture: alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 Multi-Arch: same
 Priority: extra
 Section: debug
--- a/debian/rules
+++ b/debian/rules
@@ -136,8 +136,8 @@
   hotspot_version = aarch64
 endif
 
-any_archs = alpha amd64 armel armhf arm64 i386 ia64 lpia mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
-bootjdk_gcj_archs = amd64 armel armhf arm64 hppa i386 ia64 lpia powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+any_archs = alpha amd64 armel armhf arm64 i386 ia64 lpia mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
+bootjdk_gcj_archs = amd64 armel armhf arm64 hppa i386 ia64 lpia mips mipsel powerpc powerpcspe ppc64 ppc64el m68k sh4 sparc sparc64 s390x x32 kfreebsd-i386 kfreebsd-amd64
 bootjdk_openjdk_archs = alpha arm64 mips64 mips64el
 bootjdk_cacao_archs =
 #ifneq (,$(filter nobootstrap, $(DEB_BUILD_OPTIONS)))
@@ -145,12 +145,12 @@
   bootjdk_gcj_archs :=
 #endif
 
-cacao_archs = alpha amd64 armel armhf i386 lpia powerpc powerpcspe m68k
+cacao_archs = alpha amd64 armel armhf i386 lpia powerpc powerpcspe m68k mips mipsel
 # TODO kfreebsd porting for cacao vm
 cacao_archs =
 
 ifeq (,$(filter $(distrel),squeeze lucid))
-  jamvm_archs = amd64 armel armhf i386 lpia powerpc kfreebsd-i386 kfreebsd-amd64
+  jamvm_archs = amd64 armel armhf i386 lpia powerpc kfreebsd-i386 kfreebsd-amd64 mips mipsel
 endif
 ifeq (,$(filter $(distrel),wheezy squeeze lucid))
   jamvm_defaults =

Attachment: signature.asc
Description: This is a digitally signed message part