delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/05/23:06:57

From: p DOT dalgaard AT biostat DOT ku DOT dk (Peter Dalgaard BSA)
Subject: Re: Linux->Win32 cross compiler ?
5 Nov 1998 23:06:57 -0800 :
Message-ID: <x2k91a5rtz.fsf.cygnus.gnu-win32@blueberry.kubism.ku.dk>
References: <363E0910 DOT 312E20F1 AT inka DOT de>
To: "Felix E. Klee" <felix DOT klee AT inka DOT de>
Cc: gnu-win32 AT cygnus DOT com

"Felix E. Klee" <felix DOT klee AT inka DOT de> writes:

> does anyone know if a cross compiler exists for Linux which
> creates Win32 executables just like gnuwin32 does?

You can create a set of cross tools quite easily using the
binutils-2.9.1 and egcs-1.1b distributions if you just lift the
target-dependent stuff (libraries, include files) off of Mumit
Khan's toolkits (haven't tried gnuwin32, but mingw32 seems to have
worked quite easily for me although it hasn't received much testing
yet). Primary location is
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/

The basic steps for the mingw32 crosscompiler are (don't kill me if I
get this slightly wrong...):

[replace $cross, etc. as needed or set them as shell variables]

a) lift the i386-mingw32 subtree out of egcs-1.1-mingw32.zip and put
it into $cross

b) get and unpack binutils and egcs from one of the GNU mirror sites.
get and apply the patches from Mumit. Only the windres patch from
Anders Norlander and the Fortran time patches seem really important
for crossbuilding.

c) create separate build directories for binutils and egcs (this is
probably unnecessary, but it's nice to be able to clear out mistakes
completely with "rm -rf *" and some rather nasty things seem to happen
with the links if you run configure with wrong arguments and try to
rerun it).

d) cd $binu-bld 
$binu-src/configure --target=i386-mingw32 --prefix=$cross
make
make install

e) same thing with egcs

There are some older versions of linux->mingw32 gcc compilers already
packaged up as .rpm files, but the above should be simple enough to be
preferable. 

(Jan-Jaaps binaries at
ftp://agnes.dida.physik.uni-essen.de/home/janjaap/mingw32/linux/ are
for RedHat4.2 only - the RPMS_rh50/ appears to be empty, so you'd have
to build from SRPMS anyway.)
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p DOT dalgaard AT biostat DOT ku DOT dk)             FAX: (+45) 35327907
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019