comparison make/bsd/makefiles/launcher.make @ 4846:e8a4934564b2

7125793: MAC: test_gamma should always work Summary: Fix gamma launcher on Mac OS X and reconcile test_gamma script on Unix platforms Reviewed-by: dcubed, ohair, jcoomes, dholmes, ksrini Contributed-by: james.melvin@oracle.com
author phh
date Tue, 24 Jan 2012 19:33:14 -0500
parents f08d439fab8c
children 719f7007c8e8
comparison
equal deleted inserted replaced
4843:d6660fedbab5 4846:e8a4934564b2
48 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) 48 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
49 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC) 49 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
50 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) 50 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
51 else 51 else
52 LAUNCHER.o = launcher.o 52 LAUNCHER.o = launcher.o
53 LFLAGS_LAUNCHER += -L`pwd` 53 LFLAGS_LAUNCHER += -L`pwd`
54
55 # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
56 # freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting
57 # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM
58 # first. Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is
59 # statically linked with CoreFoundation framework libs. Unfortunately, gamma's
60 # unique searchpath results in some unresolved symbols in the framework
61 # libraries, because JDK libraries are inadvertently discovered first on the
62 # searchpath, e.g. libjpeg. On Mac OS X, filenames are case *insensitive*.
63 # So, the actual filename collision is libjpeg.dylib and libJPEG.dylib.
64 # To resolve this, gamma needs to also statically link with the CoreFoundation
65 # framework libraries.
66
67 ifeq ($(OS_VENDOR),Darwin)
68 LFLAGS_LAUNCHER += -framework CoreFoundation
69 endif
70
54 LIBS_LAUNCHER += -l$(JVM) $(LIBS) 71 LIBS_LAUNCHER += -l$(JVM) $(LIBS)
55 endif 72 endif
56 73
57 LINK_LAUNCHER = $(LINK.c) 74 LINK_LAUNCHER = $(LINK.c)
58 75