From 18a1dd261cec6fa1c5820dce2df47d488417afff Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Tue, 22 Jun 2021 13:28:41 +0000 Subject: [PATCH] 8269031: linux x86_64 check for binutils 2.25 or higher after 8265783 Reviewed-by: ihse, erikj --- make/autoconf/toolchain.m4 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/make/autoconf/toolchain.m4 b/make/autoconf/toolchain.m4 index 78895888095..69540e1608e 100644 --- a/make/autoconf/toolchain.m4 +++ b/make/autoconf/toolchain.m4 @@ -221,6 +221,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE], AC_ARG_WITH(toolchain-type, [AS_HELP_STRING([--with-toolchain-type], [the toolchain type (or family) to use, use '--help' to show possible values @<:@platform dependent@:>@])]) + # Linux x86_64 needs higher binutils after 8265783 + # (this really is a dependency on as version, but we take ld as a check for a general binutils version) + if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.25" + fi + # Use indirect variable referencing toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS VALID_TOOLCHAINS=${!toolchain_var_name} @@ -677,9 +683,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE], TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS if test "x$TOOLCHAIN_MINIMUM_LD_VERSION" != x; then + AC_MSG_NOTICE([comparing linker version to minimum version $TOOLCHAIN_MINIMUM_LD_VERSION]) TOOLCHAIN_CHECK_LINKER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_LD_VERSION, IF_OLDER_THAN: [ - AC_MSG_WARN([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.]) + AC_MSG_ERROR([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.]) ] ) fi