diff options
author | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2006-08-28 16:44:41 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af> | 2006-08-28 16:44:41 +0000 |
commit | c6a69e4755affc9655d3aa417a4a750cf0e7b00a (patch) | |
tree | ea14d9ff7b80f59c8a1218df60ecc52225c21d00 /mcon/U/ccflags.U | |
parent | aeca756d010523c0adf95247c4d7164bba6b35d0 (diff) |
Default to "-O2 -g" when using gcc.
git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@12 190e5f8e-a817-0410-acf6-e9863daed9af
Diffstat (limited to 'mcon/U/ccflags.U')
-rw-r--r-- | mcon/U/ccflags.U | 21 |
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";; esac -$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". EOH + ;; +*) $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". + +EOH + ;; +esac rp="What optimizer/debugger flag should be used?" . ./myread optimize="$ans" |