Support MinGW cross-builds on linux-x86 and x86_64
This commit is contained in:
@ -34,7 +34,8 @@ ARCH_DEP_LDFLAGS += -m32
|
||||
# Override for -DUNIX from CONFIG.Common.UnixCommon
|
||||
OP_SYS_CPPFLAGS = -D_MINGW
|
||||
|
||||
EXE=.exe
|
||||
EXE = .exe
|
||||
RES = .coff
|
||||
|
||||
VISC_DLL_NO = -DEPICS_DLL_NO
|
||||
VISC_DLL_YES =
|
||||
|
22
configure/os/CONFIG.linux-x86.win32-x86-mingw
Normal file
22
configure/os/CONFIG.linux-x86.win32-x86-mingw
Normal file
@ -0,0 +1,22 @@
|
||||
# CONFIG.linux-x86.win32-x86-mingw
|
||||
#
|
||||
# Definitions for linux-x86 host win32-x86-mingw target builds
|
||||
# Override these definitions in CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Include common gnu compiler definitions
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
# Add resource compiler
|
||||
RCCMD = $(CMPLR_PREFIX)windres$(CMPLR_SUFFIX) $(INCLUDES) $< $@
|
||||
|
||||
# Remove -fPIC flags, add out-implib
|
||||
SHRLIB_CFLAGS =
|
||||
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
|
||||
|
||||
# Don't link with gcc library
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with winsock2
|
||||
OP_SYS_LDLIBS = -lws2_32
|
9
configure/os/CONFIG.linux-x86_64.win32-x86-mingw
Normal file
9
configure/os/CONFIG.linux-x86_64.win32-x86-mingw
Normal file
@ -0,0 +1,9 @@
|
||||
# CONFIG.linux-x86_64.win32-x86-mingw
|
||||
#
|
||||
# Definitions for linux-x86_64 host win32-x86-mingw target builds
|
||||
# Override these definitions in CONFIG_SITE.linux-x86_64.win32-x86-mingw
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Settings as for the linux-x86 host architecture
|
||||
include $(CONFIG)/os/CONFIG.linux-x86.win32-x86-mingw
|
||||
|
@ -9,22 +9,27 @@
|
||||
# Include common gnu compiler definitions
|
||||
include $(CONFIG)/CONFIG.gnuCommon
|
||||
|
||||
# Undo various things set by CONFIG.gnuCommon
|
||||
|
||||
CMPLR_PREFIX =
|
||||
|
||||
# Remove $(GNU_BIN)/ path
|
||||
CC = $(CMPLR_PREFIX)gcc
|
||||
CCC = $(CMPLR_PREFIX)g++
|
||||
AR = $(CMPLR_PREFIX)ar -rc
|
||||
LD = $(CMPLR_PREFIX)ld -r
|
||||
RANLIB = $(CMPLR_PREFIX)ranlib
|
||||
RES = .coff
|
||||
|
||||
# Add resource compiler
|
||||
RCCMD = $(CMPLR_PREFIX)windres $(INCLUDES) $< $@
|
||||
|
||||
# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
|
||||
# Remove -fPIC flags, add out-implib
|
||||
SHRLIB_CFLAGS =
|
||||
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
|
||||
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
|
||||
|
||||
# Override linking with gcc library from CONFIG.gnuCommon
|
||||
# Don't link with gcc library
|
||||
GNU_LDLIBS_YES =
|
||||
|
||||
# Link with winsock2
|
||||
OP_SYS_LDLIBS = -lws2_32
|
||||
|
@ -1,11 +1,9 @@
|
||||
# CONFIG_SITE.win32-x86-mingw.Common
|
||||
# CONFIG_SITE.Common.win32-x86-mingw
|
||||
#
|
||||
# $Revision-Id$
|
||||
#
|
||||
# Site Specific definitions for cygwin-x86 target
|
||||
# Only the local epics system manager should modify this file
|
||||
# Site Specific definitions for win32-x86-mingw target
|
||||
|
||||
# If readline is not installed comment the following line
|
||||
# to omit command-line editing and history support
|
||||
# If readline is available uncomment the following line
|
||||
# to enable command-line editing and history support
|
||||
#COMMANDLINE_LIBRARY = READLINE
|
||||
|
||||
|
23
configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
Normal file
23
configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw
Normal file
@ -0,0 +1,23 @@
|
||||
# CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
#
|
||||
# Configuration for linux-x86 host win32-x86-mingw target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Early versions of the MinGW cross-build tools can only build
|
||||
# static (non-DLL) libraries. Fedora's cross-build of gcc 4.4.6
|
||||
# needs these uncommented, other distributions have not been
|
||||
# tested with this release of Base:
|
||||
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 = i686-pc-mingw32-
|
||||
# Debian?
|
||||
#CMPLR_PREFIX = i586-mingw32msvc-
|
8
configure/os/CONFIG_SITE.linux-x86_64.win32-x86-mingw
Normal file
8
configure/os/CONFIG_SITE.linux-x86_64.win32-x86-mingw
Normal file
@ -0,0 +1,8 @@
|
||||
# CONFIG_SITE.linux-x86_64.win32-x86-mingw
|
||||
#
|
||||
# Configuration for linux-x86_64 host win32-x86-mingw target builds
|
||||
#-------------------------------------------------------
|
||||
|
||||
# Inherit from the linux-x86 host architecture
|
||||
include $(CONFIG)/os/CONFIG_SITE.linux-x86.win32-x86-mingw
|
||||
|
@ -3,15 +3,9 @@
|
||||
# $Revision-Id$
|
||||
#
|
||||
# Site Specific definitions for win32-x86-mingw target
|
||||
# Only the local epics system manager should modify this file
|
||||
|
||||
# The MinGW bin directory must be in your path.
|
||||
|
||||
# Uncomment the following settings for MinGW_w32 releases
|
||||
# <MinGW directory>/bin should be in your path
|
||||
#CMPLR_PREFIX=i686-w64-mingw32-
|
||||
#CC = $(CMPLR_PREFIX)gcc
|
||||
#CCC = $(CMPLR_PREFIX)g++
|
||||
#AR = $(CMPLR_PREFIX)ar -rc
|
||||
#LD = $(CMPLR_PREFIX)ld -r
|
||||
#RANLIB = $(CMPLR_PREFIX)ranlib
|
||||
|
||||
# Set the compiler prefix for your MinGW installation
|
||||
#CMPLR_PREFIX = i686-w64-mingw32-
|
||||
#CMPLR_PREFIX = i586-mingw32msvc-
|
||||
|
@ -13,6 +13,16 @@
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>MinGW Cross-builds from Linux</h3>
|
||||
|
||||
<p>Build configuration files have been back-ported from the 3.15 branch that
|
||||
allows cross-building of the win32-x86-mingw target from either linux-x86 or
|
||||
linux-x86_64 hosts. Many Linux distributions now package the necessary MinGW
|
||||
cross-build tools and libraries to support this. Adjust the settings in
|
||||
configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw and add win32-x86-mingw to
|
||||
the CROSS_COMPILER_TARGET_ARCHS variable in configure/CONFIG_SITE or in
|
||||
configure/os/CONFIG_SITE.linux-x86.Common.</p>
|
||||
|
||||
<h3>Build rules for RTEMS GESYS modules</h3>
|
||||
|
||||
<p>RTEMS target builds can now be configured to make GESYS modules by changing
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Winver.h>
|
||||
#include <winver.h>
|
||||
#include "epicsVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
|
Reference in New Issue
Block a user