Skip to content

Commit

Permalink
Setup AL bootstrapping with Corretto 20.
Browse files Browse the repository at this point in the history
This should not get upstreamed or merged to develop.
  • Loading branch information
lutkerd committed Sep 8, 2023
1 parent 11029ad commit 48e38f6
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions installers/linux/al2/spec/java-amazon-corretto.spec.template
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ BuildRequires: libXtst-devel
BuildRequires: pkgconfig
BuildRequires: xorg-x11-proto-devel

%if %{with bootjdk}
BuildRequires: java-${boot_jdk_major_version}-devel
%endif
#%if %{with bootjdk}
#BuildRequires: java-${boot_jdk_major_version}-devel
#%endif

Requires: libX11
Requires: libXi
Expand Down Expand Up @@ -247,13 +247,27 @@ Amazon Corretto's packaging of the OpenJDK ${java_spec_version} jmods.

%build

# Bootstrap with Corretto 20
%ifarch aarch64
curl -L -o corretto.tar.gz https://corretto.aws/downloads/latest/amazon-corretto-20-aarch64-linux-jdk.tar.gz
echo "505409e4f7e7c6c9aeae61af6a7df075298ceed70b1b562dc6d5f65588e12b1e corretto.tar.gz" > corretto.tar.gz.sha256
%else
curl -L -o corretto.tar.gz https://corretto.aws/downloads/latest/amazon-corretto-20-x64-linux-jdk.tar.gz
echo "32a6ce43ec641b0bd55d21bc4aa17995407581fb1c5142703805960aea95d2db corretto.tar.gz" > corretto.tar.gz.sha256
%endif
sha256sum -c corretto.tar.gz.sha256
mkdir -p corretto-bootstrap-jdk
tar -xf corretto.tar.gz --strip-component=1 -C corretto-bootstrap-jdk


%if "%{dist}" == ".amzn2" || "%{dist}" == ".amzn2int"
# AmazonLinux ships with GifLib 4.x which does not define GIFLIB_MAJOR. This must be defined
# because -Werror=undef is enabled.
%define GIFLIB_DEFINE "-DGIFLIB_MAJOR=4"
%endif

bash ./configure \\
--with-boot-jdk=\${PWD}/corretto-bootstrap-jdk \\
%ifarch aarch64
--with-extra-cflags="-moutline-atomics%{?GIFLIB_DEFINE: %{GIFLIB_DEFINE}}" \\
--with-extra-cxxflags="-moutline-atomics" \\
Expand Down

0 comments on commit 48e38f6

Please sign in to comment.