inconsistent CFLAGS between toplevel and gcc/
Andrew Pinski
pinskia@physics.uc.edu
Mon Jul 18 04:38:00 GMT 2005
On Jul 18, 2005, at 12:32 AM, Ben Elliston wrote:
> I have recently been noticing inconsistent warnings when building GCC
> (for example,
> warnings about uninitialised variables in gcc/ddg.c). I had not
> realised it, but the
> top-level CFLAGS defaults to "-g -O2" whereas gcc's Makefile sets
> CFLAGS to "-g" by
> default. So, if you compile this way:
>
> cd gcc; make
>
> you miss uninitalised warnings and the like caught by:
> make all-gcc
>
> at the toplevel. Why shouldn't gcc's CFLAGS include -O2 given that
> most end-users
> are building using the toplevel Makefile?
"make bootstrap" should have caught the warnings. Doing a make inside
GCC and not
getting optimizations is very useful for debugging problems that
reported.
Thanks,
Andrew Pinski
More information about the Gcc
mailing list