8012629: java.lang.UnsatisfiedLinkError exception throw by getAllFonts() on MacOSX
Reviewed-by: bae, prr
This commit is contained in:
parent
6a96b58ad4
commit
4e79febb74
@ -171,3 +171,13 @@ FILES_NO_MOTIF_c = \
|
||||
GLXSurfaceData.c \
|
||||
AccelGlyphCache.c \
|
||||
CUPSfuncs.c
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
FILES_NO_MOTIF_objc = \
|
||||
AWTFont.m \
|
||||
AWTStrike.m \
|
||||
CCharToGlyphMapper.m \
|
||||
CGGlyphImages.m \
|
||||
CGGlyphOutlines.m \
|
||||
CoreTextSupport.m
|
||||
endif # PLATFORM
|
||||
|
@ -187,3 +187,14 @@ FILES_export2 = \
|
||||
java/awt/dnd/DnDConstants.java \
|
||||
sun/awt/CausedFocusEvent.java
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
ifeq ($(HEADLESS), true)
|
||||
FILES_export += \
|
||||
sun/awt/SunHints.java \
|
||||
sun/font/CCharToGlyphMapper.java \
|
||||
sun/font/CFont.java \
|
||||
sun/font/CFontManager.java \
|
||||
sun/font/CStrike.java \
|
||||
sun/font/CStrikeDisposer.java
|
||||
endif # HEADLESS
|
||||
endif # PLATFORM
|
||||
|
@ -43,6 +43,10 @@ include $(BUILDDIR)/sun/awt/FILES_export_unix.gmk
|
||||
# compiled based on the motif version.
|
||||
FILES_c = $(FILES_NO_MOTIF_c)
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
FILES_objc = $(FILES_NO_MOTIF_objc)
|
||||
endif # PLATFORM
|
||||
|
||||
ifeq ($(PLATFORM), solaris)
|
||||
ifneq ($(ARCH), amd64)
|
||||
FILES_reorder += reorder-$(ARCH)
|
||||
@ -97,6 +101,10 @@ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe
|
||||
vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)/image
|
||||
vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
vpath %.m $(call NativeSrcDirList,,native/sun/font)
|
||||
endif # PLATFORM
|
||||
|
||||
#
|
||||
# Libraries to link in.
|
||||
#
|
||||
@ -192,13 +200,21 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
|
||||
$(EVENT_MODEL)
|
||||
|
||||
ifeq ($(PLATFORM), macosx)
|
||||
CPPFLAGS += -I$(CUPS_HEADERS_PATH)
|
||||
CPPFLAGS += -I$(CUPS_HEADERS_PATH) \
|
||||
$(call NativeSrcDirList,-I,native/sun/awt) \
|
||||
$(call NativeSrcDirList,-I,native/sun/font)
|
||||
|
||||
ifndef HEADLESS
|
||||
CPPFLAGS += -I$(MOTIF_DIR)/include \
|
||||
-I$(OPENWIN_HOME)/include
|
||||
LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
|
||||
|
||||
else
|
||||
LDFLAGS += -framework Accelerate \
|
||||
-framework ApplicationServices \
|
||||
-framework Cocoa \
|
||||
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
|
||||
-framework JavaNativeFoundation \
|
||||
-framework JavaRuntimeSupport
|
||||
endif # !HEADLESS
|
||||
endif # PLATFORM
|
||||
|
||||
|
@ -2314,6 +2314,10 @@ LIBAWT_HEADLESS_DIRS:=$(JDK_TOPDIR)/src/share/native/sun/font \
|
||||
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/opengl \
|
||||
$(JDK_TOPDIR)/src/solaris/native/sun/java2d/x11
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
LIBAWT_HEADLESS_DIRS+=$(JDK_TOPDIR)/src/macosx/native/sun/font
|
||||
endif
|
||||
|
||||
LIBAWT_HEADLESS_CFLAGS:=-DHEADLESS=true \
|
||||
-DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
|
||||
$(CUPS_CFLAGS) \
|
||||
@ -2328,6 +2332,12 @@ LIBAWT_HEADLESS_CFLAGS:=-DHEADLESS=true \
|
||||
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/jdga \
|
||||
$(foreach dir,$(LIBAWT_HEADLESS_DIRS),-I$(dir))
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
LIBAWT_HEADLESS_CFLAGS+=\
|
||||
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
|
||||
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
|
||||
endif
|
||||
|
||||
LIBAWT_HEADLESS_FILES:=\
|
||||
awt_Font.c \
|
||||
HeadlessToolkit.c \
|
||||
@ -2356,6 +2366,16 @@ LIBAWT_HEADLESS_FILES:=\
|
||||
AccelGlyphCache.c \
|
||||
CUPSfuncs.c
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
LIBAWT_HEADLESS_FILES+=\
|
||||
AWTFont.m \
|
||||
AWTStrike.m \
|
||||
CCharToGlyphMapper.m \
|
||||
CGGlyphImages.m \
|
||||
CGGlyphOutlines.m \
|
||||
CoreTextSupport.m
|
||||
endif
|
||||
|
||||
LIBAWT_HEADLESS_REORDER:=
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
@ -2382,7 +2402,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBAWT_HEADLESS,\
|
||||
REORDER:=$(LIBAWT_HEADLESS_REORDER), \
|
||||
LDFLAGS_SUFFIX_linux:=-ljvm -lawt -lm $(LIBDL) -ljava,\
|
||||
LDFLAGS_SUFFIX_solaris:=$(LIBDL) -ljvm -lawt -lm -ljava $(LIBCXX) -lc,\
|
||||
LDFLAGS_SUFFIX_macosx:=-ljvm $(LIBCXX) -lawt $(LIBDL) -ljava,\
|
||||
LDFLAGS_SUFFIX_macosx:=-ljvm $(LIBCXX) -lawt $(LIBDL) -ljava \
|
||||
-framework Accelerate \
|
||||
-framework ApplicationServices \
|
||||
-framework Cocoa \
|
||||
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
|
||||
-framework JavaNativeFoundation \
|
||||
-framework JavaRuntimeSupport,\
|
||||
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libawt_headless,\
|
||||
DEBUG_SYMBOLS:=$(DEBUG_ALL_BINARIES)))
|
||||
|
||||
|
@ -395,6 +395,7 @@ JNF_COCOA_EXIT(env);
|
||||
|
||||
#pragma mark --- Miscellaneous JNI ---
|
||||
|
||||
#ifndef HEADLESS
|
||||
/*
|
||||
* Class: sun_awt_PlatformFont
|
||||
* Method: initIDs
|
||||
@ -416,3 +417,4 @@ Java_sun_awt_FontDescriptor_initIDs
|
||||
(JNIEnv *env, jclass cls)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user