delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/07/19:05:31

Message-Id: <199805072240.SAA18973@delorie.com>
From: "Andris Pavenis" <pavenis AT lanet DOT lv>
To: djgpp-announce AT delorie DOT com
Date: Thu, 7 May 1998 16:53:06 +0300
MIME-Version: 1.0
Subject: ANNOUNCE: gcc 2.8.1 and related things for DJGPP

This is the announcement for the port of gcc 2.8.1 , libstdc++ 2.8.1.1 
and libg++ 2.8.1.1 to DJGPP 

If you reply to this message, send it _NOT_ to
djgpp-announce AT delorie DOT com but use djgpp AT delorie DOT com instead.

The port includes the following archives:

  - gcc281b.zip    The binaries for gcc to compile C programs.
  
  - gpp281b.zip    The binaries to compile C++ programs and it
                   includes also libstdcxx.a (on unix known as
                   libstdc++.a)
                   
  - objc281b.zip   The binaries to compile Objective C programs
  
  - gcc281s.zip    The sources to rebuild the binaries from the
                   archives above
                   
  - lgp2811b.zip   The compiled library libgpp.a (on unix known
                   as libg++.a)
                   
  - lgp2811s.zip   The sources for libgpp

All these archives are available on

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/

and mirrors of it.

The archive gcc281b.zip is needed in any case. That means it is not
enough to download only gpp281b.zip when you want to compile only
C++ programs.

All the sources are already configured. But to make them, please read
the file README.DJGPP which is part of the archive, since it contains
more details about rebuilding from the sources.

Here now the first part of the file README.DJGPP, which describes the
installation process and some common problems which may occur.

Before you install gcc 2.8.1
============================

The DJGPP distribution of gcc 2.8.1 is now different from 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 gcc281b.zip will still uses these old binaries or the libgcc.a
because they are in directories, which are searched before the hardcoded
ones.

I also recommend remove files 'specs' and 'djgpp.djl' from %DJDIR/lib.
Archive gcc281b.zip contains replacement for these files which will
go to a different directory %DJDIR/lib/gcc-lib/djgpp/2.81.
If You have changed any of these 2 files You can consider to transfer
these changes to new files. It is possible to avoid removing these files
but don't do this unless You know what You are doing.

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
only those directories there and remove the standard DJGPP directories.

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

I'm including an example of modified DJGPP.ENV in directory gnu/gcc-2.81
I have tested it with gcc-2.8.1


NOTE for users of RHIDE-1.4
============================

The name of C++ library is now libstdcxx.a instead of libstdcx.a as it was
for port of gcc-2.7.2.1. RHIDE-1.4 uses latest name by default. I included
fix (section [rhide]) in example of DJGPP.ENV file mentioned above.
An alternate way is to add line (create new file if needed) 

RHIDE_TYPED_LIBS_DJGPP.cc=stdcxx

to file %DJDIR/share/rhide/rhide.env.


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 gcc281b.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 sensitive filenames. Here are 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 described 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 conflicts with either each other
or with existing header 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 commandline. Here is now a possible line
from the spec file in your lib/ directory:

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

Exception support under DJGPP
=============================

To use the new exception handling with DJGPP there are needed some
modifications to the specs file to include an additional startup file
and to the linker script. The binary archive gcc281b.zip comes with
these two files and installs them in

$DJDIR/lib/gcc-lib/djgpp/2.81/

Unfortunately if both following conditions 
  - gcc library search path contains $DJDIR/lib
  - $DJDIR/lib contains old versions of djgpp.djl and(or) specs from
    djdev201.zip
are true, then old files will be used errorously. If You have edited
DJGPP.ENV as recommended above (or used version supplied with archive
gcc281b.zip) correct version will be used. Anyway I recommend to 
remove old versions of these files from $DJDIR/lib.

Possible problems with exceptions handling under gcc-2.81
   Q) I'm getting SIGABRT instead of correct reaction to throw?
   A) This is most likely caused by reading old specs file. Best is
      to get rid of it.

   Q) I'm getting message about unresolved symbol from crtf.o
          c:\djgpp\lib\gcc-lib\djgpp\2.81\crtf.o(.text+0x9):crtfgo32.c: undefined 
          reference to `__EH_FRAME_BEGIN__'
   A) You are using old linker script (djgpp.djl) from $DJDIR/lib. Read this
      file completely for more info. Best is to get rid of it. Check also 
      whether You are using correct specs file (hint: use command line 
      option -v to gcc)



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

If you found a bug in gcc, please report it to the gcc bug addressees 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 AT delorie DOT com,
which is the gateway to the news group.

To get a hint, what could be a DJGPP related bug, you should remember
that in mostly any case, when you get the message, that an internal
error has occurred and it should be reported to the GNU bug address,
then this is mostly _NOT_ a DJGPP related bug but a core gcc bug.

DJGPP related bug are probably only because of wrong searched
directories (but please read at first the beginning of the file about
the installation) or some other things :-) Excuse, if I would know
such a bug, it wouldn't be there :-)

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.


Credits
=======

Thanks to Robert Höhne <robert DOT hoehne AT gmx DOT net> for his DJGPP port of 
gcc-2.8.0 which was used as a base of this port and his help (including
exception support)


Have fun with gcc, 

Andris Pavenis <pavenis AT lanet DOT lv>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019