Linkgraph: Enable MCF custom allocator only for GCC 4.9+

Earlier compilers don't use std::allocator_traits to query allocators.
This commit is contained in:
Jonathan G Rennison
2015-11-29 17:36:46 +00:00
parent af93385f41
commit 58b6bf16c3
2 changed files with 19 additions and 2 deletions

View File

@@ -1413,6 +1413,11 @@ make_compiler_cflags() {
flags="$flags -Wno-free-nonheap-object"
fi
if [ $cc_version -ge 49 ]; then
# Enable use of C++11 custom allocators
CFLAGS="$CFLAGS -DCUSTOM_ALLOCATOR"
fi
if [ "$enable_lto" != "0" ]; then
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
has_lto=`$1 -dumpspecs | grep '\%{flto'`