507a508,513
> # According to the readme, tcmalloc works best if the compiler doesn't
> # assume that we're using the builtin malloc and friends. These flags
> # are compiler-specific, so we need to set them after we detect which
> # compiler we're using.
> main['TCMALLOC_CCFLAGS'] = []
>
583a590,592
> main.Append(TCMALLOC_CCFLAGS=['-fno-builtin-malloc', '-fno-builtin-calloc',
> '-fno-builtin-realloc', '-fno-builtin-free'])
>
609a619,620
> main.Append(TCMALLOC_CCFLAGS=['-fno-builtin'])
>
917c928,930
< if not conf.CheckLib('tcmalloc_minimal'):
---
> if conf.CheckLib('tcmalloc_minimal'):
> main.Append(CCFLAGS=main['TCMALLOC_CCFLAGS'])
> else: