Patchwork RFA: Fix target/44750

login
register
mail settings
Submitter Joern Rennecke
Date Nov. 5, 2010, 4:35 a.m.
Message ID <20101105003528.oltnc7fncwo80c40-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/70237/
State New
Headers show

Comments

Joern Rennecke - Nov. 5, 2010, 4:35 a.m.
Quoting Paul Koning <paul_koning@dell.com>:

> Joern,
>
> I ran into a problem with this.

Oops, while we can rely on a fairly recent version of GNU make, the same
is not true of the bootstrap compiler.  So there is still a good reason
to stick to the *.o-warn mechanism.

The attached patch makes use of this so that we use just -Wno-error, and only
when we're actually using -Werror in the first place.

OK to apply?
2010-11-05  Joern Rennecke  <amylaar@spamcop.net>

	 PR target/44750
        * config/pdp11/t-pdp11 (dwarf2out.o, java/constants.o): Undo last
	change.  Set $@-warn.o to -Wno-error.
Paul Koning - Nov. 5, 2010, 10:45 a.m.
Ok.  Thanks!

	paul

On Nov 5, 2010, at 12:35 AM, Joern Rennecke wrote:

> Quoting Paul Koning <paul_koning@dell.com>:
> 
>> Joern,
>> 
>> I ran into a problem with this.
> 
> Oops, while we can rely on a fairly recent version of GNU make, the same
> is not true of the bootstrap compiler.  So there is still a good reason
> to stick to the *.o-warn mechanism.
> 
> The attached patch makes use of this so that we use just -Wno-error, and only
> when we're actually using -Werror in the first place.
> 
> OK to apply?
> 
> 
> 2010-11-05  Joern Rennecke  <amylaar@spamcop.net>
> 
> 	 PR target/44750
>        * config/pdp11/t-pdp11 (dwarf2out.o, java/constants.o): Undo last
> 	change.  Set $@-warn.o to -Wno-error.
> 
> Index: config/pdp11/t-pdp11
> ===================================================================
> --- config/pdp11/t-pdp11	(revision 166331)
> +++ config/pdp11/t-pdp11	(working copy)
> @@ -39,8 +39,10 @@ MULTILIB_OPTIONS = msoft-float
> # DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
> # (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
> # comparison is always false.
> -dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
> +# We could say "-Werror -Wno-error=type-limits", alas, not all supported
> +# gcc bootstrap compilers support the latter option.
> +dwarf2out.o-warn = -Wno-error
> 
> # Likewise, java/constants.c:build_constants_constructor has a negative shift
> # count (in never-executed code) due to the small POINTER_SIZE.
> -java/constants.o: ALL_COMPILERFLAGS += -Wno-error
> +java/constants.o-warn = -Wno-error

Patch

Index: config/pdp11/t-pdp11
===================================================================
--- config/pdp11/t-pdp11	(revision 166331)
+++ config/pdp11/t-pdp11	(working copy)
@@ -39,8 +39,10 @@  MULTILIB_OPTIONS = msoft-float
 # DWARF_ARANGES_PAD_SIZE is 0, thus a loop in output_aranges that checks
 # (i < (unsigned) DWARF_ARANGES_PAD_SIZE) elicits a warning that the
 # comparison is always false.
-dwarf2out.o: ALL_COMPILERFLAGS += -Wno-error=type-limits
+# We could say "-Werror -Wno-error=type-limits", alas, not all supported
+# gcc bootstrap compilers support the latter option.
+dwarf2out.o-warn = -Wno-error
 
 # Likewise, java/constants.c:build_constants_constructor has a negative shift
 # count (in never-executed code) due to the small POINTER_SIZE.
-java/constants.o: ALL_COMPILERFLAGS += -Wno-error
+java/constants.o-warn = -Wno-error