Q: I want to use DJGPP as a cross-compiler for Motorola 68K targets.
How should I proceed about this?
Q: I want to build GCC as a Unix-to-DOS cross-compiler. What should I
A: If you want a cross-compiler for m68k on a DOS machine, you need
DJGPP configured as
Such a package is already available. The binaries there are
based on GCC 2.7.2. This package is reportedly no longer supported, but
if you have questions about it, you can send them to Jim Karpinski. You can also try to contact Kai Ruottu, who is the provider of DOS-hosted
gcc-m68k. Note that this package has only basic support for C++:
the compiler is included, but the libraries, including
libg++, and the C++ headers are missing, so even
cout don't work.
A Win32-hosted gcc-m68k is another possibility. It was created by David Fiddes. The Cygwin port of GCC can also be configured as a cross-compiler with m68k as the target. See the description of the Cygwin project, for more details about the Cygwin port. Object Software Inc. is a company that supports cross-builds based on GCC and DJGPP. Pre-built binaries of the compiler and some minimal development tools are available from this site for m68k, PowerPC, and Hitachi's SH-3 targets, all based on DJGPP v2. The CrossGCC FAQ, available from the same site, includes detailed instructions for building a cross-compiler for any target.
DJGPP can be built and installed as a cross-compiler running on a Unix machine and targeting DOS/Windows platforms. Detailed instructions for doing this on Linux can be found in the DJGPP HOWTO Repository. Here is the summary of the necessary steps to do that:
v2/djcrx203.zipfrom the usual DJGPP sites.
djcrx203.zipon the Unix machine using
You must use the
-a switch, to force
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. Linux
systems generally come with
unzip, but if your system doesn't,
download the sources and build it.
crossdirectory to the top-level directory, where you unzipped
The main GNU site is at ftp.gnu.org.
cross/installthat was unpacked from
djcrx203.zipto build and install the cross compiler.
The cross-compiler you build is installed as
dos-gcc, so to
compile programs with it, use
dos-gcc rather than
gcc, or set
CC=dos-gcc when invoking Make.
cross/readme has some usage info for
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
build.cross script included in the
source distribution of the DJGPP port of GCC,
script was tested on GNU/Linux systems, and it allows to build GCC as a
cross compiler hosted on a GNU/Linux system whose target is
DJGPP-supported platforms. To use this script "out of the box", you
will need to take care of some preliminaries:
stubifyprogram is somewhere on your
djcrxNNNb.zippackage) are in the
gppNNNb.zippackage) are in the
i586-pc-msdosdjgppare on your
prefix/i586-pc-msdosdjgpp/version, where version is the version of GCC, exists.
Here, prefix is the root of your cross-development installation,