mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
Merge pull request #129 from joshuawarner32/openjdk-osx10.9-build-fix
Openjdk osx10.9 build fix
This commit is contained in:
commit
19274ee3d6
43
makefile
43
makefile
@ -98,6 +98,8 @@ endif
|
|||||||
|
|
||||||
library-path = $(library-path-variable)=$(build)
|
library-path = $(library-path-variable)=$(build)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(openjdk),)
|
ifneq ($(openjdk),)
|
||||||
openjdk-arch = $(arch)
|
openjdk-arch = $(arch)
|
||||||
ifeq ($(arch),x86_64)
|
ifeq ($(arch),x86_64)
|
||||||
@ -596,6 +598,21 @@ ifeq ($(platform),darwin)
|
|||||||
$(common-cflags) -fPIC -fvisibility=hidden -I$(src)
|
$(common-cflags) -fPIC -fvisibility=hidden -I$(src)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(ios),true)
|
||||||
|
platform-dir = $(developer-dir)/Platforms/MacOSX.platform
|
||||||
|
sdk-dir = $(platform-dir)/Developer/SDKs
|
||||||
|
|
||||||
|
mac-version := $(shell \
|
||||||
|
if test -d $(sdk-dir)/MacOSX10.9.sdk; then echo 10.9; \
|
||||||
|
elif test -d $(sdk-dir)/MacOSX10.8.sdk; then echo 10.8; \
|
||||||
|
elif test -d $(sdk-dir)/MacOSX10.7.sdk; then echo 10.7; \
|
||||||
|
elif test -d $(sdk-dir)/MacOSX10.6.sdk; then echo 10.6; \
|
||||||
|
else echo; fi)
|
||||||
|
|
||||||
|
sysroot = $(sdk-dir)/MacOSX$(mac-version).sdk
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
version-script-flag =
|
version-script-flag =
|
||||||
lflags = $(common-lflags) -ldl -framework CoreFoundation
|
lflags = $(common-lflags) -ldl -framework CoreFoundation
|
||||||
|
|
||||||
@ -1953,9 +1970,12 @@ ifeq ($(ios),true)
|
|||||||
< "$(openjdk-src)/solaris/native/java/lang/UNIXProcess_md.c" \
|
< "$(openjdk-src)/solaris/native/java/lang/UNIXProcess_md.c" \
|
||||||
> $(build)/openjdk/UNIXProcess_md.c
|
> $(build)/openjdk/UNIXProcess_md.c
|
||||||
endif
|
endif
|
||||||
|
if [ -f openjdk-patches/$(notdir $(<)).patch ]; then \
|
||||||
|
( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).patch; \
|
||||||
|
fi
|
||||||
$(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \
|
$(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \
|
||||||
$(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \
|
$(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \
|
||||||
$(call output,$(@))
|
$(call output,$(@)) -Wno-return-type
|
||||||
|
|
||||||
$(openjdk-local-objects): $(build)/openjdk/%-openjdk.o: $(src)/openjdk/%.c \
|
$(openjdk-local-objects): $(build)/openjdk/%-openjdk.o: $(src)/openjdk/%.c \
|
||||||
$(openjdk-headers-dep)
|
$(openjdk-headers-dep)
|
||||||
@ -1984,37 +2004,38 @@ ifeq ($(platform),windows)
|
|||||||
> $(build)/openjdk/NetworkInterface.h
|
> $(build)/openjdk/NetworkInterface.h
|
||||||
echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h
|
echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),darwin)
|
ifeq ($(platform),darwin)
|
||||||
mkdir -p $(build)/openjdk/netinet
|
mkdir -p $(build)/openjdk/netinet
|
||||||
for file in \
|
for file in \
|
||||||
/usr/include/netinet/ip.h \
|
$(sysroot)/usr/include/netinet/ip.h \
|
||||||
/usr/include/netinet/in_systm.h \
|
$(sysroot)/usr/include/netinet/in_systm.h \
|
||||||
/usr/include/netinet/ip_icmp.h \
|
$(sysroot)/usr/include/netinet/ip_icmp.h \
|
||||||
/usr/include/netinet/in_var.h \
|
$(sysroot)/usr/include/netinet/in_var.h \
|
||||||
/usr/include/netinet/icmp6.h \
|
$(sysroot)/usr/include/netinet/icmp6.h \
|
||||||
/usr/include/netinet/ip_var.h; do \
|
$(sysroot)/usr/include/netinet/ip_var.h; do \
|
||||||
if [ ! -f "$(build)/openjdk/netinet/$$(basename $${file})" ]; then \
|
if [ ! -f "$(build)/openjdk/netinet/$$(basename $${file})" ]; then \
|
||||||
ln "$${file}" "$(build)/openjdk/netinet/$$(basename $${file})"; \
|
ln "$${file}" "$(build)/openjdk/netinet/$$(basename $${file})"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
mkdir -p $(build)/openjdk/netinet6
|
mkdir -p $(build)/openjdk/netinet6
|
||||||
for file in \
|
for file in \
|
||||||
/usr/include/netinet6/in6_var.h; do \
|
$(sysroot)/usr/include/netinet6/in6_var.h; do \
|
||||||
if [ ! -f "$(build)/openjdk/netinet6/$$(basename $${file})" ]; then \
|
if [ ! -f "$(build)/openjdk/netinet6/$$(basename $${file})" ]; then \
|
||||||
ln "$${file}" "$(build)/openjdk/netinet6/$$(basename $${file})"; \
|
ln "$${file}" "$(build)/openjdk/netinet6/$$(basename $${file})"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
mkdir -p $(build)/openjdk/net
|
mkdir -p $(build)/openjdk/net
|
||||||
for file in \
|
for file in \
|
||||||
/usr/include/net/if_arp.h; do \
|
$(sysroot)/usr/include/net/if_arp.h; do \
|
||||||
if [ ! -f "$(build)/openjdk/net/$$(basename $${file})" ]; then \
|
if [ ! -f "$(build)/openjdk/net/$$(basename $${file})" ]; then \
|
||||||
ln "$${file}" "$(build)/openjdk/net/$$(basename $${file})"; \
|
ln "$${file}" "$(build)/openjdk/net/$$(basename $${file})"; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
mkdir -p $(build)/openjdk/sys
|
mkdir -p $(build)/openjdk/sys
|
||||||
for file in \
|
for file in \
|
||||||
/usr/include/sys/kern_event.h \
|
$(sysroot)/usr/include/sys/kern_event.h \
|
||||||
/usr/include/sys/sys_domain.h; do \
|
$(sysroot)/usr/include/sys/sys_domain.h; do \
|
||||||
if [ ! -f "$(build)/openjdk/sys/$$(basename $${file})" ]; then \
|
if [ ! -f "$(build)/openjdk/sys/$$(basename $${file})" ]; then \
|
||||||
ln "$${file}" "$(build)/openjdk/sys/$$(basename $${file})"; \
|
ln "$${file}" "$(build)/openjdk/sys/$$(basename $${file})"; \
|
||||||
fi; \
|
fi; \
|
||||||
|
15
openjdk-patches/java_props_macosx.c.patch
Normal file
15
openjdk-patches/java_props_macosx.c.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- openjdk/java_props_macosx.c
|
||||||
|
+++ openjdk/java_props_macosx.c
|
||||||
|
@@ -37,11 +37,7 @@
|
||||||
|
|
||||||
|
// need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded
|
||||||
|
static void *getJRSFramework() {
|
||||||
|
- static void *jrsFwk = NULL;
|
||||||
|
- if (jrsFwk == NULL) {
|
||||||
|
- jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL);
|
||||||
|
- }
|
||||||
|
- return jrsFwk;
|
||||||
|
+ return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *getPosixLocale(int cat) {
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
using namespace vm;
|
using namespace vm;
|
||||||
|
|
||||||
extern "C" JNIEXPORT jint JNICALL
|
extern "C" AVIAN_EXPORT jint JNICALL
|
||||||
net_JNI_OnLoad(JavaVM*, void*)
|
net_JNI_OnLoad(JavaVM*, void*)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT jint JNICALL
|
extern "C" AVIAN_EXPORT jint JNICALL
|
||||||
management_JNI_OnLoad(JavaVM*, void*)
|
management_JNI_OnLoad(JavaVM*, void*)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user