fix OS X OpenJDK 7 build

This commit is contained in:
Joel Dice 2012-03-11 16:26:46 -06:00
parent 1c2f516b68
commit 3820fec9d7
3 changed files with 61 additions and 19 deletions

View File

@ -310,7 +310,8 @@ ifeq ($(platform),darwin)
version-script-flag =
lflags = $(common-lflags) -ldl -framework CoreFoundation
ifneq ($(arch),arm)
lflags += -framework CoreServices
lflags += -framework CoreServices -framework SystemConfiguration \
-framework Security
endif
ifeq ($(bootimage),true)
bootimage-lflags = -Wl,-segprot,__RWX,rwx,rwx

View File

@ -236,9 +236,6 @@ else
openjdk-sources += \
$(openjdk-src)/solaris/native/common/jdk_util_md.c \
$(openjdk-src)/solaris/native/common/jni_util_md.c \
$(openjdk-src)/solaris/native/common/deps/syscalls_fp.c \
$(openjdk-src)/solaris/native/common/deps/gconf2/gconf_fp.c \
$(openjdk-src)/solaris/native/common/deps/glib2/gio_fp.c \
$(openjdk-src)/solaris/native/java/io/canonicalize_md.c \
$(openjdk-src)/solaris/native/java/io/Console_md.c \
$(openjdk-src)/solaris/native/java/io/FileDescriptor_md.c \
@ -276,25 +273,19 @@ else
$(openjdk-src)/solaris/native/sun/nio/ch/ServerSocketChannelImpl.c \
$(openjdk-src)/solaris/native/sun/nio/ch/SocketChannelImpl.c \
$(openjdk-src)/solaris/native/sun/nio/ch/SocketDispatcher.c \
$(openjdk-src)/solaris/native/sun/nio/ch/EPollArrayWrapper.c \
$(openjdk-src)/solaris/native/sun/nio/ch/PollArrayWrapper.c \
$(openjdk-src)/solaris/native/sun/nio/ch/InheritedChannel.c \
$(openjdk-src)/solaris/native/sun/nio/ch/NativeThread.c \
$(openjdk-src)/solaris/native/sun/nio/fs/UnixNativeDispatcher.c \
ifeq ($(platform),linux)
openjdk-sources += \
$(openjdk-src)/solaris/native/java/net/linux_close.c
endif
openjdk-headers-classes += \
java.net.PlainDatagramSocketImpl \
java.io.UnixFileSystem \
sun.nio.ch.InheritedChannel \
sun.nio.ch.EPollArrayWrapper \
sun.nio.fs.UnixNativeDispatcher \
openjdk-cflags += "-I$(openjdk-src)/solaris/javavm/export" \
openjdk-cflags += \
"-I$(openjdk-src)/solaris/javavm/export" \
"-I$(openjdk-src)/solaris/native/common" \
"-I$(openjdk-src)/solaris/native/java/io" \
"-I$(openjdk-src)/solaris/native/java/lang" \
@ -304,11 +295,34 @@ else
"-I$(openjdk-src)/solaris/native/sun/nio/ch" \
"-I$(openjdk-src)/solaris/javavm/include" \
"-I$(openjdk-src)/solaris/hpi/include" \
"-I$(openjdk-src)/solaris/native/common/deps" \
"-I$(openjdk-src)/solaris/native/common/deps/glib2" \
"-I$(openjdk-src)/solaris/native/common/deps/gconf2" \
$(shell pkg-config --cflags glib-2.0) \
$(shell pkg-config --cflags gconf-2.0)
"-I$(openjdk-src)/solaris/native/common/deps"
ifeq ($(platform),linux)
openjdk-sources += \
$(openjdk-src)/solaris/native/java/net/linux_close.c \
$(openjdk-src)/solaris/native/common/deps/syscalls_fp.c \
$(openjdk-src)/solaris/native/common/deps/gconf2/gconf_fp.c \
$(openjdk-src)/solaris/native/common/deps/glib2/gio_fp.c \
$(openjdk-src)/solaris/native/sun/nio/ch/EPollArrayWrapper.c
openjdk-headers-classes += \
sun.nio.ch.EPollArrayWrapper
openjdk-cflags += \
"-I$(openjdk-src)/solaris/native/common/deps/glib2" \
"-I$(openjdk-src)/solaris/native/common/deps/gconf2" \
$(shell pkg-config --cflags glib-2.0) \
$(shell pkg-config --cflags gconf-2.0)
endif
ifeq ($(platform),darwin)
openjdk-sources += \
$(openjdk-src)/solaris/native/java/lang/java_props_macosx.c \
$(openjdk-src)/solaris/native/java/net/bsd_close.c
openjdk-cflags += \
-DMACOSX
endif
endif
openjdk-local-sources = \

View File

@ -440,9 +440,14 @@ class MyClasspath : public Classpath {
PROTECT(t, class_);
object name = makeClassNameString(t, getClassName(t, class_));
PROTECT(t, name);
return vm::makeJclass
(t, 0, 0, name, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, class_);
object c = allocate(t, FixedSizeOfJclass, true);
setObjectClass(t, c, type(t, Machine::JclassType));
set(t, c, JclassName, name);
set(t, c, JclassVmClass, class_);
return c;
}
virtual object
@ -2299,6 +2304,24 @@ Avian_sun_misc_Unsafe_registerNatives
// ignore
}
extern "C" JNIEXPORT void
Avian_sun_misc_Perf_registerNatives
(Thread*, object, uintptr_t*)
{
// ignore
}
extern "C" JNIEXPORT int64_t
Avian_sun_misc_Perf_createLong
(Thread* t, object, uintptr_t*)
{
return reinterpret_cast<int64_t>
(t->m->processor->invoke
(t, resolveMethod
(t, root(t, Machine::BootLoader), "java/nio/ByteBuffer", "allocate",
"(I)Ljava/nio/ByteBuffer;"), 0, 8));
}
extern "C" JNIEXPORT int64_t
Avian_sun_misc_Unsafe_addressSize
(Thread*, object, uintptr_t*)
@ -2750,6 +2773,7 @@ Avian_sun_misc_Unsafe_copyMemory
memcpy(dst, src, count);
}
extern "C" JNIEXPORT void JNICALL
Avian_sun_misc_Unsafe_monitorEnter
(Thread* t, object, uintptr_t* arguments)
{
@ -5308,6 +5332,9 @@ extern "C" JNIEXPORT jboolean JNICALL
EXPORT(JVM_CX8Field)(JNIEnv*, jobject*, jfieldID*, jlong, jlong)
{ abort(); }
extern "C" JNIEXPORT void JNICALL
JVM_SetNativeThreadName(JNIEnv*, jobject, jstring) { abort(); }
} // namespace local
} // namespace