www.delorie.com/djgpp/v2faq/faq179.html | search |
| Previous | Next | Up | Top |
Q: I want to build GCC as a Unix-to-DOS cross-compiler. What should I do?
cin
and cout
don't work. A Win32-hosted gcc-m68k is another possibility. It was created by David Fiddes. The Cygwin32 port of GCC can also be configured as a cross-compiler with m68k as the target. See the description of the Cygnus project, for more details about the Cygwin32 port.
DJGPP can be built and installed as a cross-compiler running on a Unix machine and targeting DOS/Windows platforms. Here are the necessary steps to do that:
You must use the -a switch, to force unzip
to convert any DOS-style text file with CR-LF pairs at the end of each line to Unix-style text files. If you
don't, things will break for you.
unzip
is available in source form from many FTP sites.
The main GNU site is at ftp.gnu.org.
dos-gcc
, so to compile programs with it, use dos-gcc
rather than cc
or gcc
, or set
CC=dos-gcc when invoking Make.
The file cross/readme has some usage info for dos-gcc
. It is generally correct, except that the version numbers for the various packages might not be up to date. You
should always use the latest releases of every package.
Another alternative is the RPM (Redhat Package Maintenance) distribution of the Linux to DOS cross-compiler, which is based on DJGPP v2.01 and includes everything you need to create DJGPP binaries on Linux (without running DOSEmu). This package has been built by James Soutter using the instructions above; you will need Linux and RPM 2.2.7. The RPM packaged cross-compiler is available from Redhat site; the sources are also available.
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)