From f2c4b2c81e53fafd48965b770c96b56fe64e0422 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 4 Feb 2016 15:57:23 -0600 Subject: [PATCH] Add config for linux cross-compile to windows-x64-mingw --- .../os/CONFIG.linux-x86.windows-x64-mingw | 28 +++++++++++++++++++ .../os/CONFIG.linux-x86_64.windows-x64-mingw | 9 ++++++ .../CONFIG_SITE.linux-x86.windows-x64-mingw | 20 +++++++++++++ ...CONFIG_SITE.linux-x86_64.windows-x64-mingw | 8 ++++++ 4 files changed, 65 insertions(+) create mode 100644 configure/os/CONFIG.linux-x86.windows-x64-mingw create mode 100644 configure/os/CONFIG.linux-x86_64.windows-x64-mingw create mode 100644 configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw create mode 100644 configure/os/CONFIG_SITE.linux-x86_64.windows-x64-mingw diff --git a/configure/os/CONFIG.linux-x86.windows-x64-mingw b/configure/os/CONFIG.linux-x86.windows-x64-mingw new file mode 100644 index 000000000..3b5ba18b4 --- /dev/null +++ b/configure/os/CONFIG.linux-x86.windows-x64-mingw @@ -0,0 +1,28 @@ +# CONFIG.linux-x86.windows-x64-mingw +# +# Definitions for linux-x86 host windows-x64-mingw target builds +# Override these definitions in CONFIG_SITE.linux-x86.windows-x64-mingw +#------------------------------------------------------- + +# Include common gnu compiler definitions +include $(CONFIG)/CONFIG.gnuCommon + +# Add resource compiler +RCCMD = $(GNU_BIN)/$(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(INCLUDES) $< $@ + +# Remove -fPIC flags, add out-implib +SHRLIB_CFLAGS = +SHRLIB_LDFLAGS = -shared \ + -Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX) +LOADABLE_SHRLIB_LDFLAGS = -shared \ + -Wl,--out-implib,$(DLLSTUB_PREFIX)$*$(DLLSTUB_SUFFIX) + +# No need to explicitly link with gcc library +GNU_LDLIBS_YES = + +# Link with winsock2 +OP_SYS_LDLIBS = -lws2_32 + +# Use static compiler-support libraries +OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++ +# There is no compiler flag for static libwinpthread diff --git a/configure/os/CONFIG.linux-x86_64.windows-x64-mingw b/configure/os/CONFIG.linux-x86_64.windows-x64-mingw new file mode 100644 index 000000000..f84301266 --- /dev/null +++ b/configure/os/CONFIG.linux-x86_64.windows-x64-mingw @@ -0,0 +1,9 @@ +# CONFIG.linux-x86_64.windows-x64-mingw +# +# Definitions for linux-x86_64 host windows-x64-mingw target builds +# Override these definitions in CONFIG_SITE.linux-x86_64.windows-x64-mingw +#------------------------------------------------------- + +# Settings as for the linux-x86 host architecture +include $(CONFIG)/os/CONFIG.linux-x86.windows-x64-mingw + diff --git a/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw b/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw new file mode 100644 index 000000000..42cdc353b --- /dev/null +++ b/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw @@ -0,0 +1,20 @@ +# CONFIG_SITE.linux-x86.windows-x64-mingw +# +# Configuration for linux-x86 host windows-x64-mingw target builds +#------------------------------------------------------- + +# Early versions of the MinGW cross-build tools can only build +# static (non-DLL) libraries. For example RHEL's cross-gcc 4.4.6 +# needs these uncommented, cross-gcc 4.6.3 for Ubuntu does not: +#SHARED_LIBRARIES = NO +#STATIC_BUILD = YES + +# The cross-build tools are in $(GNU_DIR)/bin +# Default is /usr +#GNU_DIR = /usr/local + +# Different distribution cross-build packages use different prefixes: +# Ubuntu: +#CMPLR_PREFIX = i686-w64-mingw32- +# RHEL: +CMPLR_PREFIX = x86_64-w64-mingw32- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.windows-x64-mingw b/configure/os/CONFIG_SITE.linux-x86_64.windows-x64-mingw new file mode 100644 index 000000000..e98ac7a02 --- /dev/null +++ b/configure/os/CONFIG_SITE.linux-x86_64.windows-x64-mingw @@ -0,0 +1,8 @@ +# CONFIG_SITE.linux-x86_64.windows-x64-mingw +# +# Configuration for linux-x86_64 host windows-x64-mingw target builds +#------------------------------------------------------- + +# Inherit from the linux-x86 host architecture +include $(CONFIG)/os/CONFIG_SITE.linux-x86.windows-x64-mingw +