patches/gcc/4.4.1/410-libgcc_eh.a.patch
author Anthony Foiani <anthony.foiani@gmail.com>
Thu Apr 26 19:55:59 2012 -0600 (2012-04-26)
changeset 2939 58974be61289
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@2672
     1
Highly inspired by:
yann@2672
     2
  http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
yann@2672
     3
yann@2672
     4
diff -durN gcc-4.4.0.orig/libgcc/Makefile.in gcc-4.4.0/libgcc/Makefile.in
yann@2672
     5
--- gcc-4.4.0.orig/libgcc/Makefile.in	2009-04-10 01:23:07.000000000 +0200
yann@2672
     6
+++ gcc-4.4.0/libgcc/Makefile.in	2011-09-12 17:05:25.121124559 +0200
yann@2672
     7
@@ -754,8 +754,9 @@
yann@2672
     8
 libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
yann@2672
     9
 endif
yann@2672
    10
 
yann@2672
    11
+all: libgcc_eh.a
yann@2672
    12
 ifeq ($(enable_shared),yes)
yann@2672
    13
-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
yann@2672
    14
+all: libgcc_s$(SHLIB_EXT)
yann@2672
    15
 ifneq ($(LIBUNWIND),)
yann@2672
    16
 all: libunwind$(SHLIB_EXT)
yann@2672
    17
 endif
yann@2672
    18
@@ -924,10 +925,6 @@
yann@2672
    19
 install-shared:
yann@2672
    20
 	$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
yann@2672
    21
 
yann@2672
    22
-	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@2672
    23
-	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    24
-	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    25
-
yann@2672
    26
 	$(subst @multilib_dir@,$(MULTIDIR),$(subst \
yann@2672
    27
 		@shlib_base_name@,libgcc_s,$(subst \
yann@2672
    28
 		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
yann@2672
    29
@@ -942,6 +939,10 @@
yann@2672
    30
 	chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a
yann@2672
    31
 	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
yann@2672
    32
 
yann@2672
    33
+	$(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
yann@2672
    34
+	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    35
+	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
yann@2672
    36
+
yann@2672
    37
 	parts="$(INSTALL_PARTS)";				\
yann@2672
    38
 	for file in $$parts; do					\
yann@2672
    39
 	  rm -f $(DESTDIR)$(inst_libdir)/$$file;		\