git: Fix static archive libstdc++.a for gcc 5.0

John Marino marino at
Tue Feb 10 11:36:24 PST 2015

commit a4ea91a4db69a4eb6e98252ee481b866c15f1b3f
Author: John Marino <draco at>
Date:   Tue Feb 10 20:28:22 2015 +0100

    Fix static archive libstdc++.a for gcc 5.0
    The libstdc++ libaries for gcc 5.0 are built differently than they have
    been in the past, and closely mirror what the vendor build system does.
    Three "convenience" librarys are built first: c++98, c++11, and supc++.
    Both static and PIC versions are built.  The final library combines the
    three components along with about 10 unique objects.
    It worked fine for the shared version ( but the static
    version was unreadable.  I fixed it by creating a dedicated "ar" script
    to dictate what gets assembled in the new static archive.  It would
    have been a sweet solution has "ar" not had an incredible limitation:
    The script can not have consecutive "+" characters on any line.  To
    work around this, I had to:
      1) rename the 3 component libraries (all had ++ in the name)
      2) rename the output library (libstdc++.a => libstdcxx.a)
      3) copy all the cc files with "++" in their names to a new filename.
         This affected about 3-4 files.
      4) move the output library back to the proper name of libstdc++.a
    What a pain those hacks were, but it works and gcc-5.0 can now build
    itself.  It still can't complete world due to Werror trigging on new
    warnings, but it's a good fix.

Summary of changes:
 .../libstdcxx/components/libconv_1998/Makefile     |  2 +-
 .../libstdcxx/components/libconv_2011/Makefile     |  2 +-
 .../libstdcxx/components/libconv_supc/Makefile     | 21 +++++++----
 gnu/lib/gcc50/libstdcxx/headers/Makefile           |  8 +---
 gnu/lib/gcc50/libstdcxx/product/Makefile           | 43 +++++++++++++++++-----
 5 files changed, 51 insertions(+), 25 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list