Hello, Roland!

I have found that your changes that introduced
MC_ARG_ENABLE_DEVELOPER_MODE cause configure script to ignore CFLAGS
passed on the command line if --enable-developer-mode is not specified.
Also, it removes the optimization option "-O2" that is added by

I believe it's wrong.  In fact, I prefer that we don't mess with CFLAGS
at all if the user cared to specify it.

Also, I don't see a need for having a separate "developer mode".  We
shouldn't have warnings that only developers see.  I believe that -Wall
is quite reasonable.  According to gcc documentation, -Wall enables
warnings that can be easily worked around.  I believe -W is excessive
because it enables warnings that are not so useful and that cannot be
worked around without making the code uglier.  We shouldn't encourage
developers to work around all such warnings.  I'm fine with adding more
specific warnings the maintainer-only scripts, such as maint/mctest.

As for the -g switch, it's also reasonable for everybody.  The ability
to debug a program is important for end users too, because some crashes
only happen on end user systems.  If the debug information on the
executable is not desired, one can always use strip.

Finally, optimization is even more useful for end users than for
developers.  Your patch does exactly the wrong thing - it kills the
optimization flags for the end users and leaves them on for the

Fortunately, optimization doesn't prevent gdb from working, and thing
are getting better with the new versions of gcc and gdb.  So I don't see
the need to debug optimization for anybody.  In some rare nasty cases,
it may be necessary to compile without optimization to make the debugger
work better.

I believe that having one more configure option makes maintaining the
code more difficult.  It creates more possibilities for bugs that not
everybody can see.

I'm removing MC_ARG_ENABLE_DEVELOPER_MODE now because in my opinion, it
doesn't provide any useful value at all.  If you want that code
restored, please provide arguments and _tested_ code.  I'm also removing
m4/ri-gcc-warnings.m4, which is now unused.

I'm replacing all that stuff with a simple piece of code:

dnl If default CFLAGS is used with gcc, add -Wall
if test -z "$ac_env_CFLAGS_set"; then
    if test -n "$GCC"; then
        CFLAGS="$CFLAGS -Wall"

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]