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

View File

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