Updated: experimental package: gcc4-4.3.2-2

Dave Korn dave.korn.cygwin@googlemail.com
Thu Mar 12 08:28:00 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



  I have just uploaded an updated GCC-4 package to cygwin.com.  It will be
arriving at your favourite mirror next time it synchronizes itself with the
official Cygwin repository.

  This is a major update to the Cygwin toolchain.  It introduces a full
complement of shared language-dependent runtime libraries, which aligns the
Cygwin environment more strongly with the Linux way of doing things.

  This package also introduces "alternatives" shortcuts which allow user
selection of gcc-3 or gcc-4 as the default system compiler when invoked
without any version suffix.  Currently, gcc-3 is still the default, but this
will change when the compiler becomes considered production-stable.

****  IMPORTANT NOTE ON THE ALTERNATIVES SYSTEM:

  The alternatives system being introduced is currently an experimental
feature, pending the decision to switch to gcc-4 as system default.  No
support for switching versions is supplied in this build of the packages; the
next release will include some support scripts to automate the process for
users.

  Generally, you should switch all the compiler packages simultaneously to
either -3 or -4 versions; mixed usages aren't guaranteed to work.  A bash
command line like

  for x in g++  g77  gcc  gcj  gfortran gdc  gnat  gpc ;
  do
    /usr/sbin/alternatives --config $x ;
  done

will let you manually configure all languages at once.  Note that not all
language compilers exist in both -3 and -4 versions; fortran changes names
between the two versions, so doesn't clash, and D and Pascal only exist in -3
versions currently.

****  IMPORTANT NOTE FOR GNAT USERS:

  The GNAT tools do not understand the version-suffix system used by the other
gcc compilers in the package.  If you attempt to invoke gnatmake-4, for
example, it will attempt to invoke plain unsuffixed names like "gnatchop",
"gnatbind" as subexecutables.  In consequence, only the currently-selected
version of gnat chosen by the alternatives system can run correctly at any
given time; you should always configure the GNAT alternatives to select as
default the version you wish to use, by invoking

    /usr/sbin/alternatives --config gnat


  The to-do list for the first fully stable release currently stands at:

- - Implement improved weak symbol handling in Win32 PE binutils, to resolve C++
operator new/delete interposition problem with shared libstdc++.
- - Add support scripts for default compiler switching.

  If there's anything else you think is important, please contact the Cygwin
mailing list with your suggestion.


    ------------------------------ooOOOoo------------------------------
    PLEASE SEND BUG REPORTS, PROBLEMS, ETC. TO THE CYGWIN MAILING LIST.
    ------------------------------ooOOOoo------------------------------


OBTAINING THE RELEASE
=====================

  To update your installation, click on the "Install Cygwin now" link on the
http://cygwin.com/ web page.  This downloads setup.exe to your system.  Then,
run setup.exe, fill in all of the options, and make appropriate choices on the
"Select Packages" screen.  Because this is a full "current" version release,
any gcc packages you currently have installed will be automatically selected
to update, but you'll need to select the Devel category to see gcc and friends
if you don't have them already installed.


NEWS
====

> From the README: (with some minor tweaks added in passing).


gcc4-4.3.2-2
- ------------------------------------------
This is a major update to the experimental GCC 4 package for Cygwin.  In
this release, all the major runtime libraries are shipped as DLLs as well
as in static archive form.

It can fully co-exist with a pre-existing Cygwin gcc-3.4.4 installation.

Static and shared linking of applications.
==========================================

Plain C applications will, by default, be linked statically against libgcc as
previously.  To link against the shared libgcc DLL, '-shared-libgcc' must be
manually specified on the command-line.

For the other languages with large runtime libraries, the situation is reversed.
By default, user applications will be linked against the DLLs, unless the
option '-static' is supplied to GCC during the build.  If linking statically
against libstdc++, you should also use '-static-libgcc' to link likewise
against libgcc, or you will experience segfaults on program termination.

Note that you really do want to use these shared libraries where possible.  The
following example demonstrates why:

Admin@ubik /tmp/hw
$ cat h.cpp

#include <iostream>

using namespace std;

int main (int argc, const char **argv)
{
  cout << "Hello, world!" << endl;
  return argc - 1;
}

