patch for to set cflags for gdb

Doug Alcorn (
23 Apr 2001 23:42:11 -0400


Right now there's no good way to turn off code optimization using
configure.  It seems like the '--enable-gdb' option should disable
"-O2".  I know that if you are actually using gdb you can debug
optimized code.  I just don't find this sane however.  Therefore, this
patch.  Use it or drop it.  No matter to me.  It is against cvs co
afterstep-stable as of Mon Apr 23 23:29:32 EDT 2001

Content-Type: text/x-patch
Content-Disposition: attachment; filename=lathi.gdb-cflags.patch
Content-Description: turn off optimized code while compiling for gdb

diff -N -u -r afterstep-stable.orig/autoconf/ afterstep-stable/autoconf/
--- afterstep-stable.orig/autoconf/	Mon Apr 23 23:37:22 2001
+++ afterstep-stable/autoconf/	Mon Apr 23 23:37:55 2001
@@ -117,6 +117,8 @@
 if test "x$enable_gdb" = "xyes"; then
+dnl# It doesn't make sense to have -O2 when you are doing -g
+  CFLAGS=`echo $CFLAGS | sed 's/-O2//'`


(__) Doug Alcorn <> chat:lathinet@yahoo|aol
oo / PGP 02B3 1E26 BCF2 9AAF 93F1  61D7 450C B264 3E63 D543
|_/  If you're a capitalist and you have the best goods and they're
     free, you don't have to proselytize, you just have to wait.

The AfterStep Window Manager for X User's Mailing List