fix non-embedded openjdk build on OS X

The JRE lib dir for OpenJDK 7 on OS X seems to be just "lib", not
e.g. "lib/amd64" by default, so we use that now.  Also, the default
library compatibility version for libjvm.dylib is 0.0.0, but OpenJDK
wants 1.0.0, so we set it explicitly.
This commit is contained in:
Joel Dice 2012-03-16 11:01:20 -06:00
parent d78247ab9a
commit 333b6c59d4
2 changed files with 11 additions and 3 deletions

View File

@ -113,8 +113,13 @@ ifneq ($(openjdk),)
else else
options := $(options)-openjdk options := $(options)-openjdk
test-executable = $(shell pwd)/$(executable-dynamic) test-executable = $(shell pwd)/$(executable-dynamic)
ifeq ($(build-platform),darwin)
library-path = \
$(library-path-variable)=$(build):$(openjdk)/jre/lib
else
library-path = \ library-path = \
$(library-path-variable)=$(build):$(openjdk)/jre/lib/$(openjdk-arch) $(library-path-variable)=$(build):$(openjdk)/jre/lib/$(openjdk-arch)
endif
javahome = "$$($(native-path) "$(openjdk)/jre")" javahome = "$$($(native-path) "$(openjdk)/jre")"
endif endif
@ -308,7 +313,8 @@ ifeq ($(platform),darwin)
endif endif
version-script-flag = version-script-flag =
lflags = $(common-lflags) -ldl -framework CoreFoundation lflags = $(common-lflags) -ldl -framework CoreFoundation \
-Wl,-compatibility_version,1.0.0
ifneq ($(arch),arm) ifneq ($(arch),arm)
lflags += -framework CoreServices -framework SystemConfiguration \ lflags += -framework CoreServices -framework SystemConfiguration \
-framework Security -framework Security

View File

@ -410,6 +410,8 @@ class MyClasspath : public Classpath {
sb.append(javaHome); sb.append(javaHome);
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
sb.append("/bin"); sb.append("/bin");
#elif defined __APPLE__
sb.append("/lib");
#elif defined ARCH_x86_64 #elif defined ARCH_x86_64
sb.append("/lib/amd64"); sb.append("/lib/amd64");
#else #else