diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4 index 09b79bbb08e0f6d8873ac878d2ed781bb66804c2..ad10dde2cb53a544da5dd6770066f8a01056389a 100644 --- a/common/autoconf/flags.m4 +++ b/common/autoconf/flags.m4 @@ -423,14 +423,18 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK], AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags], [extra flags to be used when linking jdk])]) - CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" + DRAGONWELL_EXTRA_CFLAGS="-DVENDOR='\"Alibaba\"' \ + -DVENDOR_URL='\"http://www.alibabagroup.com\"' \ + -DVENDOR_URL_BUG='\"mailto:dragonwell_use@googlegroups.com\"'" + DRAGONWELL_EXTRA_LDFLAGS="-Wl,--build-id=sha" + CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags $DRAGONWELL_EXTRA_CFLAGS" CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" - LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" + LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags $DRAGONWELL_EXTRA_LDFLAGS" # Hotspot needs these set in their legacy form - LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags" + LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags $DRAGONWELL_EXTRA_CFLAGS" LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags" - LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags" + LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags $DRAGONWELL_EXTRA_LDFLAGS" AC_SUBST(LEGACY_EXTRA_CFLAGS) AC_SUBST(LEGACY_EXTRA_CXXFLAGS) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 0903e2a4d0c25f1c92f6f491ed5209d38ce37787..effe1cf22c741ed0b3382177340b0b6a22e9b085 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -19822,6 +19822,7 @@ fi MILESTONE=internal fi + source "${SRC_ROOT}/dragonwell_version" # Check whether --with-update-version was given. if test "${with_update_version+set}" = set; then : @@ -19838,6 +19839,8 @@ fi if test "${#JDK_UPDATE_VERSION}" = "1"; then JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" fi + else + JDK_UPDATE_VERSION=$DRAGONWELL_JDK_UPDATE_VERSION fi @@ -41519,14 +41522,18 @@ if test "${with_extra_ldflags+set}" = set; then : fi - CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" + DRAGONWELL_EXTRA_CFLAGS="-DVENDOR='\"Alibaba\"' \ + -DVENDOR_URL='\"http://www.alibabagroup.com\"' \ + -DVENDOR_URL_BUG='\"mailto:dragonwell_use@googlegroups.com\"'" + DRAGONWELL_EXTRA_LDFLAGS="-Wl,--build-id=sha" + CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags $DRAGONWELL_EXTRA_CFLAGS" CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" - LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" + LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags $DRAGONWELL_EXTRA_LDFLAGS" # Hotspot needs these set in their legacy form - LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags" + LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags $DRAGONWELL_EXTRA_CFLAGS" LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags" - LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags" + LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags $DRAGONWELL_EXTRA_LDFLAGS" diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index 6c8419646cb3c076e1307898146f8eb1fe250422..eb33f5b2944ae7a4edf30e4ff5dd56ccaa3e02bf 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -457,6 +457,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], MILESTONE=internal fi + source "${SRC_ROOT}/dragonwell_version" AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version], [Set update version value for build @<:@b00@:>@])]) if test "x$with_update_version" = xyes; then @@ -469,6 +470,8 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], if test "${#JDK_UPDATE_VERSION}" = "1"; then JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}" fi + else + JDK_UPDATE_VERSION=$DRAGONWELL_JDK_UPDATE_VERSION fi AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 88f9f539674fb4279401dbeb9628a7f48433576c..c5e9cff29ca523fced0584577bd18e88bc08812f 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -723,3 +723,9 @@ JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR) # Include the custom-spec.gmk file if it exists -include $(dir @SPEC@)/custom-spec.gmk + +# Include Dragonwell version information +-include @TOPDIR@/dragonwell_version +DISTRO_NAME=Dragonwell +COMPANY_NAME=Alibaba +DISTRO_VERSION=$(DRAGONWELL_VERSION) diff --git a/dragonwell_version b/dragonwell_version new file mode 100644 index 0000000000000000000000000000000000000000..497da5a188b7136aa8722be041a229d7c9ab36dc --- /dev/null +++ b/dragonwell_version @@ -0,0 +1,23 @@ +# +# Copyright (c) 2019 Alibaba Group Holding Limited. 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. Alibaba 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. +# + +DRAGONWELL_VERSION=8.0-preview +DRAGONWELL_JDK_UPDATE_VERSION=202 diff --git a/make.sh b/make.sh index a802ace5a82d313b6e814d422e451d1f8f4d119b..2b29ce005be8bf43c3678dd206a425f0261131de 100755 --- a/make.sh +++ b/make.sh @@ -1,23 +1,38 @@ #!/bin/bash # build properties -JDK_UPDATE_VERSION=202 -DISTRO_NAME=Dragonwell -DISTRO_VERSION=8.0-preview - -if [ $# != 1 ]; then - echo "USAGE: $0 release/debug" +# +# Copyright (c) 2019 Alibaba Group Holding Limited. 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. Alibaba 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. +# + +if [ ! -f "dragonwell_version" ]; then + echo "File 'dragonwell_version' doesn't exist!" + exit 1; fi +source dragonwell_version -ps -e | grep docker -if [ $? -eq 0 ]; then - echo "We will build Dragonwell in Docker!" - sudo docker pull reg.docker.alibaba-inc.com/ajdk/8-dev.alios5 - docker run -u admin -i --rm -e BUILD_NUMBER=$BUILD_NUMBER -v `pwd`:`pwd` -w `pwd` \ - --entrypoint=bash reg.docker.alibaba-inc.com/ajdk/8-dev.alios5 `pwd`/make.sh $1 - exit $? +DISTRO_VERSION=$DRAGONWELL_VERSION + +if [ $# -lt 1 ]; then + echo "USAGE: $0 release/debug" fi -source /vmfarm/tools/env.sh LC_ALL=C BUILD_MODE=$1 @@ -47,26 +62,17 @@ else BUILD_INDEX=b$BUILD_NUMBER fi +shift + bash ./configure --with-milestone=fcs \ - --with-freetype=/vmfarm/tools/freetype/ \ - --with-update-version=$JDK_UPDATE_VERSION \ --with-build-number=$BUILD_INDEX \ --with-user-release-suffix="" \ --enable-unlimited-crypto \ - --with-cacerts-file=/vmfarm/security/cacerts \ - --with-jtreg=/vmfarm/tools/jtreg4.1 \ - --with-tools-dir=/vmfarm/tools/install/gcc-4.4.7/bin \ --with-jvm-variants=server \ --with-debug-level=$DEBUG_LEVEL \ - --with-extra-cflags="-DVENDOR='\"Alibaba\"' \ - -DVENDOR_URL='\"http://www.alibabagroup.com\"' \ - -DVENDOR_URL_BUG='\"mailto:dragonwell_use@googlegroups.com\"'" \ - --with-zlib=system \ - --with-extra-ldflags="-Wl,--build-id=sha1" + --with-zlib=system $* make clean -make LOG=debug DISTRO_NAME=$DISTRO_NAME DISTRO_VERSION=$DISTRO_VERSION COMPANY_NAME=Alibaba images - -\cp -f /vmfarm/tools/hsdis/8/amd64/hsdis-amd64.so $NEW_JAVA_HOME/jre/lib/amd64/ +make LOG=debug images # Sanity tests JAVA_EXES=("$NEW_JAVA_HOME/bin/java" "$NEW_JAVA_HOME/jre/bin/java" "$NEW_JRE_HOME/bin/java") @@ -110,9 +116,9 @@ done # check version string $NEW_JAVA_HOME/bin/java -version > /tmp/version.out 2>&1 -grep "^OpenJDK Runtime" /tmp/version.out | grep "($DISTRO_NAME $DISTRO_VERSION)" +grep "^OpenJDK Runtime" /tmp/version.out | grep "(Dragonwell $DISTRO_VERSION)" if [ 0 != $? ]; then RET=1; fi -grep "^OpenJDK .*VM" /tmp/version.out | grep "($DISTRO_NAME $DISTRO_VERSION)" +grep "^OpenJDK .*VM" /tmp/version.out | grep "(Dragonwell $DISTRO_VERSION)" if [ 0 != $? ]; then RET=1; fi \rm -f /tmp/version.out @@ -120,4 +126,3 @@ ldd $NEW_JAVA_HOME/jre/lib/amd64/libzip.so|grep libz if [ 0 != $? ]; then RET=1; fi exit $RET -