For many architectures (armv6, aarch64), is -mcpu is essential for proper detection of CPU features. Follow compile.test case and reuse CXXFLAGS from make environment also in arch.test. --- config.tests/unix/arch.test.orig 2017-02-05 07:43:57 UTC +++ config.tests/unix/arch.test @@ -17,7 +17,7 @@ else fi LFLAGS="$SYSROOT_FLAG" -CXXFLAGS="$SYSROOT_FLAG" +CXXFLAGS="$CXXFLAGS $SYSROOT_FLAG" while [ "$#" -gt 0 ]; do PARAM=$1