diff --git a/makefile b/makefile old mode 100644 new mode 100755 index d390389a9a..26ac467041 --- a/makefile +++ b/makefile @@ -94,12 +94,12 @@ ifneq ($(openjdk),) lib/security/java.policy lib/security/cacerts local-policy = lib/security/local_policy.jar - ifeq ($(shell test -e $(openjdk)/$(local-policy) && echo found),found) + ifeq ($(shell test -e "$(openjdk)/$(local-policy)" && echo found),found) javahome-files += $(local-policy) endif export-policy = lib/security/US_export_policy.jar - ifeq ($(shell test -e $(openjdk)/$(export-policy) && echo found),found) + ifeq ($(shell test -e "$(openjdk)/$(export-policy)" && echo found),found) javahome-files += $(export-policy) endif @@ -181,7 +181,8 @@ endif build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \ "-I$(JAVA_HOME)/include/linux" -I$(src) -pthread -converter-cflags = -D__STDC_CONSTANT_MACROS -Isrc/binaryToObject +converter-cflags = -D__STDC_CONSTANT_MACROS -Isrc/binaryToObject \ + -fno-rtti -fno-exceptions cflags = $(build-cflags) @@ -333,15 +334,20 @@ ifeq ($(platform),windows) openjdk-extra-cflags = build-lflags = -L$(lib) $(common-lflags) ifeq ($(build-platform),cygwin) - build-lflags += -mno-cygwin - build-cflags += -mno-cygwin - openjdk-extra-cflags += -mno-cygwin - lflags += -mno-cygwin - cflags += -mno-cygwin + build-cxx = i686-w64-mingw32-g++ + build-cc = i686-w64-mingw32-gcc + dlltool = i686-w64-mingw32-dlltool + ar = i686-w64-mingw32-ar + ranlib = i686-w64-mingw32-ranlib + strip = i686-w64-mingw32-strip endif endif ifeq ($(arch),x86_64) + ifeq ($(build-platform),cygwin) + build-cxx = x86_64-w64-mingw32-g++ + build-cc = x86_64-w64-mingw32-gcc + endif cxx = x86_64-w64-mingw32-g++ $(mflag) cc = x86_64-w64-mingw32-gcc $(mflag) dlltool = x86_64-w64-mingw32-dlltool @@ -758,7 +764,7 @@ $(boot-javahome-object): $(src)/boot-javahome.cpp $(compile-object) $(build)/binaryToObject-main.o: $(src)/binaryToObject/main.cpp - $(build-cxx) -c $(^) -o $(@) + $(build-cxx) $(converter-cflags) -c $(^) -o $(@) $(build)/binaryToObject-elf64.o: $(src)/binaryToObject/elf.cpp $(build-cxx) $(converter-cflags) -DBITS_PER_WORD=64 -c $(^) -o $(@) @@ -776,7 +782,7 @@ $(build)/binaryToObject-pe.o: $(src)/binaryToObject/pe.cpp $(build-cxx) $(converter-cflags) -c $(^) -o $(@) $(converter): $(converter-objects) - $(build-cxx) $(^) -o $(@) + $(build-cc) $(^) -o $(@) $(build)/classpath.jar: $(classpath-dep) $(classpath-jar-dep) @echo "creating $(@)" @@ -930,8 +936,14 @@ ifeq ($(platform),windows) sed 's/^#ifdef _WIN64/#if 1/' \ < "$(openjdk-src)/windows/native/java/net/net_util_md.h" \ > $(build)/openjdk/net_util_md.h - cp "$(openjdk-src)/windows/native/java/net/NetworkInterface.h" \ - $(build)/openjdk/NetworkInterface.h + sed \ + -e 's/IpPrefix/hide_IpPrefix/' \ + -e 's/IpSuffix/hide_IpSuffix/' \ + -e 's/IpDad/hide_IpDad/' \ + -e 's/ScopeLevel/hide_ScopeLevel/' \ + -e 's/SCOPE_LEVEL/hide_SCOPE_LEVEL/' \ + < "$(openjdk-src)/windows/native/java/net/NetworkInterface.h" \ + > $(build)/openjdk/NetworkInterface.h echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h endif @touch $(@) diff --git a/openjdk-src.mk b/openjdk-src.mk index b050f75c94..ed0c42199b 100644 --- a/openjdk-src.mk +++ b/openjdk-src.mk @@ -184,6 +184,7 @@ ifeq ($(platform),windows) $(openjdk-src)/windows/native/java/lang/ProcessEnvironment_md.c \ $(openjdk-src)/windows/native/java/lang/ProcessImpl_md.c \ $(openjdk-src)/windows/native/java/net/net_util_md.c \ + $(openjdk-src)/windows/native/java/net/DualStackPlainSocketImpl.c \ $(openjdk-src)/windows/native/java/net/InetAddressImplFactory.c \ $(openjdk-src)/windows/native/java/net/Inet4AddressImpl.c \ $(openjdk-src)/windows/native/java/net/Inet6AddressImpl.c \ @@ -210,6 +211,7 @@ ifeq ($(platform),windows) $(openjdk-src)/windows/native/sun/security/provider/WinCAPISeedGenerator.c openjdk-headers-classes += \ + java.net.DualStackPlainSocketImpl \ java.lang.ProcessImpl \ sun.io.Win32ErrorMode \ sun.nio.ch.WindowsSelectorImpl \ @@ -225,7 +227,6 @@ ifeq ($(platform),windows) "-I$(root)/win32/include" \ -D_JNI_IMPLEMENTATION_ \ -D_JAVASOFT_WIN32_TYPEDEF_MD_H_ \ - -D_WINSOCK2API_ \ -Ds6_words=_s6_words \ -Ds6_bytes=_s6_bytes else diff --git a/readme.txt b/readme.txt index a17e553962..224fd2c8ee 100644 --- a/readme.txt +++ b/readme.txt @@ -162,8 +162,8 @@ Installing MSYS: Installing Cygwin: 1. Download and run setup.exe from cygwin.com, installing the base - system and these packages: make, gcc-mingw-g++, and (optionally) - git. + system and these packages: make, gcc-mingw-g++, + mingw64-i686-gcc-g++, mingw64-x86_64-gcc-g++, and (optionally) git. You may also find our win32 repository useful: (run this from the directory containing the avian directory)