314,317c314,327
< # Solaris seems to have some issue with DWARF2 debugging information, it's ok
< # with stabs though
< if sys.platform == 'sunos5':
< debug_flag = '-gstabs+'
---
> ccflags = {}
> if env['GCC']:
> if sys.platform == 'sunos5':
> ccflags['debug'] = '-gstabs+'
> else:
> ccflags['debug'] = '-ggdb3'
> ccflags['opt'] = '-g -O3'
> ccflags['fast'] = '-O3'
> ccflags['prof'] = '-O3 -g -pg'
> elif env['SUNCC']:
> ccflags['debug'] = '-g0'
> ccflags['opt'] = '-g -O'
> ccflags['fast'] = '-fast'
> ccflags['prof'] = '-fast -g -pg'
319c329,330
< debug_flag = '-ggdb3'
---
> print 'Unknown compiler, please fix compiler options'
> Exit(1)
322c333
< CCFLAGS = Split('%s -O0' % debug_flag),
---
> CCFLAGS = Split(ccflags['debug']),
327c338
< CCFLAGS = Split('-g -O3'),
---
> CCFLAGS = Split(ccflags['opt']),
332c343
< CCFLAGS = Split('-O3'),
---
> CCFLAGS = Split(ccflags['fast']),
337c348
< CCFLAGS = Split('-O3 -g -pg'),
---
> CCFLAGS = Split(ccflags['prof']),