Skip to content

Commit afcfbfa

Browse files
committed
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: dynup#941 Signed-off-by: Joe Lawrence <[email protected]>
1 parent 71a626a commit afcfbfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kpatch-build/kpatch-gcc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then
2424

2525
[[ "$obj" = */.tmp_*.o ]] && obj="${obj/.tmp_/}"
2626
relobj=${obj//$KPATCH_GCC_SRCDIR\//}
27-
case "$obj" in
27+
case "$relobj" in
2828
*.mod.o|\
2929
*built-in.o|\
3030
*built-in.a|\

0 commit comments

Comments
 (0)