patches/gcc/4.6.3/100-libgcc_eh.a.patch
author Johannes Stezenbach <js@sig21.net>
Tue Oct 30 00:22:25 2012 +0000 (2012-10-30)
changeset 3097 5c67476c7342
parent 2672 7cfaaf8204e7
permissions -rw-r--r--
scripts/functions: fix endless loop in debug-shell with IO redirection

CT_DEBUG_INTERACTIVE is disabled when stdin, stdout or
stderr are redirected, but the check is only done at
the start of the build and doesn't catch when individual
build commands use redirection. When stdin is redirected
it will cause the debug shell to exit immediately, causing
and endless loop. Thus, save the stdin/our/err file handles
and restore them before invoking the debug shell.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Message-Id: <20121030102225.GA8303@sig21.net>
Patchwork-Id: 195409
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.6.0.orig/libgcc/Makefile.in gcc-4.6.0/libgcc/Makefile.in
yann@2672
     5
--- gcc-4.6.0.orig/libgcc/Makefile.in	2011-01-26 05:19:58.000000000 +0100
yann@2672
     6
+++ gcc-4.6.0/libgcc/Makefile.in	2011-09-12 18:17:12.743718974 +0200
yann@2672
     7
@@ -772,8 +772,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
@@ -950,10 +951,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
@@ -968,6 +965,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;		\