kpatch/kpatch-build/kpatch-gcc
Josh Poimboeuf 1b9868ed33 kpatch-gcc: exclude system_certificates.o
Fixes the following issue when running kpatch-build against the latest
upstream kernel:

    system_certificates.o: no changed functions were found
2014-08-08 14:18:46 -05:00

46 lines
782 B
Bash
Executable File

#!/bin/bash
set -x
TOOLCHAINCMD="$1"
shift
if [[ "$TOOLCHAINCMD" != "gcc" ]] || [[ -z "$TEMPDIR" ]]; then
exec "$TOOLCHAINCMD" "$@"
fi
declare -a args=($@)
while [ "$#" -gt 0 ]; do
if [ "$1" = "-o" ]; then
case "$2" in
*.mod.o|\
*built-in.o|\
vmlinux.o|\
.tmp_kallsyms1.o|\
.tmp_kallsyms2.o|\
init/version.o|\
arch/x86/boot/version.o|\
arch/x86/boot/compressed/eboot.o|\
arch/x86/boot/header.o|\
arch/x86/boot/compressed/efi_stub_64.o|\
arch/x86/boot/compressed/piggy.o|\
kernel/system_certificates.o|\
.*.o)
break;
;;
*.o)
mkdir -p "$TEMPDIR/orig/$(dirname $2)"
cp -f "$2" "$TEMPDIR/orig/$2"
echo "$2" >> "$TEMPDIR/changed_objs"
;;
*)
break
;;
esac
fi
shift
done
exec "$TOOLCHAINCMD" "${args[@]}"