mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
fix openjdk-src build failures on osx 10.9
This commit is contained in:
parent
a7469164fe
commit
773417ab2b
40
makefile
40
makefile
@ -98,6 +98,8 @@ endif
|
||||
|
||||
library-path = $(library-path-variable)=$(build)
|
||||
|
||||
|
||||
|
||||
ifneq ($(openjdk),)
|
||||
openjdk-arch = $(arch)
|
||||
ifeq ($(arch),x86_64)
|
||||
@ -596,6 +598,21 @@ ifeq ($(platform),darwin)
|
||||
$(common-cflags) -fPIC -fvisibility=hidden -I$(src)
|
||||
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 =
|
||||
lflags = $(common-lflags) -ldl -framework CoreFoundation
|
||||
|
||||
@ -1955,7 +1972,7 @@ ifeq ($(ios),true)
|
||||
endif
|
||||
$(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \
|
||||
$(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-headers-dep)
|
||||
@ -1984,37 +2001,38 @@ ifeq ($(platform),windows)
|
||||
> $(build)/openjdk/NetworkInterface.h
|
||||
echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h
|
||||
endif
|
||||
|
||||
ifeq ($(platform),darwin)
|
||||
mkdir -p $(build)/openjdk/netinet
|
||||
for file in \
|
||||
/usr/include/netinet/ip.h \
|
||||
/usr/include/netinet/in_systm.h \
|
||||
/usr/include/netinet/ip_icmp.h \
|
||||
/usr/include/netinet/in_var.h \
|
||||
/usr/include/netinet/icmp6.h \
|
||||
/usr/include/netinet/ip_var.h; do \
|
||||
$(sysroot)/usr/include/netinet/ip.h \
|
||||
$(sysroot)/usr/include/netinet/in_systm.h \
|
||||
$(sysroot)/usr/include/netinet/ip_icmp.h \
|
||||
$(sysroot)/usr/include/netinet/in_var.h \
|
||||
$(sysroot)/usr/include/netinet/icmp6.h \
|
||||
$(sysroot)/usr/include/netinet/ip_var.h; do \
|
||||
if [ ! -f "$(build)/openjdk/netinet/$$(basename $${file})" ]; then \
|
||||
ln "$${file}" "$(build)/openjdk/netinet/$$(basename $${file})"; \
|
||||
fi; \
|
||||
done
|
||||
mkdir -p $(build)/openjdk/netinet6
|
||||
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 \
|
||||
ln "$${file}" "$(build)/openjdk/netinet6/$$(basename $${file})"; \
|
||||
fi; \
|
||||
done
|
||||
mkdir -p $(build)/openjdk/net
|
||||
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 \
|
||||
ln "$${file}" "$(build)/openjdk/net/$$(basename $${file})"; \
|
||||
fi; \
|
||||
done
|
||||
mkdir -p $(build)/openjdk/sys
|
||||
for file in \
|
||||
/usr/include/sys/kern_event.h \
|
||||
/usr/include/sys/sys_domain.h; do \
|
||||
$(sysroot)/usr/include/sys/kern_event.h \
|
||||
$(sysroot)/usr/include/sys/sys_domain.h; do \
|
||||
if [ ! -f "$(build)/openjdk/sys/$$(basename $${file})" ]; then \
|
||||
ln "$${file}" "$(build)/openjdk/sys/$$(basename $${file})"; \
|
||||
fi; \
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
using namespace vm;
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
extern "C" AVIAN_EXPORT jint JNICALL
|
||||
net_JNI_OnLoad(JavaVM*, void*)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
extern "C" AVIAN_EXPORT jint JNICALL
|
||||
management_JNI_OnLoad(JavaVM*, void*)
|
||||
{
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user