Build gcc.debug using -Og flag

Since gcc 4.8 is required anyways, it might be nice to use its features.

Intro to feature (second bullet point):
https://gcc.gnu.org/gcc-4.8/changes.html

-g (line 328) is still needed:
http://stackoverflow.com/questions/12970596/gcc-4-8-does-og-imply-g
This commit is contained in:
MarkusTeufelberger
2014-09-24 11:23:05 +02:00
committed by Vinnie Falco
parent 7f43ab9097
commit c54aff74b3

View File

@@ -259,7 +259,7 @@ def config_env(toolchain, variant, env):
'-Wno-sign-compare',
'-Wno-char-subscripts',
'-Wno-format',
'-g' # enable debug symbols for gcc and clang
'-g' # generate debug symbols
])
if toolchain == 'clang':
@@ -367,6 +367,11 @@ def config_env(toolchain, variant, env):
env.Append(CPPDEFINES={
'_FORTIFY_SOURCE': 2
})
# Build debuggable but still optimized executable
# via -Og switch introduced in GCC 4.8
env.Append(CCFLAGS=[
'-Og' # Debuggable optimizations, new in GCC 4.8
])
elif toolchain == 'msvc':
env.Append (CPPPATH=[