kpatch-build: fix gcc version check on ubuntu

This commit is contained in:
Josh Poimboeuf 2014-07-02 06:17:59 -05:00
parent aaf1bf3e8e
commit 5893a28fdf

View File

@ -105,7 +105,7 @@ find_dirs() {
gcc_version_check() {
# ensure gcc version matches that used to build the kernel
local gccver=$(gcc --version |head -n1 |cut -d' ' -f3-)
local kgccver=$(strings $VMLINUX |grep "GCC:" |cut -d' ' -f3-)
local kgccver=$(strings $VMLINUX |grep "GCC:" |head -n1 |cut -d' ' -f3-)
if [[ $gccver != $kgccver ]]; then
warn "gcc/kernel version mismatch"
return 1