8264650: Cross-compilation to macos/aarch64

Reviewed-by: erikj
This commit is contained in:
Anton Kozlov 2021-04-05 06:58:11 +00:00 committed by Vladimir Kempik
parent 0039c18e08
commit 7f9ece23dc

View File

@ -265,6 +265,14 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
fi
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
MACHINE_FLAG="$MACHINE_FLAG -arch arm64"
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
MACHINE_FLAG="$MACHINE_FLAG -arch x86_64"
fi
fi
# FIXME: global flags are not used yet...
# The "global" flags will *always* be set. Without them, it is not possible to
# get a working compilation.