This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: contrib/gcc_update in CVS broken in IRIX 6.5


On May 17, 2000, Albert Chin-A-Young <china@thewrittenword.com> wrote:

> So touch_files_reexec tries to exec the function touch_files_reexec.

Oops :-)

Thanks, here's a patch.  Ok to install?

Index: contrib/ChangeLog
from  Alexandre Oliva  <aoliva@cygnus.com>

	* gcc_update (self): Set to `$0'.
	(touch_files_reexec): Use `$self' instead of `$0'.
	Reported by Albert Chin-A-Young <china@thewrittenword.com>

Index: contrib/gcc_update
===================================================================
RCS file: /cvs/gcc/egcs/contrib/gcc_update,v
retrieving revision 1.8
diff -u -r1.8 gcc_update
--- contrib/gcc_update	2000/05/12 20:18:49	1.8
+++ contrib/gcc_update	2000/05/17 18:54:07
@@ -43,6 +43,8 @@
 #        locally.
 # Add -A to reset any sticky tags, dates, or `-k' options.
 
+# Arrange for the value of $0 to be available for functions
+self=$0
 
 # This function prints a list of all generated files, along with their
 # dependencies.  Note that only one target is supported per line: the
@@ -117,7 +119,7 @@
 # dependencies and rules will be used.
 touch_files_reexec () {
     echo "Adjusting file timestamps"
-    exec ${CONFIG_SHELL-/bin/sh} $0 --touch
+    exec ${CONFIG_SHELL-/bin/sh} $self --touch
 }    
 
 # This functions applies a patch to an existing tree.

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]