[PATCH]: Fix PR bootstrap/29402 parallel make bug

Kaveh R. GHAZI ghazi@caip.rutgers.edu
Fri Oct 13 08:46:00 GMT 2006


On Fri, 13 Oct 2006, Paolo Bonzini wrote:

> > Hmm... goes gnu make have these features?  Meaning, sort and unique?
>
> $(sort foo bar foo) returns "bar foo", i.e. it does sort and unique at
> the same time.  So this would work:
>
> ALL_GTFILES_H := $(sort $(GTFILES_FILES_FILES_H) \
>    $(GTFILES_LANG_DIR_NAMES_H))
>
> Paolo

Great, thanks for checking.

Patch below tested with gnu make-3.80 on solaris 10 using c-only
--disable-bootstrap with -j4.  Build completes.

Okay for mainline?

		Thanks,
		--Kaveh


2006-10-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	PR bootstrap/29402
	* Makefile.in (ALL_GTFILES_H): Use $(sort ...) instead of
	shell pipeline.

diff -rup orig/egcc-SVN20061011/gcc/Makefile.in egcc-SVN20061011/gcc/Makefile.in
--- orig/egcc-SVN20061011/gcc/Makefile.in	2006-10-10 20:01:28.000000000 -0400
+++ egcc-SVN20061011/gcc/Makefile.in	2006-10-13 03:41:50.378173631 -0400
@@ -2882,8 +2882,7 @@ GTFILES_FILES_FILES_C = $(subst $(srcdir
 GTFILES_FILES_FILES_H = $(addprefix gt-, \
 	$(subst /,-,$(GTFILES_FILES_FILES_C:.c=.h)))
 GTFILES_LANG_DIR_NAMES_H = $(foreach d,$(GTFILES_LANG_DIR_NAMES), gtype-$(d).h)
-ALL_GTFILES_H := $(shell echo $(GTFILES_FILES_FILES_H) \
-	$(GTFILES_LANG_DIR_NAMES_H) | tr ' ' '\n'  | sort -u)
+ALL_GTFILES_H := $(sort $(GTFILES_FILES_FILES_H) $(GTFILES_LANG_DIR_NAMES_H))

 $(ALL_GTFILES_H) : s-gtype ; @true



More information about the Gcc-patches mailing list