Skip to content

Commit

Permalink
Merge branch 'minimal-android-23' of https://github.com/johanvos/mobile
Browse files Browse the repository at this point in the history
… into minimal-android-23
  • Loading branch information
abhinayagarwal committed Feb 19, 2024
2 parents 26bb727 + 76bbe92 commit aba7111
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 12 deletions.
10 changes: 10 additions & 0 deletions configure-ios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# sample configure command for ios

bash configure \
--enable-headless-only \
--with-boot-jdk=/opt/jdk-22.jdk/Contents/Home \
--with-build-jdk=/opt/jdk-23.jdk/Contents/Home \
--openjdk-target=aarch64-macos-ios \
--with-cups-include=../support/cups-2.3.6 \
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk

4 changes: 2 additions & 2 deletions make/Main.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ define DeclareHotspotGensrcRecipe
JVM_VARIANT=$1)
endef

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotGensrcRecipe,$v)))
endif

Expand All @@ -260,7 +260,7 @@ define DeclareHotspotStaticLibsRecipe
JVM_VARIANT=$1 STATIC_LIBS=true)
endef

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
$(foreach v, $(JVM_VARIANTS), $(eval $(call DeclareHotspotStaticLibsRecipe,$v)))
endif

Expand Down
2 changes: 1 addition & 1 deletion make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ define SetupNativeCompilationBody

# If we are building static library, 'AR' on macosx/aix may not support @-file.
ifeq ($$($1_TYPE), STATIC_LIBRARY)
ifeq ($(call isTargetOs, macosx aix), true)
ifeq ($(call isTargetOs, macosx aix ios), true)
$1_LD_OBJ_ARG := `cat $$($1_OBJ_FILE_LIST)`
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion make/common/modules/LauncherCommon.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \

ifeq ($(call isTargetOs, ios), true)
LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/macosx/native/libjli
fi
endif

MACOSX_PLIST_DIR := $(TOPDIR)/src/java.base/macosx/native/launcher
JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.desktop/Gensrc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ifeq ($(call isTargetOs, windows), false)
include gensrc/GensrcIcons.gmk
endif

ifeq ($(call isTargetOs, linux aix android), true)
ifeq ($(call isTargetOs, linux aix android ios), true)
include gensrc/GensrcX11Wrappers.gmk
endif

Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.desktop/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ EXCLUDE_FILES += \
.template \
#

ifeq ($(call isTargetOs, macosx android), true)
ifeq ($(call isTargetOs, macosx android ios), true)
# exclude all X11 on Mac.
EXCLUDES += \
sun/awt/screencast \
Expand Down
4 changes: 2 additions & 2 deletions make/modules/java.desktop/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ $(call FillFindCache, $(wildcard $(TOPDIR)/src/java.desktop/*/native))
################################################################################
# Create the AWT/2D libraries

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
include lib/Awt2dLibraries.gmk
endif

################################################################################
# Create the libjsound library

ifeq ($(call isTargetOs, aix android), false)
ifeq ($(call isTargetOs, aix android ios), false)

LIBJSOUND_CFLAGS := \
$(ALSA_CFLAGS) \
Expand Down
2 changes: 1 addition & 1 deletion make/modules/java.instrument/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ else
endif
$(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, java)

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
TARGETS += $(BUILD_LIBINSTRUMENT)
endif

Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.hotspot.agent/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
LIBS_windows := dbgeng.lib $(WIN_JAVA_LIB), \
))

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
TARGETS += $(BUILD_LIBSA)
endif

Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.jdwp.agent/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \

$(BUILD_LIBJDWP): $(call FindLib, java.base, java)

ifeq ($(call isTargetOs, android), false)
ifeq ($(call isTargetOs, android ios), false)
TARGETS += $(BUILD_LIBJDWP)
endif

Expand Down
2 changes: 1 addition & 1 deletion make/modules/jdk.sctp/Lib.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ include LibCommon.gmk

ifeq ($(call isTargetOsType, unix), true)

ifeq ($(call isTargetOs, macosx aix), false)
ifeq ($(call isTargetOs, macosx ios aix), false)
$(eval $(call SetupJdkLibrary, BUILD_LIBSCTP, \
NAME := sctp, \
OPTIMIZATION := LOW, \
Expand Down
2 changes: 2 additions & 0 deletions src/java.base/macosx/native/libnio/fs/UTIFileTypeDetector.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Java_sun_nio_fs_UTIFileTypeDetector_probe0(JNIEnv* env, jobject ftd,

CFStringRef extension = toCFString(env, ext);
if (extension != NULL) {
#ifndef TARGET_IOS // deprecated on ios
CFStringRef uti =
UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
extension, NULL);
Expand All @@ -121,6 +122,7 @@ Java_sun_nio_fs_UTIFileTypeDetector_probe0(JNIEnv* env, jobject ftd,
CFRelease(mimeType);
}
}
#endif
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@
#include <sys/param.h>
#include <sys/mount.h>
#include <mach/mach.h>
#ifndef TARGET_IOS
#include <sys/proc_info.h>
#include <libproc.h>
#endif
#endif
#elif !defined(_AIX)
#include <sys/swap.h>
#endif
Expand Down Expand Up @@ -271,6 +273,7 @@ Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0
(JNIEnv *env, jobject mbean)
{
#ifdef __APPLE__
#ifndef TARGET_IOS
// This code is influenced by the darwin lsof source
pid_t my_pid;
struct proc_bsdinfo bsdinfo;
Expand Down Expand Up @@ -314,6 +317,9 @@ Java_com_sun_management_internal_OperatingSystemImpl_getOpenFileDescriptorCount0
free(fds);

return nfiles;
#else
return (100);
#endif
#elif defined(_ALLBSD_SOURCE)
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
Expand Down

0 comments on commit aba7111

Please sign in to comment.