mirror of
https://github.com/corda/corda.git
synced 2025-01-04 04:04:27 +00:00
fix MSYS/MinGW build
MinGW defines __STRICT_ANSI__ when -std=c++0x is specified, which we have to override in order to get e.g. strdup. Also, we need to specify -D_WIN32_WINNT=0x0500 to get post-Windows-2000 functions like GetModuleHandleEx. Finally, it seems that GCC 4.8.1 wants us to use %I64d instead of %lld on Windows.
This commit is contained in:
parent
82952b29d9
commit
347a56824a
6
makefile
6
makefile
@ -240,7 +240,6 @@ ifneq ($(android),)
|
|||||||
-g3 \
|
-g3 \
|
||||||
-Werror \
|
-Werror \
|
||||||
-Wno-shift-count-overflow
|
-Wno-shift-count-overflow
|
||||||
|
|
||||||
|
|
||||||
# on Windows (in MinGW-based build) there are neither __BEGIN_DECLS nor __END_DECLS
|
# on Windows (in MinGW-based build) there are neither __BEGIN_DECLS nor __END_DECLS
|
||||||
# defines; we don't want to patch every file that uses them, so we stub them in
|
# defines; we don't want to patch every file that uses them, so we stub them in
|
||||||
@ -815,7 +814,7 @@ ifeq ($(platform),windows)
|
|||||||
rpath =
|
rpath =
|
||||||
|
|
||||||
lflags = -L$(lib) $(common-lflags) -lws2_32 -liphlpapi -mconsole
|
lflags = -L$(lib) $(common-lflags) -lws2_32 -liphlpapi -mconsole
|
||||||
cflags = -I$(inc) $(common-cflags) -DWINVER=0x0500
|
cflags = -I$(inc) $(common-cflags) -DWINVER=0x0500 -U__STRICT_ANSI__
|
||||||
|
|
||||||
ifeq (,$(filter mingw32 cygwin,$(build-platform)))
|
ifeq (,$(filter mingw32 cygwin,$(build-platform)))
|
||||||
openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive
|
openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive
|
||||||
@ -831,7 +830,8 @@ ifeq ($(platform),windows)
|
|||||||
build-system = windows
|
build-system = windows
|
||||||
static-on-windows = -static
|
static-on-windows = -static
|
||||||
common-cflags += "-I$(JAVA_HOME)/include/win32"
|
common-cflags += "-I$(JAVA_HOME)/include/win32"
|
||||||
build-cflags = $(common-cflags) -I$(src) -I$(inc) -mthreads
|
build-cflags = $(common-cflags) -I$(src) -I$(inc) -mthreads \
|
||||||
|
-D_WIN32_WINNT=0x0500
|
||||||
openjdk-extra-cflags =
|
openjdk-extra-cflags =
|
||||||
build-lflags = -L$(lib) $(common-lflags)
|
build-lflags = -L$(lib) $(common-lflags)
|
||||||
ifeq ($(build-platform),cygwin)
|
ifeq ($(build-platform),cygwin)
|
||||||
|
@ -135,7 +135,7 @@ 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)
|
#if (__GNUC__ == 4 && __GNUC_MINOR__ <= 8)
|
||||||
#define LLD "I64d"
|
#define LLD "I64d"
|
||||||
#else
|
#else
|
||||||
#define LLD "lld"
|
#define LLD "lld"
|
||||||
|
Loading…
Reference in New Issue
Block a user