Patchwork [build] PR 45888 (was: Problem in bootstrapping on mingw)

login
register
mail settings
Submitter Ralf Wildenhues
Date Oct. 5, 2010, 9:07 p.m.
Message ID <20101005210719.GA1821@gmx.de>
Download mbox | patch
Permalink /patch/66869/
State New
Headers show

Comments

Ralf Wildenhues - Oct. 5, 2010, 9:07 p.m.
[ from gcc@ to -patches ]

* NightStrike wrote on Sun, Oct 03, 2010 at 10:28:50PM CEST:
> On Sun, Oct 3, 2010 at 6:05 AM, FX <fxcoudert@gmail.com> wrote:
> >> This is a known issue and related to timestamps of those generated
> >> .texi files. By touching generated .texi it can be solved. This test
> >> in make is here a bit broken IMHO, as a content check would satisfy
> >> needs for validity-check alone.
> >
> > Actually, it doesn't solve it. If "cpmd -s" returns false, the build dies right there.

Here's a proposed patch.  Can you try it on MinGW, please?

OK for trunk if it works?  This is a 4.6 regression.

I was a bit confused in the PR due to the multiple copies of the PR,
but it seems to make sense now.

Thanks,
Ralf

PR 45888: Fix tm.texi rule.

gcc/ChangeLog:
2010-10-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/45888
	* Makefile.in (s-tm-texi): Use diff not cmp for file comparison,
	to be agnostic to newline encoding.  Fix relative name of
	target.def.

Patch

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index f3da860..7dc4af6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3711,10 +3711,10 @@  s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in
 	$(RUN_GEN) build/genhooks$(build_exeext) \
 			$(srcdir)/doc/tm.texi.in > tmp-tm.texi
 	$(SHELL) $(srcdir)/../move-if-change tmp-tm.texi tm.texi
-	@if cmp -s $(srcdir)/doc/tm.texi tm.texi; then \
+	@if diff $(srcdir)/doc/tm.texi tm.texi >/dev/null; then \
 	  $(STAMP) $@; \
 	elif test $(srcdir)/doc/tm.texi -nt $(srcdir)/doc/tm.texi.in \
-	  && test $(srcdir)/doc/tm.texi -nt $(srcdir)/doc/target.def; then \
+	  && test $(srcdir)/doc/tm.texi -nt $(srcdir)/target.def; then \
 	  echo >&2 ; \
 	  echo You should edit $(srcdir)/doc/tm.texi.in rather than $(srcdir)/doc/tm.texi . >&2 ; \
 	  false; \