problem with the configure.ac change

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with the configure.ac change

Miklos Vajna
hi

-       CFLAGS="-g -Wall -Werror -std=c99 -DPACMAN_DEBUG"
+       CFLAGS="$CFLAGS -g -Wall -Werror -std=c99 -DPACMAN_DEBUG"

this change means that in case the user has set CFLAGS, we'll use it.
this is very bad during the debug, for example we have -O2 in CFLAGS by
default and that means small functions will be optimized out and so on.
that "ignore $CFLAGS if debug enabled" thingy was not by accident. if we
debug then we should ignore the more or less problematic cflags

in addition of you use both -O2 and -Werror, you'll get additional
warnings wich will break the build..

udv / greetings,
VMiklos

--
Developer of Frugalware Linux, to make things frugal - http://frugalware.org

_______________________________________________
pacman-dev mailing list
[hidden email]
http://www.archlinux.org/mailman/listinfo/pacman-dev
Reply | Threaded
Open this post in threaded view
|

Re: problem with the configure.ac change

Aaron Griffin
On 10/31/06, VMiklos <[hidden email]> wrote:
> this change means that in case the user has set CFLAGS, we'll use it.
> this is very bad during the debug

You're probably right - I believe that change was when I was trying to
figure out why that part wasn't working.  It turned out that the
--enable-debug wasn't working at all.

I have changed this (and also added -Wall by default to a normal
build.  -Werror isn't important at that point, but I may add that in
the future...

For all those interested, -Wall is not really "all".  In fact, it's
not even close.  As far as I can tell, the real "warn all" is:
-Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts
-Wpointer-arith -Wcast-align -Wsign-compare
Which is what I have in the libfetch Makefile

_______________________________________________
pacman-dev mailing list
[hidden email]
http://www.archlinux.org/mailman/listinfo/pacman-dev
Reply | Threaded
Open this post in threaded view
|

Re: problem with the configure.ac change

Miklos Vajna
On Tue, Oct 31, 2006 at 10:02:20AM -0600, Aaron Griffin <[hidden email]> wrote:
> You're probably right

thanks for reverting it

> I have changed this (and also added -Wall by default to a normal
> build.  -Werror isn't important at that point, but I may add that in
> the future...

why do you think warnings are useful for a user? i think they're totally
useless for a user (who does not know the code)

> For all those interested, -Wall is not really "all".  In fact, it's
> not even close.  As far as I can tell, the real "warn all" is:
> -Wall -Wstrict-prototypes -Wsign-compare -Wchar-subscripts
> -Wpointer-arith -Wcast-align -Wsign-compare
> Which is what I have in the libfetch Makefile

-Wsign-compare included 2 times

udv / greetings,
VMiklos

--
Developer of Frugalware Linux, to make things frugal - http://frugalware.org

_______________________________________________
pacman-dev mailing list
[hidden email]
http://www.archlinux.org/mailman/listinfo/pacman-dev
Reply | Threaded
Open this post in threaded view
|

Re: problem with the configure.ac change

Aaron Griffin
On 10/31/06, VMiklos <[hidden email]> wrote:
> why do you think warnings are useful for a user? i think they're totally
> useless for a user (who does not know the code)

They're not really.  The big issue is, though, any code in:
#ifdef PACMAN_DEBUG
...
#else
...
#endif
is not checked for warnings.

For all intents and purposes, warnings should always be removed as
best as possible.  I, also, don't really think of "compiling in
non-debug mode" as a "user task", and trying to minimize things to
that point is not beneficial to either party.

Warnings are always worthwhile.  I've built tons of software that
spams warnings at me.  Hell, I've even submitted patches simply
because the warnings were irritating (Torque)

_______________________________________________
pacman-dev mailing list
[hidden email]
http://www.archlinux.org/mailman/listinfo/pacman-dev
Reply | Threaded
Open this post in threaded view
|

Re: problem with the configure.ac change

Miklos Vajna
On Tue, Oct 31, 2006 at 12:42:06PM -0600, Aaron Griffin <[hidden email]> wrote:
> Warnings are always worthwhile.  I've built tons of software that
> spams warnings at me.  Hell, I've even submitted patches simply
> because the warnings were irritating (Torque)

oh, so cosmetics again. i said nothing ;)

udv / greetings,
VMiklos

--
Developer of Frugalware Linux, to make things frugal - http://frugalware.org

_______________________________________________
pacman-dev mailing list
[hidden email]
http://www.archlinux.org/mailman/listinfo/pacman-dev