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 4.0/4.1] sed command garbled when generating macro_list


I committed the second variant of this patch by accident in r112647 on
the trunk, now approved by Mark. Ok to apply to the 4.0 and 4.1
branches as well? Which variant?

  Matthias

2006-03-19  Paul Eggert  <eggert@cs.ucla.edu>

	PR bootstrap/26764
	* Makefile.in (s-macro_list): Don't put a backslash-newline in
	a random spot in a sed script; this has undefined behavior according
	to POSIX, and Solaris 8 sed rejects it.

--- gcc/Makefile.in-4.1.0      2006-02-16 07:23:24.000000000 -0800
+++ gcc/Makefile.in	       2006-03-19 22:13:05.101697000 -0800
@@ -3146,8 +3146,7 @@ install-gcc-tooldir:
 macro_list: s-macro_list; @true
 s-macro_list : $(GCC_PASSES) 
	      echo | $(GCC_FOR_TARGET) -E -dM - | \
-	        sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \
-		    s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
+		      sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p; s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
	     sort -u > tmp-macro_list
	     $(SHELL) $(srcdir)/../move-if-change tmp-macro_list macro_list
	$(STAMP) s-macro_list


2006-04-04  Matthias Klose  <doko@debian.org>

	PR bootstrap/27334
        * Makefile.in (s-macro_list): Conform to POSIX rules in single quoted
        strings.

-- trunk/gcc/Makefile.in	2006/04/03 20:56:59	112646
+++ trunk/gcc/Makefile.in	2006/04/03 22:20:21	112647
@@ -3171,8 +3171,8 @@
 macro_list: s-macro_list; @true
 s-macro_list : $(GCC_PASSES) 
	      echo | $(GCC_FOR_TARGET) -E -dM - | \
-	        sed -n 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p ; \
-		    s/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
+		      sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
+				 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
				    sort -u > tmp-macro_list
				    $(SHELL)
$(srcdir)/../move-if-change tmp-macro_list macro_list
			    $(STAMP) s-macro_list


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