diff options
authorJim MacArthur <>2015-05-28 16:34:41 (GMT)
committerSam Thursfield <>2015-06-12 10:38:34 (GMT)
commitfbe3d1e8d5bc0844070b5cfb74e870eb45920cf7 (patch)
parent6c9cc189cc1470283a146d359bd817061cc5a747 (diff)
Add java-build stratum, contaniing things necessary to build OpenJDK
The use of the java-binary repo from Github goes against the policy we have defined for the Baserock reference systems, of having everything built from source code that is mirrored on However, building a Java compiler from source code super difficult so we can't really avoid this hack at present if we want to build other Java components from source using Baserock tooling. Change-Id: I9bc1892cbdbb3d3234b06d8a650b0c568254c0b5
2 files changed, 38 insertions, 0 deletions
diff --git a/strata/java.morph b/strata/java.morph
new file mode 100644
index 0000000..f10bb8a
--- /dev/null
+++ b/strata/java.morph
@@ -0,0 +1,22 @@
+name: java
+kind: stratum
+description: |
+ This stratum contains everything necessary to compile and run Java applications
+ and build OpenJDK from source.
+- morph: strata/core.morph
+- morph: strata/x-common.morph
+- morph: strata/graphics-common.morph
+- name: java-binary
+ morph: strata/java/java-binary.morph
+ repo: github:jmacarthur/openjdk-binary
+ ref: 6f53762e2632c4b9f9afdfa6995a2c696bb9fd43
+ unpetrify-ref: master
+- name: java-ant
+ morph: strata/java/java-ant.morph
+ repo: upstream:java/ant
+ ref: b3509fc3250b0f868076c846d29da80cbdc20681
+ unpetrify-ref: ANT_194
+ build-depends:
+ - java-binary
diff --git a/strata/java/java-binary.morph b/strata/java/java-binary.morph
new file mode 100644
index 0000000..c75f39b
--- /dev/null
+++ b/strata/java/java-binary.morph
@@ -0,0 +1,16 @@
+name: java-binary
+description: |
+ This is a temporary solution to the OpenJDK build problem. In the future
+ we expect to be able to build fully from scratch using IcedTea, but for now
+ we need an existing OpenJDK binary to build OpenJDK.
+kind: chunk
+configure-commands: []
+- cat j2sdk-image-jdk8build.tar.gz_* > jdk-8u20-linux-x64.tar.gz
+- mkdir -p "$DESTDIR$PREFIX"/bin
+- mkdir -p "$DESTDIR$PREFIX"/lib
+- tar zxf jdk-8u20-linux-x64.tar.gz -C "$DESTDIR$PREFIX"/lib --no-same-owner
+- ln -sfn "$PREFIX"/lib/j2sdk-image "$DESTDIR$PREFIX"/lib/java-8-openjdk
+- ln -sfn "$PREFIX"/lib/j2sdk-image/jre/bin/java "$DESTDIR$PREFIX"/bin/
+- ln -sfn "$PREFIX"/lib/j2sdk-image/jre/bin/javac "$DESTDIR$PREFIX"/bin/