kpatch-gcc: use relative path when filtering objects to ignore

When building out-of-tree modules, gcc may be passed full source
pathnames (like /home/user/testmod/testmod.c).  Adjust the filepath
filtering in kpatch-gcc to match against files relative to the
KPATCH_GCC_SRCDIR / kpatch-build SRCDIR prefix.

Fixes: #941
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
Joe Lawrence 2019-02-14 15:03:20 -05:00
parent 9863f5fa9b
commit fd9806b152
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then
[[ "$obj" = */.tmp_*.o ]] && obj="${obj/.tmp_/}"
relobj=${obj//$KPATCH_GCC_SRCDIR\//}
case "$obj" in
case "$relobj" in
*.mod.o|\
*built-in.o|\
*built-in.a|\