public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Linux->Win32 cross compiler ?
@ 1998-11-02 11:35 Felix E. Klee
  1998-11-04  4:32 ` Stipe Tolj
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Felix E. Klee @ 1998-11-02 11:35 UTC (permalink / raw)
  To: gnu-win32

Hi,

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

TIA,

Felix

-- 
mailto:felix.klee@inka.de
http://sites.inka.de/sites/klee
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux->Win32 cross compiler ?
  1998-11-02 11:35 Linux->Win32 cross compiler ? Felix E. Klee
@ 1998-11-04  4:32 ` Stipe Tolj
  1998-11-05  8:05   ` Kai Ruottu
  1998-11-04 22:40 ` Building cross cygwin b20 tools [Re: Linux->Win32 cross compiler ?] Mumit Khan
  1998-11-05  2:58 ` Linux->Win32 cross compiler ? Peter Dalgaard BSA
  2 siblings, 1 reply; 5+ messages in thread
From: Stipe Tolj @ 1998-11-04  4:32 UTC (permalink / raw)
  To: Felix E. Klee; +Cc: gnu-win32

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

I don't thing so, but let me now if you get more positive response on that.

Regards,
Stipe

--
Stipe Tolj <tolj@uni-duesseldorf.de>
Cygwin32 Porting Project
Department of Economical Computer Science
University of Cologne, Germany
http://www-public.rz.uni-duesseldorf.de/~tolj




-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Building cross cygwin b20 tools [Re: Linux->Win32 cross compiler ?]
  1998-11-02 11:35 Linux->Win32 cross compiler ? Felix E. Klee
  1998-11-04  4:32 ` Stipe Tolj
@ 1998-11-04 22:40 ` Mumit Khan
  1998-11-05  2:58 ` Linux->Win32 cross compiler ? Peter Dalgaard BSA
  2 siblings, 0 replies; 5+ messages in thread
From: Mumit Khan @ 1998-11-04 22:40 UTC (permalink / raw)
  To: Felix E. Klee; +Cc: gnu-win32

On Mon, 2 Nov 1998, Felix E. Klee wrote:

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

============ building CROSS

You can always build one yourself. Download the CDK source, and do the
following:
  
  $ mkdir <srcdir>/cygwin-b20
  $ cd <srcdir>/cygwin-b20
  $ tar zxvf /tmp/dev-src.tar.gz
  $ cd src
  $ mkdir CROSS
  $ cd CROSS
  $ ../configure --prefix=/usr/local/cygb20 --target=i386-cygwin32 -v
  $ make > make.log 2>&1
  [ check for errors . If OK ]
  $ make install > install.log 2>&1

After you're done, add it to path (if you're using a bourne-shell
compatible, otherwise use csh syntax).
  
  $ export PATH=$PATH:/usr/local/cygb20/bin
  $ i386-cygwin32-gcc -v
  [ should report egcs-1.1 etc ]

All the binaries for i386-cygwin32 target are prefixed with i386-cygwin32-
prefix.

============ building NATIVE tools using CROSS tools just built.

Now if you want to build native tools on eg., a i686-pc-linux-gnu box with 
the same pathnames that wCygnus uses:

  $ cd <srcdir>/cygwin-b20/src
  $ mkdir NATIVE
  $ cd NATIVE
  $ ../configure --prefix=/Cygnus/cygwin-b20 \
    --exec-prefix=/Cygnus/cygwin-b20/H-i586-cygwin32 \
    --target=i386-cygwin32 --host=i386-cygwin32 \
    --build=i686-pc-linux-gnu -v
  $ make > make.log 2>&1
  [ check for errors . If OK ]

Now of course, you want to install it to a *DIFFERENT* location than
/Cygnus/cygwin-b20 on your Unix host before creating an archive to
copy to a Cygwin box. Let's say you first install it to /tmp/cygwin.

  $ make prefix=/tmp/cygwin exec_prefix=/tmp/cygwin/H-i586-cygwin32 \
    install > install.log 2>&1
  $ cd /tmp/cygwin
  $ tar zcvf /tmp/dev-cygwin-b20.tar.gz .

Copy /tmp/dev-cygwin-b20.tar.gz to your Cygwin box and unpack:
  
  [win32]$ cd /Cygnus/cygwin-b20
  [win32]$ tar zxvf /tmp/dev-cygwin-b20.tar.gz

Regards,
Mumit


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux->Win32 cross compiler ?
  1998-11-02 11:35 Linux->Win32 cross compiler ? Felix E. Klee
  1998-11-04  4:32 ` Stipe Tolj
  1998-11-04 22:40 ` Building cross cygwin b20 tools [Re: Linux->Win32 cross compiler ?] Mumit Khan
@ 1998-11-05  2:58 ` Peter Dalgaard BSA
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Dalgaard BSA @ 1998-11-05  2:58 UTC (permalink / raw)
  To: Felix E. Klee; +Cc: gnu-win32

"Felix E. Klee" <felix.klee@inka.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.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Linux->Win32 cross compiler ?
  1998-11-04  4:32 ` Stipe Tolj
@ 1998-11-05  8:05   ` Kai Ruottu
  0 siblings, 0 replies; 5+ messages in thread
From: Kai Ruottu @ 1998-11-05  8:05 UTC (permalink / raw)
  To: gnu-win32

> > does anyone know if a cross compiler exists for Linux which
> > creates Win32 executables just like gnuwin32 does?
> 
> I don't thing so, but let me now if you get more positive response
> on that.

 These beasts really exist, I have three, a gcc-2.8.1 one, which I
use as my 'production compiler', and egcs-1.03 and egcs-1.1, both
built to be as references if something weird happens... All three
use the cygwin32 b19 libs and headers and work under RedHat 4.0 with
kernel 2.0.35 and libc-5.4.44...

 Mumit has one, Jan Jaap had a 2.8.1 for mingw32 target... (I have
probably built egcs-1.03 and 1.1 for Mingw32 target some time ago)
Quite many have these, but when the attitude is 'I want to learn
how to do it myself', there aren't much interest to ready-to-run
binaries for anything else than the base Linux distributions...

 Then there are the questions about using 'libc6' or 'libc5', which 
'libbfd.so's to use and so on. Perhaps just saying 'Linux' is not
saying anything, but 'RedHat 5.1' or 'S.u.S.E 5.03' is... (have we
now lost the 'standard Linux' for ever...). Releasing binary stuff
to Win32 seems to be much easier.

 Cheers, Kai

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1998-11-05  8:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-02 11:35 Linux->Win32 cross compiler ? Felix E. Klee
1998-11-04  4:32 ` Stipe Tolj
1998-11-05  8:05   ` Kai Ruottu
1998-11-04 22:40 ` Building cross cygwin b20 tools [Re: Linux->Win32 cross compiler ?] Mumit Khan
1998-11-05  2:58 ` Linux->Win32 cross compiler ? Peter Dalgaard BSA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).