From: Andreas Sandberg Date: Mon, 18 Mar 2013 10:24:56 +0000 (+0100) Subject: scons: Try to use 'tcmalloc' before 'tcmalloc_minimal' X-Git-Tag: stable_2013_06_16~52 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e28e6246fc106569909124ada78603ae1507a972;p=gem5.git scons: Try to use 'tcmalloc' before 'tcmalloc_minimal' tcmalloc_minimal doesn't support the heap checker on Debian, while tcmalloc does. Instead of always linking with tcmalloc_minimal, if it exists, we first check for tcmalloc and then use tcmalloc_minimal as a fallback. --- diff --git a/SConstruct b/SConstruct index b175cb491..6354bf0ca 100755 --- a/SConstruct +++ b/SConstruct @@ -925,7 +925,9 @@ have_posix_clock = \ conf.CheckLibWithHeader('rt', 'time.h', 'C', 'clock_nanosleep(0,0,NULL,NULL);') -if conf.CheckLib('tcmalloc_minimal'): +if conf.CheckLib('tcmalloc'): + main.Append(CCFLAGS=main['TCMALLOC_CCFLAGS']) +elif conf.CheckLib('tcmalloc_minimal'): main.Append(CCFLAGS=main['TCMALLOC_CCFLAGS']) else: print termcap.Yellow + termcap.Bold + \