This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch]: set $(STRICT_WARN) for "build" object files
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Jan 2005 17:16:02 -0800
- Subject: Re: [Patch]: set $(STRICT_WARN) for "build" object files
- References: <200501101612.j0AGCCFx004207@caip.rutgers.edu>
At Mon, 10 Jan 2005 11:12:12 -0500 (EST),
Kaveh R. Ghazi wrote:
>
> It seems that all the "build" object files are now placed in a
> subdirectory "build/" on mainline. This confuses the warning flag
> mechanism in GCC's Makefile and causes these files to be built without
> $(STRICT_WARN) and we lose having "-pedantic -Wno-long-long
> -Wno-variadic-macros -Wold-style-definition -Werror" for these files
> in stage2 and stage3.
>
> If I remember correctly how this hack works, in $(GCC_WARN_CFLAGS) we
> rely on the @D in $($(@D)-warn) resolving to "." and therefore we pull
> in the $(.-warn) make variable set above. However now @D is set to
> "build" and thus the uninitialized $(build-warn) variable is obtained.
> So we simply have to set $(build-warn) to fix this.
Yes, that's how it works.
>
> The following appears to do the trick. Bootstrapped on
> i686-unknown-linux-gnu, and I visually inspected the output log to see
> that the additional flags were applied to the "build" files.
>
> Ok for mainline?
Ok.
zw