Add config for linux cross-compile to windows-x64-mingw

This commit is contained in:
Andrew Johnson
2016-02-04 15:57:23 -06:00
parent 43cf5af621
commit f2c4b2c81e
4 changed files with 65 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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-

View File

@@ -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