diff --git a/classpath/java-lang.cpp b/classpath/java-lang.cpp index a550d048df..e47facf630 100644 --- a/classpath/java-lang.cpp +++ b/classpath/java-lang.cpp @@ -7,9 +7,9 @@ #include "jni-util.h" #ifdef __APPLE__ -#define SO_SUFFIX ".jnilib" +# define SO_SUFFIX ".jnilib" #else -#define SO_SUFFIX ".so" +# define SO_SUFFIX ".so" #endif #undef JNIEXPORT diff --git a/makefile b/makefile index 416f3218a7..96d49ce0ce 100644 --- a/makefile +++ b/makefile @@ -8,8 +8,9 @@ ifeq ($(arch),i686) arch = i386 endif -platform = $(shell uname -s) -ifeq ($(platform),Darwin) +platform = $(shell uname -s | tr [:upper:] [:lower:]) + +ifeq ($(platform),darwin) rdynamic = thread-cflags = shared = -dynamiclib @@ -25,7 +26,7 @@ endif mode = debug -bld = build/$(arch)/$(mode) +bld = build/$(platform)/$(arch)/$(mode) cls = build/classes src = src classpath = classpath @@ -62,9 +63,9 @@ ifeq ($(mode),stress-major) cflags += -O0 -g3 -DVM_STRESS -DVM_STRESS_MAJOR endif ifeq ($(mode),fast) -cflags += -O3 -DNDEBUG -strip = strip -show-size = ls -l +cflags += -g3 -O3 -DNDEBUG +#strip = strip +#show-size = ls -l endif cpp-objects = $(foreach x,$(1),$(patsubst $(2)/%.cpp,$(bld)/%.o,$(x))) diff --git a/src/common.h b/src/common.h index a379403efb..f9e9460a85 100644 --- a/src/common.h +++ b/src/common.h @@ -22,13 +22,13 @@ # define ULD "lu" # define LLD "ld" #else -#error "Unsupported architecture" +# error "Unsupported architecture" #endif #ifdef __APPLE__ -#define SO_SUFFIX ".jnilib" +# define SO_SUFFIX ".jnilib" #else -#define SO_SUFFIX ".so" +# define SO_SUFFIX ".so" #endif #define NO_RETURN __attribute__((noreturn)) diff --git a/src/system.cpp b/src/system.cpp index e1d7338d40..493d311833 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -15,7 +15,6 @@ #define ACQUIRE(x) MutexResource MAKE_NAME(mutexResource_) (x) - #ifdef __i386__ extern "C" uint64_t