Admin@ubik /tmp/hw
$ g++ h.cpp -g -O2 -o h.exe -Wl,--enable-auto-import

Admin@ubik /tmp/hw
$ strip ./h.exe

Admin@ubik /tmp/hw
$ ./h.exe
Hello, world!

Admin@ubik /tmp/hw
$ ls -l ./h.exe
- -rwxr-xr-x 1 DKAdmin None 4608 Mar 12 06:52 ./h.exe

Admin@ubik /tmp/hw
$ g++ h.cpp -g -O2 -o h.exe -static

Admin@ubik /tmp/hw
$ strip ./h.exe

Admin@ubik /tmp/hw
$ ./h.exe
Hello, world!

Admin@ubik /tmp/hw
$ ls -l ./h.exe
- -rwxr-xr-x 1 DKAdmin None 284160 Mar 12 06:52 ./h.exe

Admin@ubik /tmp/hw
$


WARNING: C++ Non-standards-compliance issue with shared libstdc++ DLL.
======================================================================

Static linking has until now been the default for all Cygwin GCC compilers,
but it has problems with C++ string and exception handling and RTTI.  Linking
against shared runtime libraries resolves these issues, but currently causes
a regression that renders the compiler non-compliant with the C++ standard:
it is no longer possible to fully override operators new, new[], delete and
delete[].  Although user-supplied overrides may be invoked in the user's own
code, they will not override calls from within libstdc++ itself, which will
still invoke the default system implementations.  This happens because GCC
relies on the weak linking facility of ELF formats to enable the runtime
override and interposition of the user's versions, and Windows' PE-COFF
format lacks the necessary support to provide an equivalent implementation
directly.  In the long run we hope to provide the necessary support in
binutils to make this work correctly, but for now the C++ compiler is only
strictly compliant when linking statically.

WARNING: Experimental release, potential back-compat issues or ABI breaks.
==========================================================================

The same caveats apply as did to the earlier releases:

"  Please be aware that this is highly experimental; anything
built with it is not guaranteed to be forwardly-compatible with the
eventual full release.  ABI details may change; compiler packaging may
change.  "

In particular, libgcc becomes a versioned DLL in this release.  The old
unversioned cyggcc_s.dll will be retained as an obsolete package to aid
backward compatibility during the transition.

As this is all still experimental, please watch out for bugs.  Anything
abnormal should be reported, in the first instance, to the main Cygwin
mailing list.


Cygwin port maintained by: Dave Korn
<dave.korn.cygwin@gmail.com.use.the.list.please>
Please address all questions to the Cygwin mailing list at <cygwin@cygwin.com>

This is the key used for signing Cygwin GCC releases:

pub   1024D/6A388C3E 2008-05-31
uid                  Dave Korn (release signing key)
                             <dave.korn.cygwin@gmail.com>
sub   4096g/D4E41590 2008-05-31

Also available at a key-server near you!

- - -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (Cygwin)

mQGiBEhBdVwRBADGS7UWOR8lvHOcOs161cRjTw1Yp3Qj4Xy5JbaSQFZ6m+DTM7GD
y4tPrM1jr6uYGzikdNzYL6tWKUDvVYjs7bwYJXBQ7ryeLJ4LXs+8cmIFIl4uMc8P
BEpT67gs1+MchBemr1B/s4V8s9laX81mMYd73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Tm4oPtKwoKYs1S2o8WZNr3RuNjKYTjRyMiEkE
GBECAAkFAkhBdVwCGwwACgkQTdKC5Wo4jD4O3wCgpS9eVpxbYfMB/xVo1zQDSVQC
mNkAoLd0hCE1VdOP7GK49mYaq8nFRuex
=CI19
- - -----END PGP PUBLIC KEY BLOCK-----

 If you have questions or comments, please send them to the cygwin mailing
list at: cygwin@cygwin.com .

              *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look at the
"List-Unsubscribe: " tag in the email header of this message. Send email to
the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain.com@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)

iEYEARECAAYFAkm4tIYACgkQTdKC5Wo4jD7AuwCghULV4D+n4NR8qrtrkeUCIA0E
zOcAn216+7by/K2Zvb9Jil9twV6Vo2l7
=I+KQ
-----END PGP SIGNATURE-----



More information about the Cygwin-announce mailing list