Merge pull request #630 from jpoimboe/LDFLAGS_vmlinux

kpatch-build: fix 'undefined reference to kpatch_shadow_*' errors
This commit is contained in:
Jessica Yu 2016-12-11 23:37:21 -08:00 committed by GitHub
commit f9cfd80718
2 changed files with 4 additions and 3 deletions

View File

@ -515,10 +515,7 @@ patch -N -p1 < "$APPLIEDPATCHFILE" >> "$LOGFILE" 2>&1 || die
mkdir -p "$TEMPDIR/orig" "$TEMPDIR/patched"
KPATCH_GCC_TEMPDIR=$TEMPDIR
export KPATCH_GCC_TEMPDIR
# TODO: remove custom LDFLAGS and ugly "undefined reference" grep when core
# module gets moved to the kernel tree
CROSS_COMPILE="$TOOLSDIR/kpatch-gcc " \
LDFLAGS_vmlinux="--warn-unresolved-symbols" \
KBUILD_MODPOST_WARN=1 \
make "-j$CPUS" $TARGETS "O=$OBJDIR" >> "$LOGFILE" 2>&1 || die
[[ "${PIPESTATUS[0]}" -eq 0 ]] || die

View File

@ -58,6 +58,10 @@ elif [[ "$TOOLCHAINCMD" = "ld" ]] ; then
cp -f "$obj" "$KPATCH_GCC_TEMPDIR/module/$obj"
break
;;
.tmp_vmlinux*|vmlinux)
args+=(--warn-unresolved-symbols)
break
;;
*)
break
;;