Q: Can you explain in plain English the legal restrictions of
distributing programs compiled with DJGPP?
Q: Can I write commercial programs with DJGPP?
A: In most cases, you don't have to worry about any legal restrictions when you compile your programs with DJGPP. You only need to include information on how to get DJGPP, and a few other bits of information, as explained below, in the documentation of your software39.
Using the GNU C/C++ compiler doesn't make your programs subject to
any restrictions. The C library which comes with DJGPP is
free (unless you change the library sources, see below), which
means you are free to use the stock
libc.a in any way you like
(but please try to comply with basic rules of courtesy.)
Some functions from the DJGPP C library are under the BSD copyright
(their sources were taken from the Berkeley Software Distribution of
Unix). These are time-related functions
random and related
initstate are also
from the BSD distribution.
The BSD copyright used to require that your binary distribution displays an acknowledgment of the BSD origin of these functions somewhere in the docs and in all the ads. However, as of July 1999, the University of California at Berkeley withdrew that requirement, and does not require to include that blurb anymore.
So, if you write C programs and link them with the stock version of the DJGPP library, you only need to tell your recipients how to get the latest versions of DJGPP, and have absolutely nothing else to worry about.
The basic C++ classes and the Standard Template Library
libstdcxx.a) which come with DJGPP allow you to use them
binary-wise (i.e., without changing library sources) in your C++
programs without restrictions, unless you compile your programs
with a compiler other than Gcc (which won't happen if you work with
DJGPP). So C++ programs linked with the
-lstdcxx switch are
also free from any restrictions.
Only the library of additional GNU C++ classes (
requires that you provide your customers with source or object code of
the application, so they could relink the application with future or
modified versions of the C++ library. However, this library is
deprecated and chances are most C++ programs won't use it. (If you
intend to distribute commercial programs linked with the
library, you are strongly advised to read the GNU Library General Public
License which comes with the library, for rigorous definition of its
Two GNU packages,
Bison, are also special in that
using them to produce your programs doesn't place your programs under GPL
or LGPL. In other words, lexers produced by
Flex and parsers
Bison do not imply GPL/LGPL.
If you do use in your program any of the FSF sources that fall
under GPL/LGPL (like some of the GCC's sources, or the GNU
regex packages which come with many GNU programs), then you
must comply with the terms of GNU licenses when distributing your
programs; in this case your entire application becomes GPL. If that is
unacceptable to you, consider using the versions of
getopt from the DJGPP C library, which are not as powerful, but
are free from any restrictions.
You may ship any of the utilities developed specifically for DJGPP
(e.g., the floating-point emulator
emu387.dxe or the DPMI host
cwsdpmi.exe) and the C library, as distributed by DJ
Delorie, with your program with no other requirement besides telling
your customers how to get DJGPP for themselves.
If you do change the sources of either the C library or the utilities
distributed with the
djdev package, they, and the programs
developed with them, immediately fall under the GPL, the GNU License.
(The DJGPP library, if changed, falls under the LGPL.)
In practice this means that you cannot distribute any binaries made with
such a patched version of
libc.a without offering the recipient
full sources, including your own sources. However, if you find bugs in
the library or the utilities and submit your patches to DJ Delorie, DJ
allows to freely use and redistribute patched utilities and binaries
made with the patched version of
libc.a (even if no official
DJGPP version was released with your patches yet).
For the precise legal terms of DJGPP distribution, see the file
copying.dj via the Web. Latest versions of
djdevNNN.zip package also include that file, so look for it
in you DJGPP installation directory.
Note that the above says nothing about the legal aspects of contributed
GRX and others; you will need to read their docs
to find out.