patches/gcc/3.4.3/pr18508-fix.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 See http://gcc.gnu.org/PR18508
     2 
     3 This should fix cygwin errors like:
     4 
     5 basename: missing operand
     6 Try `basename --help' for more information.
     7 mv: `libgcc_s_nof.so.1' and `libgcc_s_nof.so.1.' are the same file
     8 make[2]: *** [nof/libgcc_s_nof.so] Error 1
     9 make[2]: Leaving directory `/home/cvachoucek/crosstool-0.32/build/powerpc-750-linux-gnu/gcc-3.4.3-glibc-2.3.5/build-gcc/gcc'
    10 make[1]: *** [stmp-multilib] Error 2
    11 make[1]: Leaving directory `/home/cvachoucek/crosstool-0.32/build/powerpc-750-linux-gnu/gcc-3.4.3-glibc-2.3.5/build-gcc/gcc'
    12 make: *** [install-gcc] Error 2
    13 
    14 From gcc-patches-return-133821-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Wed Nov 17 00:15:28 2004
    15 Return-Path: <gcc-patches-return-133821-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org>
    16 Delivered-To: listarch-gcc-patches at gcc dot gnu dot org
    17 Received: (qmail 12823 invoked by alias); 17 Nov 2004 00:15:19 -0000
    18 Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm
    19 List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
    20 List-Post: <mailto:gcc-patches at gcc dot gnu dot org>
    21 List-Help: <mailto:gcc-patches-help at gcc dot gnu dot org>
    22 Sender: gcc-patches-owner at gcc dot gnu dot org
    23 Date: Tue, 16 Nov 2004 16:14:57 -0800
    24 From: "H dot  J dot  Lu" <hjl at lucon dot org>
    25 To: gcc-patches at gcc dot gnu dot org
    26 Subject: PATCH: PR other/18508: "basename: too few arguments" when building without bootstrap
    27 Message-ID: <20041117001457.GA13610@lucon.org>
    28 
    29 I think it is safe to use `.backup' to backup the existing shared
    30 library. No processes should be using the old shared library when
    31 we get there.
    32 
    33 
    34 H.J.
    35 ---
    36 2004-11-16  H.J. Lu  <hongjiu.lu@intel.com>
    37 
    38 	PR other/18508
    39 	* config/alpha/t-osf4 (SHLIB_LINK): Use `.backup' as the suffix
    40 	to back up the existing shared library.
    41 	* config/arm/t-netbsd (SHLIB_LINK): Likewise.
    42 	* config/i386/t-nwld (SHLIB_LINK): Likewise. [deleted]
    43 	* config/mips/t-slibgcc-irix (SHLIB_LINK): Likewise. [deleted]
    44 	* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
    45 	* config/sh/t-linux (SHLIB_LINK): Likewise.
    46 	* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
    47 	* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
    48 	* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
    49 	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
    50 
    51 [ paths adjusted for patch -p1, rediffed agaainst gcc-3.4.3. 
    52   Looks like the t-iris5-6 hunk in cvs is missing here; this must
    53   have been the mainline patch. ]
    54 
    55 --- gcc-3.4.3/gcc/config/alpha/t-osf4.stage	2004-10-18 09:14:39.000000000 -0700
    56 +++ gcc-3.4.3/gcc/config/alpha/t-osf4	2004-11-16 16:06:41.686905479 -0800
    57 @@ -19,7 +19,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
    58  	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
    59  	rm -f $(SHLIB_SONAME) && \
    60  	if [ -f $(SHLIB_NAME) ]; then \
    61 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
    62 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
    63  	else true; fi && \
    64  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
    65  	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
    66 --- gcc-3.4.3/gcc/config/arm/t-netbsd.stage	2004-10-18 09:14:40.000000000 -0700
    67 +++ gcc-3.4.3/gcc/config/arm/t-netbsd	2004-11-16 16:06:46.016348194 -0800
    68 @@ -14,7 +14,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
    69  	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
    70  	rm -f $(SHLIB_SONAME) && \
    71  	if [ -f $(SHLIB_NAME) ]; then \
    72 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
    73 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
    74  	else true; fi && \
    75  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
    76  	$(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
    77 --- gcc-3.4.3/gcc/config/pa/t-hpux-shlib.stage	2004-10-18 09:14:46.000000000 -0700
    78 +++ gcc-3.4.3/gcc/config/pa/t-hpux-shlib	2004-11-16 16:06:57.982807875 -0800
    79 @@ -8,7 +8,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
    80  	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
    81          rm -f $(SHLIB_SONAME) && \
    82  	if [ -f $(SHLIB_NAME) ]; then \
    83 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
    84 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
    85  	else true; fi && \
    86  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
    87          $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
    88 --- gcc-3.4.3/gcc/config/sh/t-linux.stage	2004-10-18 09:14:48.000000000 -0700
    89 +++ gcc-3.4.3/gcc/config/sh/t-linux	2004-11-16 16:07:00.787446863 -0800
    90 @@ -24,7 +24,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
    91  	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
    92  	rm -f $(SHLIB_SOLINK) && \
    93  	if [ -f $(SHLIB_NAME) ]; then \
    94 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
    95 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
    96  	else true; fi && \
    97  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
    98  	(echo "/* GNU ld script"; \
    99 --- gcc-3.4.3/gcc/config/t-libunwind-elf.stage	2004-10-18 09:14:39.000000000 -0700
   100 +++ gcc-3.4.3/gcc/config/t-libunwind-elf	2004-11-16 16:07:08.133501281 -0800
   101 @@ -14,8 +14,7 @@ SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(L
   102  	@multilib_flags@ $(SHLIB_OBJS) -lc && \
   103  	rm -f $(SHLIB_SOLINK) && \
   104  	if [ -f $(SHLIBUNWIND_NAME) ]; then \
   105 -	  mv -f $(SHLIBUNWIND_NAME) \
   106 -	     $(SHLIBUNWIND_NAME).`basename $(STAGE_PREFIX)`; \
   107 +	  mv -f $(SHLIBUNWIND_NAME) $(SHLIBUNWIND_NAME).backup; \
   108  	else true; fi && \
   109  	mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
   110  	$(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
   111 --- gcc-3.4.3/gcc/config/t-slibgcc-darwin.stage	2004-10-18 09:14:39.000000000 -0700
   112 +++ gcc-3.4.3/gcc/config/t-slibgcc-darwin	2004-11-16 16:07:13.777774752 -0800
   113 @@ -17,7 +17,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
   114  	@multilib_flags@ $(SHLIB_OBJS) -lc && \
   115  	rm -f $(SHLIB_SOLINK) && \
   116  	if [ -f $(SHLIB_NAME) ]; then \
   117 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
   118 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
   119  	else true; fi && \
   120  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
   121  	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
   122 --- gcc-3.4.3/gcc/config/t-slibgcc-elf-ver.stage	2004-10-18 09:14:39.000000000 -0700
   123 +++ gcc-3.4.3/gcc/config/t-slibgcc-elf-ver	2004-11-16 16:04:40.961445223 -0800
   124 @@ -17,7 +17,7 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2
   125  	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
   126  	rm -f $(SHLIB_SOLINK) && \
   127  	if [ -f $(SHLIB_NAME) ]; then \
   128 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
   129 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
   130  	else true; fi && \
   131  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
   132  	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
   133 --- gcc-3.4.3/gcc/config/t-slibgcc-sld.old	2004-10-18 09:00:47.000000000 -0700
   134 +++ gcc-3.4.3/gcc/config/t-slibgcc-sld	2005-05-14 13:44:48.000000000 -0700
   135 @@ -14,7 +14,7 @@
   136  	@multilib_flags@ $(SHLIB_OBJS) -lc && \
   137  	rm -f $(SHLIB_SOLINK) && \
   138  	if [ -f $(SHLIB_NAME) ]; then \
   139 -	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
   140 +	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
   141  	else true; fi && \
   142  	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
   143  	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)