Cleanup some common CFLAGS
PATCH 1/1 Cleanup some common CFLAGS
The following patch does:
- change the default CFLAGS to -Wall -O2 -g
- add --debug option to configure that will override the default CFLAGS to -Wall -O0 -DDEBUG -g
- clean up all the relevant Makefiles
- add a few missing ; to configure script (almost cosmetic since perl didn't trip on them).
NOTE that some subproject were using -ggdb with notes that had to be removed. This is basically the only "major" change in the set since it will switch to a more common -g. According to gcc 4.1 man page -g is still good enough to generate enough debugging information for gdb.
Please ACK or apply.
Fabio
PS The patch depends on the previous Makefile cleanup I posted on the mailing list right before this one.
Signature · 5 lines
I'm going to make him an offer he can't refuse. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: morecommonopts.diff URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070826/6fdd7fe2/attachment.ksh>
PATCH 1/1 Cleanup some common CFLAGS
Quoted 2 lines · Fabio Massimo Di Nitto
- add --debug option to configure that will override the default CFLAGS to -Wall -O0 -DDEBUG -g
I forgot to mention that -DDEBUG will cause gfs and rgmanager to fail to build due to some obsoleted code wrapped in #ifdef DEBUG.
Cheers
Fabio
Signature · 1 line
I'm going to make him an offer he can't refuse.
PATCH 1/1 Cleanup some common CFLAGS
In reply to Fabio Massimo Di NittoQuoted 14 lines · Fabio Massimo Di Nitto
The following patch does:
- change the default CFLAGS to -Wall -O2 -g
- add --debug option to configure that will override the default CFLAGS to -Wall -O0 -DDEBUG -g
- clean up all the relevant Makefiles
- add a few missing ; to configure script (almost cosmetic since perl didn't trip on them).NOTE that some subproject were using -ggdb with notes that had to be removed. This is basically the only "major" change in the set since it will switch to a more common -g. According to gcc 4.1 man page -g is still good enough to generate enough debugging information for gdb.
Quoted 6 lines
Please ACK or apply.
Fabio
PS The patch depends on the previous
Makefilecleanup I posted on the mailing list right before this one.
ACK, but I only looked at the defaults and the gfs2 userland bits.
Regards,
Bob Peterson
PATCH 1/1 Cleanup some common CFLAGS
Quoted 19 lines · Bob Peterson
Quoted 18 lines · Fabio Massimo Di Nitto
The following patch does:
- change the default CFLAGS to -Wall -O2 -g
- add --debug option to configure that will override the default CFLAGS to -Wall -O0 -DDEBUG -g
- clean up all the relevant Makefiles
- add a few missing ; to configure script (almost cosmetic since perl didn't trip on them).NOTE that some subproject were using -ggdb with notes that had to be removed. This is basically the only "major" change in the set since it will switch to a more common -g. According to gcc 4.1 man page -g is still good enough to generate enough debugging information for gdb.
Please ACK or apply.
Fabio
Quoted 9 lines
Quoted 2 lines
PS The patch depends on the previous
Makefilecleanup I posted on the mailing list right before this one.ACK, but I only looked at the defaults and the gfs2 userland bits.
Regards,
Bob Peterson
Thanks, I will wait for another ACK before applying this one.
Fabio
Signature · 1 line
I'm going to make him an offer he can't refuse.
PATCH 1/1 Cleanup some common CFLAGS
In reply to Fabio Massimo Di Nittocman/qdisk/Makefile line 19
Quoted 12 lines · Fabio Massimo Di Nitto
diff -Naurd redhat-cluster-suite-2.20070823/cman/qdisk/Makefile cluster/cman/qdisk/Makefile
cman/qdisk/Makefile +1
-1@@ -13,7 +13,7 @@ include ../../make/defines.mk CFLAGS += -D_GNU_SOURCE -CFLAGS += -Werror -Wstrict-prototypes -Wshadow -g +CFLAGS += -Werror -Wstrict-prototypes -Wshadow CFLAGS += -I${ccsincdir} -I${cmanincdir} CFLAGS += -I. CFLAGS += -I${incdir}
-DDEBUG is usually done by developers and is normally "printf" sort of run-time debugging.
In my mind, for most distributors, -g always needs to be done, even w/o -DDEBUG in order for support personnel to able to look at core files.
ACK if you've got a super easy to add CFLAGS, which it looks like you do:
./configure --extracflags="-g"
Once your patch is applied, I'll look at the stuff in rgmanager that croaks with --debug enabled.
-- Lon
PATCH 1/1 Cleanup some common CFLAGS
Quoted 20 lines · Lon Hohberger
cman/qdisk/Makefile line 19
Quoted 12 lines · Fabio Massimo Di Nitto
diff -Naurd redhat-cluster-suite-2.20070823/cman/qdisk/Makefile cluster/cman/qdisk/Makefile
cman/qdisk/Makefile +1
-1@@ -13,7 +13,7 @@ include ../../make/defines.mk CFLAGS += -D_GNU_SOURCE -CFLAGS += -Werror -Wstrict-prototypes -Wshadow -g +CFLAGS += -Werror -Wstrict-prototypes -Wshadow CFLAGS += -I${ccsincdir} -I${cmanincdir} CFLAGS += -I. CFLAGS += -I${incdir}-DDEBUG is usually done by developers and is normally "printf" sort of run-time debugging.
In my mind, for most distributors, -g always needs to be done, even w/o -DDEBUG in order for support personnel to able to look at core files.
Quoted 7 lines
ACK if you've got a super easy to add CFLAGS, which it looks like you do:
./configure --extracflags="-g"Once your patch is applied, I'll look at the stuff in rgmanager that croaks with --debug enabled.
With this patch -g becomes default via cflags so I assume it does what you are asking for.
I agree with the DDEBUG stuff and that's why it is not turned on by default but you can either use the --extracflags or --debug that will turn off gcc optimizations and enable -DDEBUG.
Fabio
Signature · 1 line
I'm going to make him an offer he can't refuse.