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]
Other format: [Raw text]

[patch] Broken script in gcc/Makefile.in


The makefile segments for {AR,RANLIB,NM}_FOR_TARGET in gcc/Makefile.in are 
broken. They contain the line

 t='$(program_transform_name)'; echo nm | sed -e $$t ;

which expands to t='s,^,arm-none-elf-,;'; echo ar | sed -e  ;

This code is only executed when running make inside gcc/ as AR_FOR_TARGET is 
overridden by the toplevel makefile.

The patch below fixes this by avoiding the use of t.

Tested with cross from i686-linux to arm-none-elf.
Ok?

Paul

2004-05-17  Paul Brook  <paul@codesourcery.com>

	* Makefile.in (AR_FOR_TARGET, RANLIB_FOR_TARGET, NM_FOR_TARGET):
	Don't use temporary variable.

Index: Makefile.in
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.1277
diff -u -p -r1.1277 Makefile.in
--- a/Makefile.in	17 May 2004 15:51:22 -0000	1.1277
+++ b/Makefile.in	19 May 2004 16:08:47 -0000
@@ -323,7 +323,7 @@ AR_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo ar; \
     else \
-       t='$(program_transform_name)'; echo ar | sed -e $$t ; \
+      echo ar | sed -e '$(program_transform_name)'; \
     fi; \
   fi`
 AR_FLAGS_FOR_TARGET =
@@ -336,7 +336,7 @@ RANLIB_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo $(RANLIB); \
     else \
-       t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
+       echo ranlib | sed -e '$(program_transform_name)'; \
     fi; \
   fi`
 NM_FOR_TARGET = ` \
@@ -348,7 +348,7 @@ NM_FOR_TARGET = ` \
     if [ "$(host)" = "$(target)" ] ; then \
       echo nm; \
     else \
-       t='$(program_transform_name)'; echo nm | sed -e $$t ; \
+       echo nm | sed -e '$(program_transform_name)'; \
     fi; \
   fi`
 


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