Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building with GCC 10.3 for JDK18 and above on Linux (Excluding OpenJ9) #2824

Merged
merged 2 commits into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions build-farm/platform-specific-configurations/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,29 @@ if [ $executedJavaVersion -ne 0 ]; then
fi

if [ "${VARIANT}" == "${BUILD_VARIANT_DRAGONWELL}" ] && [ "$JAVA_FEATURE_VERSION" -eq 11 ] && [ -r /usr/local/gcc9/ ] && [ "${ARCHITECTURE}" == "aarch64" ]; then
# GCC9 rather than 10 requested by Alibaba for now
# Ref https://github.com/adoptium/temurin-build/issues/2250#issuecomment-732958466
export PATH=/usr/local/gcc9/bin:$PATH
export CC=/usr/local/gcc9/bin/gcc-9.3
export CXX=/usr/local/gcc9/bin/g++-9.3
# Enable GCC 10 for Java 18+ for repeatable builds, but not for our supported releases
# Ref https://github.com/adoptium/temurin-build/issues/2787
elif [ "$JAVA_FEATURE_VERSION" -gt 17 ] && [ "${VARIANT}" != "${BUILD_VARIANT_OPENJ9}" ] && [ -r /usr/local/gcc10/bin/gcc-10.3 ]; then
export PATH=/usr/local/gcc10/bin:$PATH
[ -r /usr/local/gcc10/bin/gcc-10.3 ] && export CC=/usr/local/gcc10/bin/gcc-10.3
[ -r /usr/local/gcc10/bin/g++-10.3 ] && export CXX=/usr/local/gcc10/bin/g++-10.3
export LD_LIBRARY_PATH=/usr/local/gcc10/lib64:/usr/local/gcc10/lib
elif [ "$JAVA_FEATURE_VERSION" -gt 17 ] && [ "${VARIANT}" != "${BUILD_VARIANT_OPENJ9}" ] && [ -r /usr/bin/gcc-10 ]; then
[ -r /usr/bin/gcc-10 ] && export CC=/usr/bin/gcc-10
[ -r /usr/bin/g++-10 ] && export CXX=/usr/bin/g++-10
# Continue to use GCC 7 if present for JDK<=17 and where 10 does not exist
elif [ -r /usr/local/gcc/bin/gcc-7.5 ]; then
export PATH=/usr/local/gcc/bin:$PATH
[ -r /usr/local/gcc/bin/gcc-7.5 ] && export CC=/usr/local/gcc/bin/gcc-7.5
[ -r /usr/local/gcc/bin/gcc-7.5 ] && export CC=/usr/local/gcc/bin/gcc-7.5
karianna marked this conversation as resolved.
Show resolved Hide resolved
[ -r /usr/local/gcc/bin/g++-7.5 ] && export CXX=/usr/local/gcc/bin/g++-7.5
export LD_LIBRARY_PATH=/usr/local/gcc/lib64:/usr/local/gcc/lib
elif [ -r /usr/bin/gcc-7 ]; then
[ -r /usr/bin/gcc-7 ] && export CC=/usr/bin/gcc-7
[ -r /usr/bin/gcc-7 ] && export CC=/usr/bin/gcc-7
karianna marked this conversation as resolved.
Show resolved Hide resolved
[ -r /usr/bin/g++-7 ] && export CXX=/usr/bin/g++-7
fi

Expand Down