EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: cross compiling base on linux for win32
From: Martin Konrad <[email protected]>
To: "EPICS tech-talk" <[email protected]>
Date: Sun, 7 Feb 2010 13:30:16 +0100
Hi,
I just succeeded in cross compiling base and my IOC for win32-x86 on linux-x86 
and linux-x86_64 using MinGW.

For all of you who want to give it a try, here is what I did:

1. Copy the attached files to <base>/configure/os/
2. Set CROSS_COMPILER_TARGET_ARCHS=win32-x86-mingw in 
<base>/configure/CONFIG_SITE
3. cd <base> && make && make install

Everything works fine and my IOC seems to run cleanly under Windows 7 but I 
would feel better if I can run some tests. Are there any tools for testing 
cross builds?

I want to build my IOC for Linux _and_ Windows but this requires some files to 
be different (e.g. st.cmd). Is there a way to build for both platforms from one 
source directory?

Best regards

Martin

P.S.: I'm still using mingw32 3.4.4.20050522.1-2, mingw32-binutils 
2.16.91-20050827.1-2 and mingw32-runtime 3.8-1 even with Ubuntu 9.10 (Karmic) 
because newer packages in Debian/Ubuntu seem to be broken (some important libs 
for C++ exceptions etc. are missing).

-- 
Dipl. Phys. Martin Konrad
Technische Universität Darmstadt
Institut für Kernphysik
Schlossgartenstr. 9
64289 Darmstadt
Tel: 06151-16-5121
Fax: 06151-16-4321
# CONFIG.linux-x86.win32-x86-mingw
#
# Author: Martin Konrad
#         Institut fuer Kernphysik
#         Technische Universitaet Darmstadt
#         [email protected]
#
# Definitions for linux-x86 host - win32-x86-mingw target builds
# Sites may override these definitions in CONFIG_SITE.linux-x86.win32-x86-mingw
#------------------------------------------------------------------------------

include $(CONFIG)/os/CONFIG.Common.win32-x86-mingw

GNU_TARGET = mingw32
# prefix of compiler tools
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))

# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)

OP_SYS_LDLIBS = -lws2_32
# CONFIG.linux-x86_64.win32-x86-mingw
#
# Author: Martin Konrad
#         Institut fuer Kernphysik
#         Technische Universitaet Darmstadt
#         [email protected]
#
# Definitions for linux-x86_64 host - win32-x86-mingw target builds
# Sites may override these definitions in CONFIG_SITE.linux-x86_64.win32-x86-mingw
#------------------------------------------------------------------------------

include $(CONFIG)/os/CONFIG.Common.win32-x86-mingw

GNU_TARGET = mingw32
# prefix of compiler tools
CMPLR_SUFFIX =
CMPLR_PREFIX = $(addsuffix -,$(GNU_TARGET))

# No -fPIC avoids "-fPIC ignored for target (all code is position independent)"
SHRLIB_CFLAGS =
SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)
LOADABLE_SHRLIB_LDFLAGS = -shared -Wl,--out-implib,$(LIB_PREFIX)$*$(LIB_SUFFIX)

OP_SYS_LDLIBS = -lws2_32

Replies:
RE: cross compiling base on linux for win32 Davidsaver, Michael

Navigate by Date:
Prev: Re: edm : TwoDProfileMonitorClass : cropping/resizing image Kate Feng
Next: Re: epics on launchpad! Martin Konrad
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: do flnk-ed sequences of records get interrupted? Tim Mooney
Next: RE: cross compiling base on linux for win32 Davidsaver, Michael
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·