# DP: Build and install libstdc++_pic.a library.

---
 libstdc++-v3/src/Makefile.am |    4 ++++
 libstdc++-v3/src/Makefile.in |    8 +++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

--- a/src/libstdc++-v3/src/Makefile.am
+++ b/src/libstdc++-v3/src/Makefile.am
@@ -445,6 +445,11 @@
 	  $(CXX) $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
 
 
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+	$(MKDIR_P) $(DESTDIR)$(toolexeclibdir)
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Added bits to build debug library.
 if GLIBCXX_BUILD_DEBUG
 all-local: build_debug
--- a/src/libstdc++-v3/src/Makefile.in
+++ b/src/libstdc++-v3/src/Makefile.in
@@ -725,7 +725,7 @@
 
 install-dvi-am:
 
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-exec-local install-toolexeclibLTLIBRARIES
 
 install-html: install-html-am
 
@@ -774,7 +774,7 @@
 	distclean-libtool distclean-tags dvi dvi-am html html-am info \
 	info-am install install-am install-data install-data-am \
 	install-data-local install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
+	install-exec-am install-exec-local install-html install-html-am install-info \
 	install-info-am install-man install-pdf install-pdf-am \
 	install-ps install-ps-am install-strip \
 	install-toolexeclibLTLIBRARIES installcheck installcheck-am \
@@ -989,6 +989,11 @@
 @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc
 @GLIBCXX_LDBL_COMPAT_TRUE@	$(CXXCOMPILE) -mlong-double-64 -c $<
 
+install-exec-local:
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+	$(MKDIR_P) $(DESTDIR)$(toolexeclibdir)
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
 # Added bits to build debug library.
 @GLIBCXX_BUILD_DEBUG_TRUE@all-local: build_debug
 @GLIBCXX_BUILD_DEBUG_TRUE@install-data-local: install_debug
