mirror of
https://github.com/dynup/kpatch
synced 2025-02-23 05:16:58 +00:00
Merge pull request #548 from libin2015/fix-gcc-version-check
kpatch-build: fix gcc_version_check
This commit is contained in:
commit
3d49e37f11
@ -119,9 +119,9 @@ 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=$(readelf -p .comment $VMLINUX |grep GCC: | tr -s ' ' | cut -d ' ' -f6-)
|
||||
if [[ $gccver != $kgccver ]]; then
|
||||
local gccver=$(gcc --version |head -n1 |cut -d' ' -f2-)
|
||||
local kgccver=$(readelf -p .comment $VMLINUX |grep GCC: | tr -s ' ' | cut -d ' ' -f5-)
|
||||
if [[ "$gccver" != "$kgccver" ]]; then
|
||||
warn "gcc/kernel version mismatch"
|
||||
echo "gcc version: $gccver"
|
||||
echo "kernel version: $kgccver"
|
||||
|
Loading…
Reference in New Issue
Block a user