[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Porting src:openjdk-6 to m68k (II)



Hi,

after my thread from June or so, I’ve started another attempt at
building src:openjdk-6 on m68k. Below is my preliminary patch;
any others will follow.

The patch
• fixes behaviour for s390, which uses gcj-4.6 to bootstrap,
  to not depend on gcj-4.7 as well
• adds m68k to gcj-4.6 platforms (there’s no gcj-4.7 as it FTBFS,
  which led to me trying OpenJDK in the first place by doko’s
  suggestion – which explains the first change, as gcj-4.7 may be
  installable on s390 but not on m68k)
• uses -fPIC to build by the suggestion of Andreas Schwab

Maybe later, we can just use OpenJDK 6 to build OpenJDK 6 on m68k,
once / if it’s proven more reliable than gcj/ecj?

One thing I’ve not (yet) patched is the change to use GCC builtin
atomics (__sync_*()) instead of using CAS.L in assembly for m68k.
OpenJDK 6 uses G++ 4.7 to build, and I’ve not changed that to 4.6
on m68k because it might work (though 4.6 is our workhorse compiler
and patched with bugfixes quite a bit, *and* it’s got atomic builtins
as backport), and 4.7 comes with atomic builtins for m68k which use
a kernel syscall for cmpxchg instead of relying on the CAS.L insn,
which (a) used to be broken in emulation, (b) is not available on
680x0 for low x, or ColdFire at all, and (c) does not always work
even on real 680x0 (high x) hardware, e.g. with Amiga ChipRAM, as
discussed on gmane.linux.ports.m68k. We/you might want to do that.

If one of you, either java or porter guys, has further suggestions,
just tell ☺

--- openjdk-6-6b24-1.11.5/debian/changelog
+++ openjdk-6-6b24-1.11.5/debian/changelog
@@ -1,3 +1,12 @@
+openjdk-6 (6b24-1.11.5-1+m68k.1) unreleased; urgency=low
+
+  * patches/text-relocations.patch: build with -fPIC on m68k
+  * debian/rules: fix gcj-$V-jdk B-D for 4.6 architectures
+    (was s390; add m68k as one)
+  * debian/control: regenerate
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Wed, 28 Nov 2012 17:42:39 +0100
+
 openjdk-6 (6b24-1.11.5-1) unstable; urgency=low
 
   * Upload to unstable.
--- openjdk-6-6b24-1.11.5/debian/control
+++ openjdk-6-6b24-1.11.5/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: OpenJDK Team <openjdk@lists.launchpad.net>
 Uploaders: Torsten Werner <twerner@debian.org>, Matthias Klose <doko@ubuntu.com>, Damien Raude-Morvan <drazzib@debian.org>
-Build-Depends: debhelper (>= 5), binutils-dev [armel armhf], m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, fastjar (>= 2:0.96-0ubuntu2),  autoconf, automake, autotools-dev, ant, ant-optional, libtool [alpha amd64 armel armhf i386 lpia m68k mips mipsel powerpc s390], g++-4.7,  ecj-gcj [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], gcj-4.7-jdk [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], gcj-jdk [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], g++-4.4 [mips mipsel], gcj-4.6-jdk [s390], libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, libxinerama-dev, xsltproc, rhino, fonts-ipafont-mincho, libffi-dev,  zlib1g-dev, libpng-dev, libjpeg8-dev, libgif-dev, libpulse-dev (>= 0.9.12), libnss3-dev (>= 3.12.3),  mauve, xvfb, xauth, xfonts-base, libgl1-mesa-dri, twm | metacity, twm | dbus-x11, x11-xkb-utils,
+Build-Depends: debhelper (>= 5), binutils-dev [armel armhf], m4, lsb-release, wget, zip, unzip, sharutils, gawk, cpio, pkg-config, procps, time, fastjar (>= 2:0.96-0ubuntu2),  autoconf, automake, autotools-dev, ant, ant-optional, libtool [alpha amd64 armel armhf i386 lpia m68k mips mipsel powerpc s390], g++-4.7,  ecj-gcj [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], gcj-4.6-jdk [m68k s390], gcj-4.7-jdk [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 mips mipsel sh4 sparc sparc64 s390x], gcj-jdk [alpha amd64 armel armhf hppa i386 ia64 lpia powerpc powerpcspe ppc64 m68k mips mipsel sh4 sparc sparc64 s390 s390x], g++-4.4 [mips mipsel], libxtst-dev, libxi-dev, libxt-dev, libxaw7-dev, libxrender-dev, libcups2-dev, libasound2-dev, libfreetype6-dev (>= 2.2.1), libgtk2.0-dev, libxinerama-dev, xsltproc, rhino, fonts-ipafont-mincho, libffi-dev,  zlib1g-dev, libpng-dev, libjpeg8-dev, libgif-dev, libpulse-dev (>= 0.9.12), libnss3-dev (>= 3.12.3),  mauve, xvfb, xauth, xfonts-base, libgl1-mesa-dri, twm | metacity, twm | dbus-x11, x11-xkb-utils,
 Standards-Version: 3.9.3
 Homepage: http://openjdk.java.net/
 Vcs-Bzr: http://bazaar.launchpad.net/~openjdk/openjdk/openjdk6
@@ -31,7 +31,7 @@
 Pre-Depends: ${dpkg:Depends}, ${multiarch:Depends}
 Depends: openjdk-6-jre-lib (= ${source:Version}), ${jredefault:Depends}, ${cacert:Depends}, ${tzdata:Depends}, ${jcommon:Depends}, ${dlopenhl:Depends}, ${shlibs:Depends}, ${misc:Depends}
 Recommends: ${dlopenjl:Recommends}, ${cacao:Recommends}, ${jamvm:Recommends}
-Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, fonts-ipafont-gothic, fonts-ipafont-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts,
+Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, fonts-ipafont-gothic, fonts-ipafont-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts-core, ttf-telugu-fonts, ttf-oriya-fonts, ttf-kannada-fonts, ttf-bengali-fonts,
 Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, ${defaultvm:Provides}, ${jvm:Provides}
 Replaces: openjdk-6-jre-lib (<< 6b23~pre10), openjdk-6-jre (<< 6b23~pre1), openjdk-6-jdk (<< 6b20-1.9.1-0ubuntu2)
 Conflicts: ${multiarch:Conflicts}, openjdk-6-jre-lib (<< 6b17~pre3-1), openjdk-6-jre (<< 6b17~pre3-1), openjdk-6-jdk (<< 6b17~pre3-1), openjdk-6-demo (<< 6b17~pre3-1), openjdk-6-source (<< 6b17~pre3-1), openjdk-6-doc (<< 6b17~pre3-1), openjdk-6-dbg (<< 6b17~pre3-1), openjdk-6-jre-zero (<< 6b17~pre3-1)
--- openjdk-6-6b24-1.11.5/debian/rules
+++ openjdk-6-6b24-1.11.5/debian/rules
@@ -230,7 +230,7 @@
   ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
     export GCC_SUFFIX = -4.4
   endif
-  ifneq (,$(filter $(DEB_HOST_ARCH), s390))
+  ifneq (,$(filter $(DEB_HOST_ARCH), m68k s390))
     export GCJ_SUFFIX = -4.6
   endif
 else ifneq (,$(filter $(distrel),oneiric))
@@ -582,11 +582,14 @@
     bd_bootstrap += gcc-snapshot (>= 20100403-1~dapper3),
     #bd_bootstrap += gcj-4.4-jdk,
   else ifneq (,$(filter $(distrel),wheezy sid))
+    stage1_gcj46_archs = m68k s390
+    stage1_gcj47_archs = $(filter-out $(stage1_gcj46_archs), $(stage1_gcj_archs))
     bd_bootstrap += \
 	ecj-gcj [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \
-	gcj-4.7-jdk [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \
+	gcj-4.6-jdk [$(strip $(foreach a,$(stage1_gcj46_archs), $(a)))], \
+	gcj-4.7-jdk [$(strip $(foreach a,$(stage1_gcj47_archs), $(a)))], \
 	gcj-jdk [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))],
-    bd_bootstrap += g++-4.4 [mips mipsel], gcj-4.6-jdk [s390],
+    bd_bootstrap += g++-4.4 [mips mipsel],
   else ifeq (,$(filter $(distrel),lenny jaunty intrepid hardy gutsy feisty edgy))
     bd_bootstrap += \
 	ecj-gcj [$(strip $(foreach a,$(stage1_gcj_archs), $(a)))], \
--- openjdk-6-6b24-1.11.5.orig/patches/text-relocations.patch
+++ openjdk-6-6b24-1.11.5/patches/text-relocations.patch
@@ -5,7 +5,7 @@
  # Compiler flags
  
  # position-independent code
-+ifneq ($(filter alpha parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
++ifneq ($(filter alpha m68k parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
  PICFLAG = -fPIC
 +else
 +PICFLAG = -fpic

bye,
//mirabilos
-- 
Darwinism never[…]applied to wizardkind. There's a more than fair amount of[…]
stupidity in its gene-pool[…]never eradicated[…]magic evens the odds that way.
It's[…]harder to die for us than[…]muggles[…]wonder if, as technology[…]better
[…]same will[…]happen there too. Dursleys' continued existence indicates so.


Reply to: