Skip to content

Commit

Permalink
RVM-549 : Merge branch 'RVM-549-OpenJDK' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-brangs committed May 18, 2019
2 parents 0df0240 + df41c70 commit 7f1e5c2
Show file tree
Hide file tree
Showing 117 changed files with 11,334 additions and 509 deletions.
5 changes: 5 additions & 0 deletions bin/buildit
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Building Options:
--comp-cache-dir Specify a cache location for component downloads
--clear-cc Clear out the component caches
--harmony Build with harmony (instead of classpath)
--openjdk Build with OpenJDK libraries (instead of classpath)
--answer-yes Answer yes for all messages from the script that require confirmation. This option may be useful for headless builds.
--timestamp-file Print contents of the timestamp file at the beginning and end of the build
Note: Cross-building (i.e. different host and target is not supported by this option)
Expand Down Expand Up @@ -239,6 +240,7 @@ GetOptions(
"m32" => \$m32,
"m64" => \$m64,
"harmony" => \$harmony,
"openjdk" => \$openjdk,
"j|java-home=s" => \$javaHomeCmd,
"ext-lib-dir=s" => \$extlibdir,
"comp-cache-dir=s" => \$compcachedir,
Expand Down Expand Up @@ -793,6 +795,9 @@ if ($ok) {
if (defined $harmony) {
$defs .= "-Dclasslib.provider=Harmony ";
}
if (defined $openjdk) {
$defs .= "-Dclasslib.provider=OpenJDK ";
}
if (defined $with_perfevent) {
$defs .= "-Dconfig.include.perfevent=true ";
}
Expand Down
398 changes: 373 additions & 25 deletions build.xml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions build/checkstyle/License-Header-OpenJDK.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) YEAR1, YEAR2, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
27 changes: 27 additions & 0 deletions build/checkstyle/rvm-checks-openjdk-gpl-header.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Eclipse Public License (EPL);
~ You may not use this file except in compliance with the License. You
~ may obtain a copy of the License at
~
~ http://www.opensource.org/licenses/eclipse-1.0.php
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">

<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<module name="Header">
<property name="headerFile" value="${basedir}/build/checkstyle/License-Header-OpenJDK.txt"/>
<!-- Line 2: Year is different -->
<property name="ignoreLines" value="2"/>
</module>

</module>
88 changes: 88 additions & 0 deletions build/components/openjdk.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<project name="openjdk" default="build" basedir=".">

<import file="base.xml"/>

<property name="openjdk.description" value="OpenJDK / IcedTea"/>

<property name="openjdk.version" value="6-1.13.13"/>

<property name="icedtea.version" value="${openjdk.version}"/>

<property name="icedtea.base.url" value="http://icedtea.classpath.org/download/source/"/>
<!-- .tar.xz is also provided by upstream -->
<property name="icedtea.archive.type" value=".tar.gz"/>
<property name="icedtea.version.start" value="icedtea${icedtea.version}"/>
<property name="icedtea.archive" value="${icedtea.version.start}${icedtea.archive.type}"/>

<property name="openjdk.tarball.archive" value="openjdk-6-src-b41-04_jan_2017.tar.xz"/>
<property name="openjdk.tarball.url" value="https://openjdk-sources.osci.io/openjdk6/${openjdk.tarball.archive}"/>

<property name="icedtea.component.dir" location="${components.dir}/icedtea"/>
<property name="icedtea.package.dir" value="${icedtea.component.dir}/${icedtea.version}"/>
<property name="icedtea.dir" value="${icedtea.package.dir}/${icedtea.version.start}"/>
<property name="icedtea.jre.location" value="${icedtea.dir}/icedtea-build/openjdk.build/j2sdk-server-image/jre"/>

<property name="openjdk.tarball.dest" value="${icedtea.package.dir}/${openjdk.tarball.archive}"/>

<target name="download-icedtea-from-web">
<echo message="Downloading IcedTea sources"/>
<test-file name="tar.exe" location="${host.file}"/>
<mkdir dir="${icedtea.package.dir}"/>
<cachedGet key="${icedtea.archive}"
src="${icedtea.base.url}${icedtea.archive}"
dest="${icedtea.package.dir}/${icedtea.archive}"/>
<cachedGet key="${openjdk.tarball.archive}"
src="${openjdk.tarball.url}"
dest="${openjdk.tarball.dest}"/>
<!-- use tar.exe so can maintain executable bits on appropriate files. Could use untarchmod task for same but it was annoying -->
<exec executable="${tar.exe}" failonerror="true" dir="${icedtea.package.dir}">
<arg value="xzf"/>
<arg value="${icedtea.archive}"/>
</exec>
</target>

<target name="fetch" depends="download-icedtea-from-web">
</target>

<target name="patch" depends="fetch">
<echo message="Patching IcedTea sources"/>
<echo message="(nothing to do for current version)"/>
</target>

<target name="build" depends="patch">
<echo message="Building IcedTea libraries"/>
<test-file name="make.exe" location="${host.file}"/>

<echo>Executing autogen.sh</echo>
<exec executable="${icedtea.dir}/autogen.sh" failonerror="true" dir="${icedtea.dir}"/>

<echo>Executing configure</echo>
<mkdir dir="${icedtea.dir}/icedtea-build"/>
<exec executable="${icedtea.dir}/configure" failonerror="true" dir="${icedtea.dir}/icedtea-build">
<!-- Don't pass through the options that we use. For GNU Classpath, we only use this to make sure
that libraries are built correctly when using 32-bit on 64-bit systems. OpenJDK and IcedTea don't
support that at all. We risk introducing build failures by passing through our options, so we refrain
from doing that. -->
<!-- Note that c++.exe and c++.args aren't defined in host properties at the moment, so they would need to be introduced
if options need to be passed through.
<env key="CXX" value="${c++.exe} ${c++.args}"/>
<env key="CC" value="${c.exe} ${c.args}"/>
-->
<arg value="--with-openjdk-src-zip=${openjdk.tarball.dest}"/>
</exec>

<echo>Executing make</echo>
<exec executable="${make.exe}" failonerror="true" dir="${icedtea.dir}/icedtea-build">
</exec>

<echo>Setting up for use as class library</echo>
<writeComponentConstants dir="${icedtea.jre.location}/lib"/>
<setComponentsConfig key="${target.name}.openjdk.lib.dir" value="${icedtea.jre.location}/lib"/>
</target>

<target name="ensure" depends="prepare-ant-tasks">
<echo message="Ensure IcedTea libraries"/>
<ensureUptodate name="openjdk" dir="${icedtea.jre.location}/lib"/>
</target>

</project>
51 changes: 51 additions & 0 deletions build/eclipse/classpath.openjdk.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Eclipse Public License (EPL);
~ You may not use this file except in compliance with the License. You
~ may obtain a copy of the License at
~
~ http://www.opensource.org/licenses/eclipse-1.0.php
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership.
-->
<classpath>
<classpathentry kind="src" path="rvm/src"/>
<classpathentry kind="src" path="rvm/test-src"/>
<classpathentry kind="src" path="MMTk/ext/vm/jikesrvm"/>
<classpathentry kind="src" path="MMTk/src"/>
<classpathentry kind="src" path="common/options/src"/>
<classpathentry kind="src" path="libraryInterface/Common/src"/>
<classpathentry kind="src" path="libraryInterface/OpenJDK/EPL/src"/>
<classpathentry kind="src" path="libraryInterface/OpenJDK/GPL/src"/>
<classpathentry kind="src" path="tools/bootImageWriter/src"/>
<classpathentry kind="src" path="tools/build-helpers/src"/>
<classpathentry kind="src" path="common/vmmagic/src"/>
<classpathentry kind="src" path="external/tuningforklib/src"/>
<classpathentry kind="src" path="testing/tests/basic/src"/>
<classpathentry kind="src" path="testing/tests/gctest/src"/>
<classpathentry kind="src" path="testing/tests/gctracingtest/src"/>

<!-- Entries with exclusion -->
<classpathentry excluding="tNativeThreads.java|NativeThreadsWorker.java|StackResize.java" kind="src" path="testing/tests/jni/src"/>
<classpathentry excluding="TestEncodedCallSiteTree.java|testpm.java|dtc.java|ExceptionTest6.java|TestThrow.java|TestThrow2.java" kind="src" path="testing/tests/opttests/src"/>

<classpathentry kind="src" path="eclipse/gen-base"/>
<classpathentry kind="src" path="eclipse/gen-config"/>
<classpathentry kind="src" path="eclipse/gen-arch"/>

<classpathentry kind="lib" path="eclipse/charsets.jar"/>
<classpathentry kind="lib" path="eclipse/jce.jar"/>
<classpathentry kind="lib" path="eclipse/management-agent.jar"/>
<classpathentry kind="lib" path="eclipse/rt.jar"/>
<classpathentry kind="lib" path="eclipse/jsse.jar"/>
<classpathentry kind="lib" path="eclipse/resources.jar"/>

<classpathentry kind="lib" path="eclipse/junit.jar"/>
<classpathentry kind="lib" path="eclipse/hamcrest.jar"/>
<classpathentry kind="lib" path="eclipse/mockito.jar"/>

<classpathentry kind="output" path="eclipse/bin"/>
</classpath>
1 change: 1 addition & 0 deletions build/primordials/ClassLibrary_Throwables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Ljava/lang/Error;
Ljava/lang/IndexOutOfBoundsException;
Ljava/lang/LinkageError;
Ljava/lang/NullPointerException;
Ljava/lang/OutOfMemoryError;
Ljava/lang/RuntimeException;
Ljava/lang/SecurityException;
Ljava/lang/StackOverflowError;
Expand Down

0 comments on commit 7f1e5c2

Please sign in to comment.