From 1c9667104e498e9d3a5c8b5e338b40503455032f Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 25 Oct 2007 08:52:18 -0600 Subject: [PATCH 1/4] Fix incorrect format parameters --- src/interpret.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpret.cpp b/src/interpret.cpp index b847ee728c..4de84f038b 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -558,21 +558,21 @@ invokeNative(Thread* t, object method) case ByteField: case BooleanField: if (DebugRun) { - fprintf(stderr, "result: %"LLD"\n", static_cast(result)); + fprintf(stderr, "result: %"LD"\n", static_cast(result)); } pushInt(t, static_cast(result)); break; case CharField: if (DebugRun) { - fprintf(stderr, "result: %"LLD"\n", static_cast(result)); + fprintf(stderr, "result: %"LD"\n", static_cast(result)); } pushInt(t, static_cast(result)); break; case ShortField: if (DebugRun) { - fprintf(stderr, "result: %"LLD"\n", static_cast(result)); + fprintf(stderr, "result: %"LD"\n", static_cast(result)); } pushInt(t, static_cast(result)); break; From 782f7e8feb4a4a8c024bc1129d118797aa5cb5f2 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 25 Oct 2007 08:55:48 -0600 Subject: [PATCH 2/4] Fixes build parameters for Mac --- makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 47219923c6..5ab6d6a3b5 100644 --- a/makefile +++ b/makefile @@ -33,6 +33,9 @@ test = test build-cxx = g++ build-cc = gcc +pthread = -pthread +lpthread = -lpthread + cxx = $(build-cxx) cc = $(build-cc) ar = ar @@ -54,11 +57,6 @@ common-cflags = $(warnings) -fno-rtti -fno-exceptions \ -I$(JAVA_HOME)/include -idirafter $(src) -I$(bld) -D__STDC_LIMIT_MACROS \ -DBUILTIN_LIBRARIES=\"natives,tlscontext,scaler\" -cflags = $(common-cflags) -fPIC -fvisibility=hidden \ - -I$(JAVA_HOME)/include/linux -I$(src) -pthread - -lflags = -lpthread -ldl -lm -lz - system = posix asm = x86 @@ -66,6 +64,8 @@ ifeq ($(platform),darwin) rdynamic = thread-cflags = shared = -dynamiclib + pthread = + lpthread = endif ifeq ($(platform),windows) inc = /usr/local/win32/include @@ -84,6 +84,11 @@ ifeq ($(platform),windows) cflags = $(common-cflags) -I$(inc) endif +cflags = $(common-cflags) -fPIC -fvisibility=hidden \ + -I$(JAVA_HOME)/include/linux -I$(src) $(pthread) + +lflags = $(lpthread) -ldl -lm -lz + ifeq ($(mode),debug) cflags += -O0 -g3 endif @@ -275,7 +280,7 @@ endif $(executable): $(archive) @echo "linking $(@)" - $(cc) -Wl,--whole-archive $(^) -Wl,--no-whole-archive \ + $(cc) -Wl,-all_load $(^) \ $(lflags) $(rdynamic) -o $(@) @$(strip) --strip-all $(@) @$(show-size) $(@) From 5131cac38a41ccc6629d261266bdec2984a90400 Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 25 Oct 2007 08:58:44 -0600 Subject: [PATCH 3/4] Fix regression for non Mac OS X platforms linking in archives --- makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 5ab6d6a3b5..84b346ed49 100644 --- a/makefile +++ b/makefile @@ -59,6 +59,8 @@ common-cflags = $(warnings) -fno-rtti -fno-exceptions \ system = posix asm = x86 +begin-merge-archive = -Wl,--whole-archive +end-merge-archive = -Wl,--no-whole-archive ifeq ($(platform),darwin) rdynamic = @@ -66,6 +68,8 @@ ifeq ($(platform),darwin) shared = -dynamiclib pthread = lpthread = + begin-merge-archive = -Wl,-all_load + end-merge-archive = endif ifeq ($(platform),windows) inc = /usr/local/win32/include @@ -280,7 +284,7 @@ endif $(executable): $(archive) @echo "linking $(@)" - $(cc) -Wl,-all_load $(^) \ + $(cc) $(begin-merge-archive) -Wl,-all_load $(^) $(end-merge-archive) \ $(lflags) $(rdynamic) -o $(@) @$(strip) --strip-all $(@) @$(show-size) $(@) From b91307224d6f0f681fc4a4f7d6232fdfea74e41d Mon Sep 17 00:00:00 2001 From: Eric Scharff Date: Thu, 25 Oct 2007 09:03:24 -0600 Subject: [PATCH 4/4] Fixed broken mac commit --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 84b346ed49..52bf9e1fd5 100644 --- a/makefile +++ b/makefile @@ -284,7 +284,7 @@ endif $(executable): $(archive) @echo "linking $(@)" - $(cc) $(begin-merge-archive) -Wl,-all_load $(^) $(end-merge-archive) \ + $(cc) $(begin-merge-archive) $(^) $(end-merge-archive) \ $(lflags) $(rdynamic) -o $(@) @$(strip) --strip-all $(@) @$(show-size) $(@)