scons: Drop gprof support for profile builds; tweak optimization flags instead.

gprof is useful for shared libraries, hence our drivers. Nevertheless
profilers like oprofile can benefit from disabling some relatively
minor optimizations for more accurate / complete results.
This commit is contained in:
José Fonseca
2009-09-20 18:07:16 +01:00
parent 911a7a82cd
commit 1a9eec84bd

View File

@@ -334,7 +334,11 @@ def generate(env):
else: else:
ccflags += ['-O3', '-g3'] ccflags += ['-O3', '-g3']
if env['profile']: if env['profile']:
ccflags += ['-pg'] # See http://code.google.com/p/jrfonseca/wiki/Gprof2Dot#Which_options_should_I_pass_to_gcc_when_compiling_for_profiling?
ccflags += [
'-fno-omit-frame-pointer',
'-fno-optimize-sibling-calls',
]
if env['machine'] == 'x86': if env['machine'] == 'x86':
ccflags += [ ccflags += [
'-m32', '-m32',