path: root/mcon/U
diff options
authorrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2006-08-28 16:44:41 +0000
committerrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2006-08-28 16:44:41 +0000
commitc6a69e4755affc9655d3aa417a4a750cf0e7b00a (patch)
treeea14d9ff7b80f59c8a1218df60ecc52225c21d00 /mcon/U
parentaeca756d010523c0adf95247c4d7164bba6b35d0 (diff)
Default to "-O2 -g" when using gcc.
git-svn-id: 190e5f8e-a817-0410-acf6-e9863daed9af
Diffstat (limited to 'mcon/U')
1 files changed, 19 insertions, 2 deletions
diff --git a/mcon/U/ccflags.U b/mcon/U/ccflags.U
index 8e61474..13b511e 100644
--- a/mcon/U/ccflags.U
+++ b/mcon/U/ccflags.U
@@ -94,10 +94,16 @@
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
' '|$undef) dflt='none';;
-'') dflt='-O';;
+ case "$gccversion" in
+ '') dflt='-O';;
+ *) dflt='-O2 -g';;
+ esac
+ ;;
*) dflt="$optimize";;
-$cat <<EOH
+case "$gccversion" in
+'') $cat <<EOH
Some C compilers have problems with their optimizers. By default, $package
compiles with the -O flag to use the optimizer. Alternately, you might want
@@ -106,6 +112,17 @@ systems). Either flag can be specified here. To use neither flag, specify
the word "none".
+ ;;
+*) $cat <<EOH
+With the GNU C compiler, it is possible to supply both -O2 and -g flags, to
+be able to reasonably optimize, whilst retaining the ability to use a
+symbolic debugger. Either flag can be specified here. To use neither flag,
+specify the word "none".
+ ;;
rp="What optimizer/debugger flag should be used?"
. ./myread