This is the port of gcc 2.8.0 for DJGPP. It comes as usual in
different zip-archives for the sources and the binaries.

The source archive gcc280s.zip contains all the sources to build
the C, C++ and OBJC compiler. But the binary archives are split
into three parts:

  gcc280b.zip  : The gcc.exe driver program and the C compiler.
                 It contains also the documentation.
  gpp280b.zip  : The C++ compiler and libstdcxx.a together with
                 needed header files.
  objc280b.zip : The OBJC compiler and libobjc.a and the needed
                 header files.

The archive gcc280b.zip is required also by gpp280b.zip and objc280b.zip.

Before you install gcc 2.8.0
============================

The DJGPP distribution of gcc 2.8.0 is now differnet to the one used
by gcc 2.7.x. Now the directory structure is more similar to the
unix systems and also all the DJGPP standard directories are hardcoded
already.

To get no trouble, should remove at least you old gcc installation
completely, especially the compilers (cc1.exe, cc1plus.exe ...) and
libgcc.a, because they will not overwritten by the new distribution.

If you don't remove them, and you don't modify your djgpp.env file,
gcc from gcc280b.zip will still uses these old binaries or the libgcc.a
because they are in directories, which are searched before the hardcoded
ones.

Additionally you can safely remove the [gcc] and [cpp] section from your
djgpp.env file, since the path-settings there are not longer needed, because
gcc (and cpp) is configured already in a way to search these directories
by default. If you have modified already these sections for instance to
have some of your own directories searched by default, you should leave
ony those directories there and remove the standard DJGPP directories.

Modifying the djgpp.env is not really neccessary, but recommended by me.

How to install the binary archives?
===================================

Install them like any other DJGPP binary archive:

- change to your DJGPP base directory (normally c:/djgpp) and unzip
  there the archive

  unzip gcc280b.zip

  (if you are using PKUNZIP, remember to use the -d switch!!)

and that's all.

Installing under Windows 95
===========================

If you want to install and use gcc under Windows 95 you should remember
that this OS can handle long and case sensetive filenames. Here ar three
cases:

1. Only long filenames
----------------------

Unzip the binaries with an unzip program, which can restore the long filenames
stored in the zip archive.

2. Only short filenames
-----------------------

Unzip the binaries with an unzip program, which doesn't know about long
filenames, or if your unzipper knows about them, please follow at first
the steps descripbed in the DJGPP FAQ 2.01 in section 
about setting the NameNumericTail to 0 __BEFORE__!!! unzipping the archives.

3. Long and short filenames at the same time
--------------------------------------------

Use an unzip program which can restore the long filenames and do the
same like under 2. when the unzipper knows about long filenames.


DJGPP specific hints for C++
============================

Since there are still some long filename problems, which could not be solved
in an easy way, there are some tricks to get all the functionallity in C++.
Especially some headers are renamed to get no confilcts with either each other
or with existing heeader files from libc.

I list here all the relevant header files and how they are named for DJGPP

Complex.h   -> _Complex.h
String.h    -> _String.h
Regex.h     -> _Regex.h
iostreamP.h -> _iostreamP.h

So there are now two ways to include these headers. Either use the DJGPP
specific name or use a new feature of the preprocessor cpp. It accepts now
a new commandline switch "-remap" which tells cpp to look in a directory
for a file named "header.gcc" and the it takes that file as a translation
table if a requested file was not found in the directory.

The DJGPP distribution of g++ and libg++ come already with these translation
files, but they are currently not used. To use them, you have to modify your
specs file to add the "-remap" switch to the call for cpp, since this switch
cannot passed to cpp from the gcc comanndline. Here is now a possible line
from the spec file in your lib/ directory:

*cpp:
-remap %{posix:-D_POSIX_SOURCE}

Rebuilding gcc from the sources
===============================

Requirememts
------------

To build gcc you need many GNU utilities installed. This includes at very
first bash and a symlink sh to it.

********
To get it, change to the DJGPP bin directory and type there

ln -s bash.exe sh.exe
********

Because it is really not possible for me to check for any needed program
I include here only a list of packages which you will need at least:

- fil316b.zip
- find41b.zip
- grep20b.zip
- mak3761b.zip
- sed118b.zip
- shl112b.zip
- txt119b.zip

And you need about 40 MB free disk space as minimum, when you build without
debugging information (with debug info I would guess about 50 MB)

Extracting the sources
----------------------

If you are running Windows 95 I strongly recommend to enable the use of
long filenames for DJGPP.

At first you should unzip the archive gcc280s.zip. The sources are _NOT_
the complete sources like the original gcc 2.8.0 distribution. I have
removed many files to save disk space which are not needed for the DJGPP
port. I removed also many of the older Changelog-files.

The sources are already configured, but if you want to reconfigure them,
please use _ONLY_ the script file 'djconfig.sh' instead of running the
configure script, since it does some tricks before running configure.
(read the comments inside this file!!). To run it you must have bash
installed and a symlink sh.exe to bash.exe.


Then to run the djconfig.sh script type

sh djconfig.sh [any-additional-paramter]


Similar to the djconfig.sh I made a script 'djmake.sh'. Like above:
Please use _ONLY_ this script instead of running a simply make (except
of course you know what you do).

Now you run make by typing

sh djmake.sh [any-additional-paramter]

as replacement for

make [any-additional-parameter]

Compiling in an other directory
-------------------------------

I recommend to compile in an other directory than the one where the sources
are. For this simply copy the two files 'djconfig.sh' and 'djmake.sh' in the
directory where you want to build gcc, modify djconfig.sh to customize there
the exact path to the sources and then use the two scripts like described
above.

Reporting bugs
==============

If you found a bug in gcc, please report it to the gcc bug adresses and _NOT_
(or at least not only) in the DJGPP news group. But if you think you found
a bug in the DJGPP related things, the please report in comp.os.msdos.djgpp
(the news group) or mail it to djgpp@delorie.com, which is the gateway to
the news group.

Please email me directly only in rare cases, if you think it is only of
interest for me, since I see the reports in comp.os.msdos.djgpp also.


  Have fun with gcc, Robert H”hne <robert.hoehne@gmx.net>
