fix linux->darwin cross-compile

There were two issues: the linux->darwin cross compiler is more stringent
about unused variables, and the makefile specified flags for building ON
darwin that were actually applicable whenever we are building FOR darwin.
This commit is contained in:
Joshua Warner 2013-06-04 13:32:22 -06:00
parent cb11e21f95
commit de21913d13
2 changed files with 9 additions and 9 deletions

View File

@ -106,7 +106,7 @@ ifneq ($(openjdk),)
ifneq ($(openjdk-src),) ifneq ($(openjdk-src),)
include openjdk-src.mk include openjdk-src.mk
options := $(options)-openjdk-src options := $(options)-openjdk-src
classpath-objects = $(openjdk-objects) $(openjdk-local-objects) classpath-objects = $(openjdk-objects) $(openjdk-local-objects)
classpath-cflags = -DAVIAN_OPENJDK_SRC -DBOOT_JAVAHOME classpath-cflags = -DAVIAN_OPENJDK_SRC -DBOOT_JAVAHOME
openjdk-jar-dep = $(build)/openjdk-jar.dep openjdk-jar-dep = $(build)/openjdk-jar.dep
@ -133,7 +133,7 @@ ifneq ($(openjdk),)
stub-sources = $(src)/openjdk/stubs.cpp stub-sources = $(src)/openjdk/stubs.cpp
stub-objects = $(call cpp-objects,$(stub-sources),$(src),$(build)) stub-objects = $(call cpp-objects,$(stub-sources),$(src),$(build))
else else
options := $(options)-openjdk options := $(options)-openjdk
test-executable = $(shell pwd)/$(executable-dynamic) test-executable = $(shell pwd)/$(executable-dynamic)
ifeq ($(build-platform),darwin) ifeq ($(build-platform),darwin)
library-path = \ library-path = \
@ -455,6 +455,9 @@ ifeq ($(build-platform),darwin)
cflags += -I/System/Library/Frameworks/JavaVM.framework/Headers/ \ cflags += -I/System/Library/Frameworks/JavaVM.framework/Headers/ \
-Wno-deprecated-declarations -Wno-deprecated-declarations
build-lflags += -framework CoreFoundation build-lflags += -framework CoreFoundation
endif
ifeq ($(platform),darwin)
soname-flag = soname-flag =
endif endif
@ -489,7 +492,7 @@ ifeq ($(platform),freebsd)
cflags = $(build-cflags) cflags = $(build-cflags)
endif endif
ifeq ($(platform),android) ifeq ($(platform),android)
ifeq ($(build-platform),cygwin) ifeq ($(build-platform),cygwin)
ndk = "$$(cygpath -u "$(ANDROID_NDK)")" ndk = "$$(cygpath -u "$(ANDROID_NDK)")"
else else
ndk = $(ANDROID_NDK) ndk = $(ANDROID_NDK)

View File

@ -600,19 +600,16 @@ intercept(Thread* t, object c, const char* name, const char* spec,
if (m) { if (m) {
PROTECT(t, m); PROTECT(t, m);
object clone; methodFlags(t, m) |= ACC_NATIVE;
if (updateRuntimeData) { if (updateRuntimeData) {
clone = methodClone(t, m); object clone = methodClone(t, m);
// make clone private to prevent vtable updates at compilation // make clone private to prevent vtable updates at compilation
// time. Otherwise, our interception might be bypassed by calls // time. Otherwise, our interception might be bypassed by calls
// through the vtable. // through the vtable.
methodFlags(t, clone) |= ACC_PRIVATE; methodFlags(t, clone) |= ACC_PRIVATE;
}
methodFlags(t, m) |= ACC_NATIVE;
if (updateRuntimeData) {
object native = makeNativeIntercept(t, function, true, clone); object native = makeNativeIntercept(t, function, true, clone);
PROTECT(t, native); PROTECT(t, native);