RFR: JDK-8199052 Configure broken on aarch64

Erik Joelsson erik.joelsson at oracle.com
Mon Mar 5 23:55:29 UTC 2018


Looks good.

/Erik


On 2018-03-05 15:45, Magnus Ihse Bursie wrote:
> From the bug report:
>
> It seems that JDK-8198724 "Refactor FLAGS handling in configure" broke 
> the aarch64 build.
>
> The new configure scheme tries to pass the argument "-m64" to the gcc 
> compiler, but that is an x86-only flag.
>
> configure:35228: checking whether the C compiler works
> configure:35250: /usr/bin/gcc -m64 -m64 conftest.c >&5
> gcc: error: unrecognized command line option '-m64'
> gcc: error: unrecognized command line option '-m64'
> [...]
>
> The flags handling is currently in flux. The entire "MACHINE_FLAG" 
> handling is not optimal. But we can't have aarch64 hanging around 
> broken awaiting a proper refactoring, so here's a 
> not-ideal-but-working patch.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8199052
> Patch inline:
> diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
> --- a/make/autoconf/flags.m4
> +++ b/make/autoconf/flags.m4
> @@ -236,7 +236,9 @@
>    if test "x$TOOLCHAIN_TYPE" = xxlc; then
>      MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
>    elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
> -    MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
> +    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
> +      MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
> +    fi
>    fi
>
>    # FIXME: global flags are not used yet...
>
> /Magnus




More information about the build-dev mailing list