From 7b9629fc0a7b9c7b33a4c3e1abf8692082459027 Mon Sep 17 00:00:00 2001 From: Evgenii Shatokhin Date: Wed, 21 Oct 2015 21:13:23 +0300 Subject: [PATCH] kpatch-build: do not use -ffunction-sections for a patch module itself -ffunction-sections and -fdata-sections are needed when building the original and the patched kernels. It is not necessary, however, to use these options when building a patch module itself, its functions and data are OK in the sections they are. Let us remove these options from KCGLAGS after the kernels have been built. --- kpatch-build/kpatch-build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index d59979f..c802770 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -537,6 +537,8 @@ echo -n "Patched objects:" for i in "${!objnames[@]}"; do echo -n " $(basename $i)"; done echo +export KCFLAGS="-I$DATADIR/patch" + echo "Building patch module: kpatch-$PATCHNAME.ko" cp "$OBJDIR/.config" "$SRCDIR" cd "$SRCDIR"