fix Windows openjdk (non-openjdk-src) build

This commit is contained in:
Joel Dice 2010-11-07 10:08:04 -07:00
parent e1b808024a
commit 33b945c10b
5 changed files with 700 additions and 508 deletions

View File

@ -64,6 +64,9 @@ ifdef openjdk
classpath-jar-dep = $(openjdk-jar-dep) classpath-jar-dep = $(openjdk-jar-dep)
javahome = $(embed-prefix)/javahomeJar javahome = $(embed-prefix)/javahomeJar
javahome-files = lib/zi javahome-files = lib/zi
ifeq ($(platform),windows)
javahome-files += lib/tzmappings
endif
javahome-object = $(build)/javahome-jar.o javahome-object = $(build)/javahome-jar.o
else else
options := $(options)-openjdk options := $(options)-openjdk
@ -210,12 +213,18 @@ ifeq ($(platform),windows)
cflags = -I$(inc) $(common-cflags) cflags = -I$(inc) $(common-cflags)
ifeq (,$(filter mingw32 cygwin,$(build-platform))) ifeq (,$(filter mingw32 cygwin,$(build-platform)))
cxx = i586-mingw32msvc-g++ cxx = x86_64-w64-mingw32-g++ -m32
cc = i586-mingw32msvc-gcc cc = x86_64-w64-mingw32-gcc -m32
dlltool = i586-mingw32msvc-dlltool dlltool = x86_64-w64-mingw32-dlltool -mi386 --as-flags=--32
ar = i586-mingw32msvc-ar ar = x86_64-w64-mingw32-ar
ranlib = i586-mingw32msvc-ranlib ranlib = x86_64-w64-mingw32-ranlib
strip = i586-mingw32msvc-strip strip = x86_64-w64-mingw32-strip --strip-all
# cxx = i586-mingw32msvc-g++
# cc = i586-mingw32msvc-gcc
# dlltool = i586-mingw32msvc-dlltool
# ar = i586-mingw32msvc-ar
# ranlib = i586-mingw32msvc-ranlib
# strip = i586-mingw32msvc-strip
else else
build-platform = windows build-platform = windows
common-cflags += "-I$(JAVA_HOME)/include/win32" common-cflags += "-I$(JAVA_HOME)/include/win32"

View File

@ -205,8 +205,7 @@ loadLibrary(Thread* t, const char* path, const char* name, bool mapName,
RUNTIME_ARRAY(char, fullName, fullNameLength + 1); RUNTIME_ARRAY(char, fullName, fullNameLength + 1);
snprintf(RUNTIME_ARRAY_BODY(fullName), fullNameLength + 1, snprintf(RUNTIME_ARRAY_BODY(fullName), fullNameLength + 1,
"%*s%c%s", token.length, token.s, t->m->system->fileSeparator(), "%*s/%s", token.length, token.s, name);
name);
lib = loadLibrary(t, RUNTIME_ARRAY_BODY(fullName)); lib = loadLibrary(t, RUNTIME_ARRAY_BODY(fullName));
if (lib) break; if (lib) break;

File diff suppressed because it is too large Load Diff

View File

@ -239,6 +239,10 @@
(type exceptionInInitializerError java/lang/ExceptionInInitializerError) (type exceptionInInitializerError java/lang/ExceptionInInitializerError)
(type ioException java/io/IOException)
(type fileNotFoundException java/io/FileNotFoundException)
(type incompatibleContinuationException (type incompatibleContinuationException
avian/IncompatibleContinuationException) avian/IncompatibleContinuationException)

View File

@ -485,7 +485,7 @@ class MySystem: public System {
virtual void disposeAll() { virtual void disposeAll() {
if (Verbose) { if (Verbose) {
fprintf(stderr, "close %p\n", handle); fprintf(stderr, "close %p\n", handle); fflush(stderr);
} }
if (name_) { if (name_) {
@ -736,7 +736,7 @@ class MySystem: public System {
if (handle) { if (handle) {
if (Verbose) { if (Verbose) {
fprintf(stderr, "open %s as %p\n", name, handle); fprintf(stderr, "open %s as %p\n", name, handle); fflush(stderr);
} }
char* n; char* n;
@ -751,6 +751,11 @@ class MySystem: public System {
return 0; return 0;
} else { } else {
if (Verbose) {
fprintf(stderr, "unable to open %s: %ld\n", name, GetLastError());
fflush(stderr);
}
return 1; return 1;
} }
} }