make/bsd/makefiles/launcher.make

changeset 3473
e8a4934564b2
parent 3156
f08d439fab8c
child 3518
719f7007c8e8
     1.1 --- a/make/bsd/makefiles/launcher.make	Tue Jan 24 14:07:03 2012 -0500
     1.2 +++ b/make/bsd/makefiles/launcher.make	Tue Jan 24 19:33:14 2012 -0500
     1.3 @@ -50,7 +50,24 @@
     1.4    LIBS_LAUNCHER             += $(STATIC_STDCXX) $(LIBS)
     1.5  else
     1.6    LAUNCHER.o                 = launcher.o
     1.7 -  LFLAGS_LAUNCHER           += -L`pwd`
     1.8 +  LFLAGS_LAUNCHER           += -L`pwd` 
     1.9 +
    1.10 +  # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
    1.11 +  # freshly built JVM at ./libjvm.{so|dylib}.  This is accomplished by setting 
    1.12 +  # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM 
    1.13 +  # first.  Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is
    1.14 +  # statically linked with CoreFoundation framework libs. Unfortunately, gamma's
    1.15 +  # unique searchpath results in some unresolved symbols in the framework 
    1.16 +  # libraries, because JDK libraries are inadvertently discovered first on the
    1.17 +  # searchpath, e.g. libjpeg.  On Mac OS X, filenames are case *insensitive*.
    1.18 +  # So, the actual filename collision is libjpeg.dylib and libJPEG.dylib.
    1.19 +  # To resolve this, gamma needs to also statically link with the CoreFoundation 
    1.20 +  # framework libraries.
    1.21 +
    1.22 +  ifeq ($(OS_VENDOR),Darwin)
    1.23 +    LFLAGS_LAUNCHER         += -framework CoreFoundation 
    1.24 +  endif
    1.25 +
    1.26    LIBS_LAUNCHER             += -l$(JVM) $(LIBS)
    1.27  endif
    1.28  

mercurial