Subject: IMPORTANT: EGCS integrated and ready for wide testing
To: None <tech-toolchain@NetBSD.ORG>
From: Todd Vierling <tv@NetBSD.ORG>
List: current-users
Date: 04/08/1998 22:51:49
Please note that I'm not an "official" spokesperson for the egcs
integration; I'm just one of the many people who have worked on it, and no
one else was willing (too lazy? :) to send out an announcement.  If you have
problems relating to the use or build of egcs, please take the discussion to
the "tech-toolchain" mailing list where it's most appropriate.

The egcs 1.0.2 compiler, based on gcc and libstdc++ 2.8, has been integrated
completely into NetBSD-current.  If you do a sup update starting tomorrow (9
April), you will have sources capable of building the egcs compiler instead
of gcc 2.7 on the i386 and sparc (verified by me), and possibly other
platforms (portmasters can probably chime in here).  To build the egcs
compiler in place of gcc 2.7, simply set USE_EGCS=1 in your mk.conf before a
"make build".  Once platforms are deemed "ready for prime time" with egcs by
the respective portmasters, they will be switched to build egcs by default. 

Changes from gcc to egcs - these are important!, so read thoroughly:

- Some of the <bsd.*.mk> files have changed with a vital impact on egcs as
  well as other programs around the tree.  DON'T forget to install these
  before building anything!

- While doing a "bootstrap" build--building egcs for the first time--the
  libstdc++ library will not be built (it needs egcs to be fully installed
  for the build to happen) and the libgcc.a library will be missing some
  C++ support.  Both of these need to be rebuilt after egcs is installed.
  The following procedure will give you a quicker upgrade path to egcs:
  * Add USE_EGCS=1 to /etc/mk.conf.
  * Build and install src/gnu/usr.bin/egcs.
  * Rebuild and install src/gnu/usr.bin/egcs/libgcc.
  * Clean out /usr/include/g++.
  * "make build".  (Or at least make src/gnu/lib/{libf2c,libstdc++}.)

- egcs includes a FORTRAN 77 compiler (f77/g77).  This includes a shared or
  static library, libf2c, that provides a pretty complete build environment
  for FORTRAN 77 code.  This has been tested with many sample programs;
  other results from users running -current would be great!

- The cc1 suite of programs (cc1, cc1obj, cc1plus, f771) builds about 75%
  of the code base, that shared between these programs, into a new shared
  library (  Unless you're on a NOPIC system--and you can force
  these utilities to build statically by building src/gnu/usr.bin/egcs
  with NOPIC set--this shared library will install without a .a companion,
  but is required for compiling to work properly.  This is similar to
  the automounter shared code in libamu, but more important to take note of.

- The ANSI C++ library, libstdc++, has undergone a drastic revision and has
  had its major version incremented.  It's recommended that, before a build
  including egcs, your /usr/include/g++ directory is wiped clean.  This is
  not necessary, but a good precaution.

- The libg++ library isn't considered part of the main NetBSD sources with
  the introduction of egcs, and it will not be built when egcs is enabled. 
  I'm finishing a pkg for libg++ which will allow source
  compatibility with applications that want that library, and it may even be
  in tomorrow's sup.  DO NOT use the old libg++ headers and library to
  compile new programs with egcs.  They WILL break because of ABI changes in
  the g++ compiler.

- G++ in particular:  The C++ compiler, g++, now supports exceptions and
  RTTI (run-time typeinfo, that used by dynamic_cast<>, "typename", and
  "typeof").  Both of these features are turned on by default, but you can
  save code on programs that don't need them by using "-fno-exceptions" or
  "-fno-rtti" as appropriate.  Also, namespaces are partly supported, but
  can still be considered broken until egcs 1.1.X is stable enough to

-- Todd Vierling (Personal; Bus.