message: configure: don't set -march=westmere on older Linux machines
diff: #!/usr/bin/env python
  #-*- mode: python; -*-
  +from platform import system
  from support.config import ConfigBuilder, slurp, exe_available
  from os import environ, curdir, listdir
  from os.path import abspath
  @@ -41,6 +42,15 @@ if c.clangcov_build:
  c.prefer('ranlib', 'llvm-ranlib')
  c.append('ldflags', '-fuse-ld=lld')
  +modern_cpu = True
  +if system() == 'Linux':
  + # we need to check if the CPU is recent enough to use popcnt and
  + # AVX instructions
  + cpuinfo = slurp('/proc/cpuinfo').splitlines()
  + flags = [l for l in cpuinfo if l.startswith('flags')][0]
  + modern_cpu = 'popcnt' in flags and 'avx' in flags
  +
  +if modern_cpu:
  c.append('cflags', '-march=westmere')
  c.append('ldflags', '-march=westmere')
  c.append('cflags', '-mavx')
  