This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Crosscompile

Attached are the shell scripts I wrote to use cygwin32 as a cross
linux/win95 compiler.

I tried to keep down disk space usage under both systems, so I used the
installed libs on my win95 system for the linux cross.

You'll have to edit the scripts to tell them where your cygwin32 source
tree lives, and where your vfat drives are mounted.

To use it this way, all system libraries must be in either
or H-i386-cygwin32/i386-cygwin32/lib, so I moved them all to H-...

ditto for the include files.

Unless you want to set up a linux cygnus libg++ you need a link in
/usr/include to your win32 include/g++ to compile c++ programs, the script
names this g++win32, and you have to remember to switch back and forth :^(,
or you could use -I

Your filesystems MUST! be mounted -b under cygwin32 before untaring the
header files under 95/NT to use the headers from all.tgz

Since linux/vfat dosen't understand cygwin32 symbolic links libc.a must be
copied to libg.a if you are using -g. ditto for curses/ncurses.

You might want to try it with, and without the %[cpp_cpu] in the linux
specs file, maybe it's just something wierd on my system.

typical command line

make CC=i386-cygwin32-gcc PATH=/usr/i386-cygwin32/bin:$PATH

This hasn't been tested extensivly, but I used the built compiler to
rebuild the libraries, and dll, and they seem to work. see SB.libs

> From: Gerhard Wesp <>
> To:
> Subject: Crosscompile
> Date: Thursday, March 06, 1997 2:00 AM
>  Hi all,
>  I'm in the position of having to develop a piece of software which
> should work on UNIX as well as Win95. The code uses sockets, i.e. I
> have to use wsock32.dll. 
>  I have Linux and Win95 on my PC, and I don't like rebooting into Windows
> and recompiling there everytime I change a bit of the code, so I was 
> wondering if it was possible to use gcc on Linux as a crosscompiler.
>  I tried the win32-{gcc,binutils,...} packages of Debian, but they don't
> really work (especially there are problems with include files). Moreover,
> they seem a bit outdated and basically come without documentation.
>  What steps would be necessary
> to use gcc as a crosscompiler?  Since the CPU is the same on Linux
> and on Win95, shouldn't it be sufficient to use just a specialized
> assembler and linker to create .obj's and then .exe's? Would it be
> possible to use the header files from e.g. M$ Visual C 4.00 with gcc?
>  Any hints are deeply appreciated!
> -Gerhard
> -
> For help on using this list, send a message to
> "" with one line of text: "help".

SB.cross (CROSS File)

SB.libs (LIBS File)

Ar_obj.dif (DIF File)

Gas.dif (DIF File)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]