Fix CPU feature flag detection under FreeBSD

pull/263/head
Jeffrey Walton 2016-09-09 17:55:46 -04:00
parent a571f1e214
commit 42715f4e83
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,8 @@ if [[ ("$IS_X86" -ne "0" || "$IS_X64" -ne "0") ]]; then
X86_CPU_FLAGS=$(sysctl machdep.cpu.features 2>&1 | cut -f 2 -d ':')
elif [[ ("$IS_SOLARIS" -ne "0") ]]; then
X86_CPU_FLAGS=$(isainfo -v 2>/dev/null)
elif [[ ("$IS_FREEBSD" -ne "0") ]]; then
X86_CPU_FLAGS=$(grep Features /var/run/dmesg.boot)
else
X86_CPU_FLAGS=$(cat /proc/cpuinfo 2>&1 | "$AWK" '{IGNORECASE=1}{if ($1 == "flags"){print;exit}}' | cut -f 2 -d ':')
fi