From 08f1d04cd30bf99503e15fdde3b68219071b76f3 Mon Sep 17 00:00:00 2001 From: Tim Biermann Date: Sun, 14 Mar 2021 12:42:04 +0100 Subject: [PATCH] openjdk12-boot: share common options --- openjdk12-boot/Pkgfile | 85 +++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 51 deletions(-) diff --git a/openjdk12-boot/Pkgfile b/openjdk12-boot/Pkgfile index 4fec699..d0bf2ff 100644 --- a/openjdk12-boot/Pkgfile +++ b/openjdk12-boot/Pkgfile @@ -7,6 +7,7 @@ name=openjdk12-boot version=12.0.2+10 _boot_ver=20210207 _cert_ver=20200215 +_jdkhash=c45c2cbfb841 release=1 source=(https://crux.ster.zone/downloads/java/openjdk-$version.tar.bz2 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) 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. # Use --enable-ccache instead of providing a wrapped compiler. @@ -33,39 +34,42 @@ build() { unset CXXFLAGS unset LDFLAGS 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) mkdir $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' - export _CXXFLAGS+=' -fabi-version=10 -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-strict-overflow -fcommon' - LC_ALL=C - /bin/bash ../jdk12u-jdk-$version/configure $PKGMK_JDK12 \ + local _COMMON_OPTIONS=" + --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" + + LC_ALL=C \ + /bin/bash $SRC/jdk12u-$_jdkhash/configure $PKGMK_JDK12 \ + $_COMMON_OPTIONS \ --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-cxxflags="$_CXXFLAGS" @@ -79,31 +83,10 @@ build() { mkdir $SRC/build cd $SRC/build - LC_ALL=C - /bin/bash ../jdk12u-jdk-$version/configure $PKGMK_JDK12 \ + LC_ALL=C \ + /bin/bash $SRC/jdk12u-$_jdkhash/configure $PKGMK_JDK12 \ --prefix=/$name \ - --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 \ + $_COMMON_OPTIONS \ --with-extra-cflags="$_CFLAGS" \ --with-extra-cxxflags="$_CXXFLAGS"