25 # Rules to build gamma launcher, used by vm.make 26 27 28 LAUNCHER_SCRIPT = hotspot 29 LAUNCHER = gamma 30 31 LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher 32 LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher 33 LAUNCHERFLAGS := $(ARCHFLAG) \ 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ 35 -I$(LAUNCHERDIR_SHARE) \ 36 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ 37 -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \ 38 -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \ 39 -DARCH=\"$(LIBARCH)\" \ 40 -DGAMMA \ 41 -DLAUNCHER_TYPE=\"gamma\" \ 42 -DLINK_INTO_$(LINK_INTO) \ 43 $(TARGET_DEFINES) 44 # Give the launcher task_for_pid() privileges so that it can be used to run JStack, JInfo, et al. 45 LFLAGS_LAUNCHER += -sectcreate __TEXT __info_plist $(GAMMADIR)/src/os/bsd/launcher/Info-privileged.plist 46 47 ifeq ($(LINK_INTO),AOUT) 48 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) 49 LAUNCHER_MAPFILE = mapfile_reorder 50 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) 51 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC) 52 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) 53 else 54 LAUNCHER.o = launcher.o 55 LFLAGS_LAUNCHER += -L`pwd` 56 57 # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a 58 # freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting 59 # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM 60 # first. Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is 61 # statically linked with CoreFoundation framework libs. Unfortunately, gamma's 62 # unique searchpath results in some unresolved symbols in the framework 63 # libraries, because JDK libraries are inadvertently discovered first on the 64 # searchpath, e.g. libjpeg. On Mac OS X, filenames are case *insensitive*. 65 # So, the actual filename collision is libjpeg.dylib and libJPEG.dylib. | 25 # Rules to build gamma launcher, used by vm.make 26 27 28 LAUNCHER_SCRIPT = hotspot 29 LAUNCHER = gamma 30 31 LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher 32 LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher 33 LAUNCHERFLAGS := $(ARCHFLAG) \ 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ 35 -I$(LAUNCHERDIR_SHARE) \ 36 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ 37 -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \ 38 -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \ 39 -DARCH=\"$(LIBARCH)\" \ 40 -DGAMMA \ 41 -DLAUNCHER_TYPE=\"gamma\" \ 42 -DLINK_INTO_$(LINK_INTO) \ 43 $(TARGET_DEFINES) 44 # Give the launcher task_for_pid() privileges so that it can be used to run JStack, JInfo, et al. 45 ifeq ($(OS_VENDOR), Darwin) 46 LFLAGS_LAUNCHER += -sectcreate __TEXT __info_plist $(GAMMADIR)/src/os/bsd/launcher/Info-privileged.plist 47 endif 48 49 ifeq ($(LINK_INTO),AOUT) 50 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) 51 LAUNCHER_MAPFILE = mapfile_reorder 52 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) 53 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC) 54 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) 55 else 56 LAUNCHER.o = launcher.o 57 LFLAGS_LAUNCHER += -L`pwd` 58 59 # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a 60 # freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting 61 # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM 62 # first. Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is 63 # statically linked with CoreFoundation framework libs. Unfortunately, gamma's 64 # unique searchpath results in some unresolved symbols in the framework 65 # libraries, because JDK libraries are inadvertently discovered first on the 66 # searchpath, e.g. libjpeg. On Mac OS X, filenames are case *insensitive*. 67 # So, the actual filename collision is libjpeg.dylib and libJPEG.dylib. |