mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 14:12:06 +00:00
Merge pull request #561 from euspectre/gcc-gnu-fix
kpatch-build: fix gcc_version_check: both "GNU" and "GCC" are possible
This commit is contained in:
commit
f4b5eded0c
@ -119,8 +119,8 @@ find_dirs() {
|
|||||||
|
|
||||||
gcc_version_check() {
|
gcc_version_check() {
|
||||||
# ensure gcc version matches that used to build the kernel
|
# ensure gcc version matches that used to build the kernel
|
||||||
local gccver=$(gcc --version |head -n1 |cut -d' ' -f2-)
|
local gccver=$(gcc --version | head -n1 | cut -d' ' -f2- | sed 's/GNU/GCC/g')
|
||||||
local kgccver=$(readelf -p .comment $VMLINUX |grep GCC: | tr -s ' ' | cut -d ' ' -f5-)
|
local kgccver=$(readelf -p .comment $VMLINUX | grep GCC: | tr -s ' ' | cut -d ' ' -f5- | sed 's/GNU/GCC/g')
|
||||||
if [[ "$gccver" != "$kgccver" ]]; then
|
if [[ "$gccver" != "$kgccver" ]]; then
|
||||||
warn "gcc/kernel version mismatch"
|
warn "gcc/kernel version mismatch"
|
||||||
echo "gcc version: $gccver"
|
echo "gcc version: $gccver"
|
||||||
|
Loading…
Reference in New Issue
Block a user