Skip to content

Commit f4b5ede

Browse files
committed
Merge pull request #561 from euspectre/gcc-gnu-fix
kpatch-build: fix gcc_version_check: both "GNU" and "GCC" are possible
2 parents 129fb4a + 5737028 commit f4b5ede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: kpatch-build/kpatch-build

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ find_dirs() {
119119

120120
gcc_version_check() {
121121
# ensure gcc version matches that used to build the kernel
122-
local gccver=$(gcc --version |head -n1 |cut -d' ' -f2-)
123-
local kgccver=$(readelf -p .comment $VMLINUX |grep GCC: | tr -s ' ' | cut -d ' ' -f5-)
122+
local gccver=$(gcc --version | head -n1 | cut -d' ' -f2- | sed 's/GNU/GCC/g')
123+
local kgccver=$(readelf -p .comment $VMLINUX | grep GCC: | tr -s ' ' | cut -d ' ' -f5- | sed 's/GNU/GCC/g')
124124
if [[ "$gccver" != "$kgccver" ]]; then
125125
warn "gcc/kernel version mismatch"
126126
echo "gcc version: $gccver"

0 commit comments

Comments
 (0)