Fix static archive libstdc++.a for gcc 5.0
authorJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 19:28:22 +0000 (20:28 +0100)
committerJohn Marino <draco@marino.st>
Tue, 10 Feb 2015 19:28:22 +0000 (20:28 +0100)
commita4ea91a4db69a4eb6e98252ee481b866c15f1b3f
treec75a1c7f42773a37217b00cabc6807042aeadae5
parent90c1099282c447b18bc9db91ed0e5a32b1771252
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 (libstd.so.9) 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.
gnu/lib/gcc50/libstdcxx/components/libconv_1998/Makefile
gnu/lib/gcc50/libstdcxx/components/libconv_2011/Makefile
gnu/lib/gcc50/libstdcxx/components/libconv_supc/Makefile
gnu/lib/gcc50/libstdcxx/headers/Makefile
gnu/lib/gcc50/libstdcxx/product/Makefile