office-gobmx/jvmfwk/Library_jvmfwk.mk
Stephan Bergmann c74133420f tdf#151545: Restrict JvmfwkUtil_isLoadableJVM to macOS x86-64
That check had been added with 32bc8ddbf3
"tdf#94716 allow Oracle's JDK to be used on OS X 10.10 and 10.11", back at a
time when there was substantial trouble with installations of Apple's own Java
and Oracle JREs.  One consequence of that commit and its
JvmfwkUtil_isLoadableJVM check was that on macOS we only supported JDKs (with a
surrounding Contents directory containing an appropriate Info.plist files), not
plain JREs (cf. <https://wiki.documentfoundation.org/ReleaseNotes/5.1#macOS>
"Prior work arounds of having both an Apple JRE 6 and an Oracle JRE 8 are no
longer sufficient.  Use of the JDK is now hard coded, see tdf#74877, tdf#94716
and core commit 32bc8ddbf335dd26019edcf12758643b4cff9913.")

However, Apple's own Java is long since deprecated (cf.
<https://support.apple.com/en-us/HT204036> "You can also download legacy Java SE
6 from Apple if you’re using an app that specifically requires this unsupported,
out-of-date version."), and presumably of no practical concern at least on
contemporary Aarch64-based macOS.

And there is e.g. SDKMAN! (<https://sdkman.io/>), which installs JDKs in a way
that they are not surrounded by Contents directories containing appropriate
Info.plist files, so JvmfwkUtil_isLoadableJVM returned false for them and you
couldn't add them on the LibreOffice Advanced Options tab.

So at least for Aarch64-based macOS, drop that presumably-legacy
JvmfwkUtil_isLoadableJVM check (but keep it for x86-64--based macOS at least for
now, just to be safe).  (That implies that for Aarch64-based macOS, it should
now work again to also use plain JREs.)

Change-Id: I3bcbb3c14e3a9e9dde39fd6f4572b632e05df9e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141508
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-10-18 19:15:07 +02:00

87 lines
2 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,jvmfwk))
$(eval $(call gb_Library_add_defs,jvmfwk,\
-DJVMFWK_DLLIMPLEMENTATION \
))
ifneq ($(JVM_ONE_PATH_CHECK),)
$(eval $(call gb_Library_add_defs,jvmfwk,\
-DJVM_ONE_PATH_CHECK=\"$(JVM_ONE_PATH_CHECK)\" \
))
endif
$(eval $(call gb_Library_set_include,jvmfwk,\
-I$(SRCDIR)/jvmfwk/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_use_api,jvmfwk,\
udkapi \
))
$(eval $(call gb_Library_use_libraries,jvmfwk,\
cppu \
cppuhelper \
sal \
salhelper \
))
ifeq ($(OS),ANDROID)
$(eval $(call gb_Library_use_libraries,jvmfwk,\
lo-bootstrap \
))
endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_use_system_win32_libs,jvmfwk,\
advapi32 \
))
endif
$(eval $(call gb_Library_use_externals,jvmfwk,\
boost_headers \
libxml2 \
valgrind \
))
ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_cxxflags,jvmfwk,\
$(gb_OBJCXXFLAGS) \
))
ifeq ($(CPUNAME),X86_64)
$(eval $(call gb_Library_add_objcxxobjects,jvmfwk,\
jvmfwk/plugins/sunmajor/pluginlib/util_cocoa \
))
endif
$(eval $(call gb_Library_add_libs,jvmfwk,\
-framework Foundation \
))
endif
$(eval $(call gb_Library_add_exception_objects,jvmfwk,\
jvmfwk/plugins/sunmajor/pluginlib/otherjre \
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin \
jvmfwk/plugins/sunmajor/pluginlib/sunjre \
jvmfwk/plugins/sunmajor/pluginlib/sunversion \
jvmfwk/plugins/sunmajor/pluginlib/util \
jvmfwk/plugins/sunmajor/pluginlib/vendorbase \
jvmfwk/plugins/sunmajor/pluginlib/vendorlist \
jvmfwk/source/elements \
jvmfwk/source/framework \
jvmfwk/source/fwkbase \
jvmfwk/source/fwkutil \
jvmfwk/source/libxmlutil \
))
# vim:set noet sw=4 ts=4: