Merge pull request #295 from joshuawarner32/fix-windows-build

fix windows build
This commit is contained in:
Joel Dice 2014-07-15 12:31:10 -06:00
commit 4b7b3d2680
3 changed files with 15 additions and 2 deletions

View File

@ -754,6 +754,10 @@ openjdk-extra-cflags += $(classpath-extra-cflags)
find-tool = $(shell if ( command -v "$(1)$(2)" >/dev/null ); then (echo "$(1)$(2)") else (echo "$(2)"); fi) find-tool = $(shell if ( command -v "$(1)$(2)" >/dev/null ); then (echo "$(1)$(2)") else (echo "$(2)"); fi)
ifeq ($(build-platform),windows)
static-on-windows = -static
endif
ifeq ($(platform),windows) ifeq ($(platform),windows)
target-format = pe target-format = pe
@ -1987,7 +1991,7 @@ endif
$(generator): $(generator-objects) $(generator-lzma-objects) $(generator): $(generator-objects) $(generator-lzma-objects)
@echo "linking $(@)" @echo "linking $(@)"
$(build-ld-cpp) $(^) $(build-lflags) -o $(@) $(build-ld-cpp) $(^) $(build-lflags) $(static-on-windows) -o $(@)
$(openjdk-objects): $(build)/openjdk/%-openjdk.o: $(openjdk-src)/%.c \ $(openjdk-objects): $(build)/openjdk/%-openjdk.o: $(openjdk-src)/%.c \
$(openjdk-headers-dep) $(openjdk-headers-dep)

View File

@ -151,10 +151,14 @@ typedef intptr_t __attribute__((__may_alias__)) intptr_alias_t;
#if (defined ARCH_x86_32) || (defined ARCH_arm) #if (defined ARCH_x86_32) || (defined ARCH_arm)
#define LD "ld" #define LD "ld"
#if (defined _MSC_VER) || ((defined __MINGW32__) && __GNUC__ >= 4) #if (defined _MSC_VER) || ((defined __MINGW32__) && __GNUC__ >= 4)
#if (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
#define LLD "I64d" #define LLD "I64d"
#else #else
#define LLD "lld" #define LLD "lld"
#endif #endif
#else
#define LLD "lld"
#endif
#ifdef __APPLE__ #ifdef __APPLE__
#define ULD "lu" #define ULD "lu"
#define LX "lx" #define LX "lx"
@ -166,9 +170,14 @@ typedef intptr_t __attribute__((__may_alias__)) intptr_alias_t;
#define LD "ld" #define LD "ld"
#define LX "lx" #define LX "lx"
#if (defined _MSC_VER) || (defined __MINGW32__) #if (defined _MSC_VER) || (defined __MINGW32__)
#if (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
#define LLD "I64d" #define LLD "I64d"
#define ULD "I64x" #define ULD "I64x"
#else #else
#define LLD "lld"
#define ULD "llu"
#endif
#else
#ifdef __APPLE__ #ifdef __APPLE__
#define LLD "lld" #define LLD "lld"
#else #else

View File

@ -182,7 +182,7 @@ void* resolveNativeMethod(Thread* t,
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
// on windows, we also try the _%s@%d and %s@%d variants // on windows, we also try the _%s@%d and %s@%d variants
if (footprint == -1) { if (footprint == -1) {
footprint = methodParameterFootprint(t, method) + 1; footprint = method->parameterFootprint() + 1;
if (method->flags() & ACC_STATIC) { if (method->flags() & ACC_STATIC) {
++footprint; ++footprint;
} }