jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit bdd96fb801627b0accd81ff33be034c19fe193ba
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Fri Apr 7 11:15:42 2023 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Tue Apr 11 12:07:15 2023 +0200

    accept aarch64 JDK for win/aarch64
    
    the check is only done for windows & mac since the property can have
    arbitrary values - in OpenJDK it is hardcoded for windows, but for other
    platforms it can come from autoconf. For a more detailed explanation
    see f05a42ef8c8192186f91a169047742e5c3ae9b9e
    
    Change-Id: I8555ef3b7153a9b744b45cf07deae3c3a1d48ae3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150119
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
index f4cf14a9ab3f..d7988518f2ed 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx
@@ -175,12 +175,16 @@ bool VendorBase::isValidArch() const
     // It is not defined what the exact values are.
     // Oracle JRE 8 has "x86" and "amd64", the others were found at 
http://lopica.sourceforge.net/os.html .
     // There might still be missing some options; we need to extend the check 
once we find out.
-#if defined _WIN64 || (defined MACOSX && defined __x86_64__)
+#if defined _WIN64 || defined MACOSX
+#if defined __x86_64__ || defined _M_AMD64
     return m_sArch == "amd64" || m_sArch == "x86_64";
+#elif defined __aarch64__ || defined _M_ARM64
+    return m_sArch == "aarch64";
+#else
+#error neither arm64 nor amd64 for win64/mac? Sounds fishy.
+#endif
 #elif defined _WIN32
     return m_sArch == "x86" || m_sArch == "i386" || m_sArch == "i686";
-#elif defined MACOSX && defined __aarch64__
-    return m_sArch == "aarch64";
 #else
     (void)this;
     return true;

Reply via email to