Merge pull request #2 from djam/java-11-openjdk:rosa2019.1

Backports and update
This commit is contained in:
djam 2021-03-24 21:30:44 +00:00
commit b4f9ff4be3
2 changed files with 33 additions and 7 deletions

View file

@ -1,4 +1,7 @@
sources: sources:
"shenandoah-jdk11-shenandoah-jdk-11.0.8+6-4curve.tar.xz": 675c2ab8b8793ab87d0cf9b77b2196b71f4afbca OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz: 5627bcceee613c4764c120e941c8d24b3e5a6e33
"tapsets-icedtea-3.15.0.tar.xz": 7ae2cba67467825b2c2a5fec7aea041865023002 bellsoft-jdk11.0.10+9-linux-aarch64.tar.gz: 6eed6f7cf4167316b2f22ebb5f3119b0869eb554
"OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz": 5627bcceee613c4764c120e941c8d24b3e5a6e33 bellsoft-jdk11.0.10+9-linux-amd64.tar.gz: 32e0fe99199c9691e616af48355157139c0c8e60
bellsoft-jdk11.0.10+9-linux-i586.tar.gz: 301b8efbf861f823b8f44cc22385020cf85d4be3
shenandoah-jdk11-shenandoah-jdk-11.0.8+6-4curve.tar.xz: 675c2ab8b8793ab87d0cf9b77b2196b71f4afbca
tapsets-icedtea-3.15.0.tar.xz: 7ae2cba67467825b2c2a5fec7aea041865023002

View file

@ -146,6 +146,9 @@
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings # We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
%ifarch %{ix86}
%global optflags %optflags -fno-PIC
%endif
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||') %global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||')
%global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||') %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
@ -1096,7 +1099,27 @@ Source15: TestSecurityProperties.java
# ROSA-specific # ROSA-specific
Source300: %{name}.rpmlintrc Source300: %{name}.rpmlintrc
Source301: OpenJDK11U-jdk_x64_linux_hotspot_11.0.7_10.tar.gz # Binary JDK for buolding with_bootstrap
# Only Liberica JDK provides binaries for x86_32
# Gentoo uses https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases, there is no x86_32 there
# Using https://libericajdk.ru/pages/downloads/#/java-11-lts -> "Standard JDK"
# x86_32
Source301: https://download.bell-sw.com/java/11.0.10+9/bellsoft-jdk11.0.10+9-linux-i586.tar.gz
# x86_64
Source302: https://download.bell-sw.com/java/11.0.10+9/bellsoft-jdk11.0.10+9-linux-amd64.tar.gz
# aarch64
Source303: https://download.bell-sw.com/java/11.0.10+9/bellsoft-jdk11.0.10+9-linux-aarch64.tar.gz
%ifarch %{ix86}
%define bootstrap_jdk_source_num 301
%endif
%ifarch %{x86_64}
%define bootstrap_jdk_source_num 302
%endif
%ifarch aarch64
%define bootstrap_jdk_source_num 303
%endif
############################################ ############################################
# #
@ -1415,7 +1438,7 @@ if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
echo "You have disabled both include_debug_build and include_normal_build. That is a no go." echo "You have disabled both include_debug_build and include_normal_build. That is a no go."
exit 13 exit 13
fi fi
%setup -q -c -n %{uniquesuffix ""} -T -a 0 %{?with_bootstrap:-b 301} %setup -q -c -n %{uniquesuffix ""} -T -a 0 %{?with_bootstrap:-b %{bootstrap_jdk_source_num}}
# https://bugzilla.redhat.com/show_bug.cgi?id=1189084 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
prioritylength=`expr length %{priority}` prioritylength=`expr length %{priority}`
if [ $prioritylength -ne 8 ] ; then if [ $prioritylength -ne 8 ] ; then
@ -1557,7 +1580,7 @@ bash ../configure \
%if ! %{with bootstrap} %if ! %{with bootstrap}
--with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \ --with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \
%else %else
--with-boot-jdk="%{_builddir}/jdk-11.0.7+10" \ --with-boot-jdk="%{_builddir}/jdk-11.0.10" \
%endif %endif
--with-debug-level=$debugbuild \ --with-debug-level=$debugbuild \
--with-native-debug-symbols=internal \ --with-native-debug-symbols=internal \
@ -1720,7 +1743,7 @@ grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
%endif %endif
# Check src.zip has all sources. See RHBZ#1130490 # Check src.zip has all sources. See RHBZ#1130490
jar -tf $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe' $JAVA_HOME/bin/jar -tf $JAVA_HOME/lib/src.zip | grep 'sun.misc.Unsafe'
# Check class files include useful debugging information # Check class files include useful debugging information
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from" $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"