openjdk12-boot: share common options

This commit is contained in:
Tim Biermann 2021-03-14 12:42:04 +01:00
parent 395af3f047
commit 08f1d04cd3
Signed by: tb
GPG Key ID: 42F8B4E30B673606

View File

@ -7,6 +7,7 @@ name=openjdk12-boot
version=12.0.2+10 version=12.0.2+10
_boot_ver=20210207 _boot_ver=20210207
_cert_ver=20200215 _cert_ver=20200215
_jdkhash=c45c2cbfb841
release=1 release=1
source=(https://crux.ster.zone/downloads/java/openjdk-$version.tar.bz2 source=(https://crux.ster.zone/downloads/java/openjdk-$version.tar.bz2
https://crux.ster.zone/downloads/java/openjdk11-boot-$_boot_ver.tar.xz https://crux.ster.zone/downloads/java/openjdk11-boot-$_boot_ver.tar.xz
@ -14,7 +15,7 @@ source=(https://crux.ster.zone/downloads/java/openjdk-$version.tar.bz2
make-4.3_breaks_build.patch) make-4.3_breaks_build.patch)
build() { build() {
patch -p1 -d $SRC/jdk12u-jdk-$version -i $SRC/make-4.3_breaks_build.patch patch -p1 -d $SRC/jdk12u-$_jdkhash -i $SRC/make-4.3_breaks_build.patch
# Make sure we do not have ccache masquerade directory in PATH. # Make sure we do not have ccache masquerade directory in PATH.
# Use --enable-ccache instead of providing a wrapped compiler. # Use --enable-ccache instead of providing a wrapped compiler.
@ -33,39 +34,42 @@ build() {
unset CXXFLAGS unset CXXFLAGS
unset LDFLAGS unset LDFLAGS
unset MAKEFLAGS unset MAKEFLAGS
export _CFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon'
export _CXXFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon'
[ -z $JOBS ] && JOBS=$(nproc) [ -z $JOBS ] && JOBS=$(nproc)
mkdir $SRC/build-boot mkdir $SRC/build-boot
cd $SRC/build-boot cd $SRC/build-boot
export _CFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon' local _COMMON_OPTIONS="
export _CXXFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon' --disable-hotspot-gtest
LC_ALL=C --disable-precompiled-headers
/bin/bash ../jdk12u-jdk-$version/configure $PKGMK_JDK12 \ --disable-warnings-as-errors
--enable-dtrace=no
--enable-headless-only
--enable-unlimited-crypto
--with-native-debug-symbols=none
--with-debug-level=release
--with-stdc++lib=dynamic
--with-jvm-variants=server
--with-cacerts-file=$SRC/java_cacerts-$_cert_ver
--with-jtreg=no
--with-boot-jdk=$JAVA_HOME
--with-version-opt=CRUX-r$release
--with-version-build=${version#*+}
--with-vendor-name=CRUX
--with-jobs=$JOBS
--with-libjpeg=system
--with-giflib=system
--with-libpng=system
--with-zlib=system
--with-lcms=system"
LC_ALL=C \
/bin/bash $SRC/jdk12u-$_jdkhash/configure $PKGMK_JDK12 \
$_COMMON_OPTIONS \
--prefix=$SRC/build-boot/images/jdk \ --prefix=$SRC/build-boot/images/jdk \
--disable-hotspot-gtest \
--disable-precompiled-headers \
--disable-warnings-as-errors \
--enable-dtrace=no \
--enable-headless-only \
--enable-unlimited-crypto \
--with-native-debug-symbols=none \
--with-debug-level=release \
--with-stdc++lib=dynamic \
--with-jvm-variants=server \
--with-cacerts-file=$SRC/java_cacerts-$_cert_ver \
--with-jtreg=no \
--with-boot-jdk=$JAVA_HOME \
--with-version-opt="CRUX-r$release" \
--with-version-build="${version#*+}" \
--with-vendor-name="CRUX" \
--with-jobs=$JOBS \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-zlib=system \
--with-lcms=system \
--with-extra-cflags="$_CFLAGS" \ --with-extra-cflags="$_CFLAGS" \
--with-extra-cxxflags="$_CXXFLAGS" --with-extra-cxxflags="$_CXXFLAGS"
@ -79,31 +83,10 @@ build() {
mkdir $SRC/build mkdir $SRC/build
cd $SRC/build cd $SRC/build
LC_ALL=C LC_ALL=C \
/bin/bash ../jdk12u-jdk-$version/configure $PKGMK_JDK12 \ /bin/bash $SRC/jdk12u-$_jdkhash/configure $PKGMK_JDK12 \
--prefix=/$name \ --prefix=/$name \
--disable-hotspot-gtest \ $_COMMON_OPTIONS \
--disable-precompiled-headers \
--disable-warnings-as-errors \
--enable-dtrace=no \
--enable-headless-only \
--enable-unlimited-crypto \
--with-native-debug-symbols=none \
--with-debug-level=release \
--with-stdc++lib=dynamic \
--with-jvm-variants=server \
--with-cacerts-file=$SRC/java_cacerts-$_cert_ver \
--with-jtreg=no \
--with-boot-jdk=$JAVA_HOME \
--with-version-opt="CRUX-r$release" \
--with-version-build="${version#*+}" \
--with-vendor-name="CRUX" \
--with-jobs=$JOBS \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-zlib=system \
--with-lcms=system \
--with-extra-cflags="$_CFLAGS" \ --with-extra-cflags="$_CFLAGS" \
--with-extra-cxxflags="$_CXXFLAGS" --with-extra-cxxflags="$_CXXFLAGS"