patches/gcc/4.2.2/160-libstdc++-pic.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
parent 431 8bde4c6ea47a
permissions -rw-r--r--
Allow multi-word "install" command.

Autoconf can determine that the correct install command includes flags,
e.g., "/usr/bin/install -c". When using this as a command, we can't
enclose the value in double-quotes, as that makes some shells use the
whole expression as a filename:

# this is the value returned by autoconf and stored in CT_install
$ ins="/usr/bin/install -c"

# if we call it with quotes, the command is not found
$ "${ins}"
bash: /usr/bin/install -c: No such file or directory

# removing the quotes lets it work as expected
$ ${ins}
/usr/bin/install: missing file operand
Try `/usr/bin/install --help' for more information.

Signed-Off-By: Anthony Foiani <anthony.foiani@gmail.com>
yann@313
     1
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am gcc-4.2.1/libstdc++-v3/src/Makefile.am
yann@313
     2
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.am	2006-07-28 06:57:34.000000000 +0200
yann@313
     3
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.am	2007-08-03 20:32:27.000000000 +0200
yann@313
     4
@@ -257,6 +257,12 @@
yann@313
     5
 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
yann@313
     6
 
yann@313
     7
 
yann@313
     8
+install-exec-local:
yann@313
     9
+ifeq ($(enable_shared),yes)
yann@313
    10
+	$(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
yann@313
    11
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
yann@313
    12
+endif
yann@313
    13
+
yann@313
    14
 # Added bits to build debug library.
yann@313
    15
 if GLIBCXX_BUILD_DEBUG
yann@313
    16
 all-local: build_debug
yann@313
    17
diff -durN gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in gcc-4.2.1/libstdc++-v3/src/Makefile.in
yann@313
    18
--- gcc-4.2.1.orig/libstdc++-v3/src/Makefile.in	2006-10-16 21:08:22.000000000 +0200
yann@313
    19
+++ gcc-4.2.1/libstdc++-v3/src/Makefile.in	2007-08-03 20:32:27.000000000 +0200
yann@313
    20
@@ -657,7 +657,7 @@
yann@313
    21
 
yann@313
    22
 install-data-am: install-data-local
yann@313
    23
 
yann@313
    24
-install-exec-am: install-toolexeclibLTLIBRARIES
yann@313
    25
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
yann@313
    26
 
yann@313
    27
 install-info: install-info-am
yann@313
    28
 
yann@313
    29
@@ -690,6 +690,7 @@
yann@313
    30
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
yann@313
    31
 	html-am info info-am install install-am install-data \
yann@313
    32
 	install-data-am install-data-local install-exec \
yann@313
    33
+	install-exec-local \
yann@313
    34
 	install-exec-am install-info install-info-am install-man \
yann@313
    35
 	install-strip install-toolexeclibLTLIBRARIES installcheck \
yann@313
    36
 	installcheck-am installdirs maintainer-clean \
yann@313
    37
@@ -799,6 +800,13 @@
yann@313
    38
 install_debug:
yann@313
    39
 	(cd ${debugdir} && $(MAKE) \
yann@313
    40
 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
yann@313
    41
+
yann@313
    42
+install-exec-local:
yann@313
    43
+ifeq ($(enable_shared),yes)
yann@313
    44
+	$(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
yann@313
    45
+	$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
yann@313
    46
+endif
yann@313
    47
+
yann@313
    48
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
yann@313
    49
 # Otherwise a system limit (for SysV at least) may be exceeded.
yann@313
    50
 .NOEXPORT: