From 3241b4e111e3dbf475c0e5be117c2a8d1a63ad35 Mon Sep 17 00:00:00 2001 From: Magnus Ihse Bursie Date: Fri, 4 Apr 2025 13:32:26 +0000 Subject: [PATCH] 8353066: Properly detect Windows/aarch64 as build platform Co-authored-by: Mikael Vidstedt Reviewed-by: mikael, prr, erikj --- make/autoconf/build-aux/config.guess | 12 ++++++++---- make/autoconf/toolchain_microsoft.m4 | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/make/autoconf/build-aux/config.guess b/make/autoconf/build-aux/config.guess index afdf7cb5f92..ce9fb6cd16f 100644 --- a/make/autoconf/build-aux/config.guess +++ b/make/autoconf/build-aux/config.guess @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2021, Azul Systems, Inc. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # @@ -53,10 +53,10 @@ if [ "x$OUT" = x ]; then fi fi -# Test and fix cygwin on x86_64 -echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null +# Test and fix cygwin/msys CPUs +echo $OUT | grep -e "-pc-cygwin" > /dev/null 2> /dev/null if test $? != 0; then - echo $OUT | grep 86-pc-mingw > /dev/null 2> /dev/null + echo $OUT | grep -e "-pc-mingw" > /dev/null 2> /dev/null fi if test $? = 0; then case `echo $PROCESSOR_IDENTIFIER | cut -f1 -d' '` in @@ -64,6 +64,10 @@ if test $? = 0; then REAL_CPU=x86_64 OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` ;; + ARMv8) + REAL_CPU=aarch64 + OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` + ;; esac fi diff --git a/make/autoconf/toolchain_microsoft.m4 b/make/autoconf/toolchain_microsoft.m4 index 4f970df7b5f..17ad2666b3a 100644 --- a/make/autoconf/toolchain_microsoft.m4 +++ b/make/autoconf/toolchain_microsoft.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -87,7 +87,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT], elif test "x$TARGET_CPU" = xaarch64; then # for host x86-64, target aarch64 # aarch64 requires Visual Studio 16.8 or higher - VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat" + VCVARSFILES="vcvarsarm64.bat vcvarsamd64_arm64.bat vcvarsx86_arm64.bat" fi for VCVARSFILE in $VCVARSFILES; do