From 5893a28fdfa113621e0173141801cbf17c3d21c0 Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Wed, 2 Jul 2014 06:17:59 -0500 Subject: [PATCH] kpatch-build: fix gcc version check on ubuntu --- kpatch-build/kpatch-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index 80ff4c0..e2b6718 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -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