Commits

Hamish Morrison  committed a3a6a90

Add preliminary build instructions

  • Participants
  • Parent commits ee67ee3

Comments (0)

Files changed (1)

+====================================
+Haiku OpenJDK bootstrap instructions
+====================================
+
+
+Requirements
+============
+
+* Classpath 0.98 (not 0.99!)
+* JamVM 1.5.4
+* Any recent Ant (I used 1.8.2)
+* IcedTea 2.0 (not 2.0.1, not 2.1!)
+* xsltproc
+* sha256sum
+* cpio
+* X11 headers
+
+Instructions
+============
+
+* Install the Mercurial optional package.
+* Download the latest stable version of the Eclipse Java IDE. Go into the
+  plugins directory  and get org.eclipse.jdt.core[...].jar. This jar contains ECJ.
+  I'm using 3.7.1. The 3.8.x version I tried didn't work.
+* Install the DevelopmentJava optional package. This will provide JamVM
+  and Classpath (and an older version of ECJ that you can discard).
+* Create an ECJ launcher script. Something like this should do::
+
+    #!/bin/bash
+    <jam-vm-path> -classpath <eclipse-jar-path> org.eclipse.jdt.internal.compiler.batch.Main "$@"
+
+* Now you need to get the Classpath 0.98 sources and rebuild it with the
+  configure flag ``--with-ecj-jar=<path-to-new-ecj>`` which will link
+  the com.sun.tools.javac class to ECJ. You also may need to point it in
+  the direction of your ECJ launcher.
+* Now you need to create a fake JDK directory structure. Which will look
+  like this::
+
+    - java_home
+        - bin
+            * jar => jamvm -classpath <tools-zip> gnu.classpath.tools.jar.Main "$@"
+            * java => symlink to jamvm
+            * javac => same as your ECJ launcher
+            * javah => jamvm -classpath <tools-zip> gnu.classpath.tools.javah.Main "$@"
+        - jre
+            - bin
+                * java => symlink to jamvm
+            - lib
+                * rt.jar => symlink to <glibj-zip>
+        - lib
+            * tools.jar => symlink to <tools-zip>
+
+  You'll find the zips under ``path/to/share/classpath``.
+* Now grab the Ant sources and try to get it to build. You'll need to
+  set the ``JAVA_HOME`` environment variable to point to your fake JDK.
+* Now grab IcedTea 2.0. Modify ``acinclude.m4`` to let it recognize Haiku, and
+  disable the checks for the X11 stuff and ALSA. You may need to edit
+  ``configure.ac`` too. Now configure with the location of your ECJ jar.
+  You'll need to spend a little time running and rerunning configure to get
+  all the dependencies sorted out. There's some stuff you can get from
+  coreutils. And Cpio which builds easy.
+* After it configures, hit make. It should fail as soon as it starts to
+  build the JDK, but this is expected. It should have generated a new fake
+  JDK directory for us, under ``bootstrap/boot``, which includes an enhanced
+  rt.jar with some OpenJDK classes added, along with various other tricks
+  to make the bootstrap tools more compliant.
+* Now clone the haiku-jdk repository. Then create subdirs corba, jaxp, jaxsws,
+  and so on and clone their respective repos into there.
+* Go into the root directory and execute::
+
+    make   ALT_BOOTDIR=<path-to-icedtea/bootstrap/boot> \
+           GENSRCDIR=<path-to-icedtea/generated> \
+           ICEDTEA_RT=<path-to-icedtea/bootstrap/boot/jre/lib/rt.jar>
+           XSLT=<path-to-xsltproc> \
+           ANT=<path-to-ant> \
+           <if pre hrev43901 USE_PRECOMPILED_HEADER=0> \
+           ALLOW_DOWNLOADS=true \
+           ALT_OUTPUTDIR=<wherever>
+
+* In the likely event of a problem: hamish@lavabit.com