mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +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)
|
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
|
||||||
|
|
||||||
@ -1955,7 +1972,7 @@ ifeq ($(ios),true)
|
|||||||
endif
|
endif
|
||||||
$(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 +2001,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; \
|
||||||
|
@ -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