mirror of https://github.com/dynup/kpatch
Merge pull request #1205 from joe-lawrence/atomic-replace-fixes
Makefile tweaks for handling non-replace kpatch building
This commit is contained in:
commit
1ca8e8fc1f
|
@ -1,15 +1,7 @@
|
|||
KPATCH_BUILD ?= /lib/modules/$(shell uname -r)/build
|
||||
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(PWD)
|
||||
KPATCH_MAKE = $(MAKE) -C $(KPATCH_BUILD) M=$(PWD) CFLAGS_MODULE='$(CFLAGS_MODULE)'
|
||||
LDFLAGS += $(KPATCH_LDFLAGS)
|
||||
|
||||
# ppc64le kernel modules are expected to compile with the
|
||||
# -mcmodel=large flag. This enables 64-bit relocations
|
||||
# instead of a 32-bit offset from the TOC pointer.
|
||||
PROCESSOR = $(shell uname -m)
|
||||
ifeq ($(PROCESSOR), ppc64le)
|
||||
KBUILD_CFLAGS_MODULE += -mcmodel=large
|
||||
endif
|
||||
|
||||
obj-m += $(KPATCH_NAME).o
|
||||
ldflags-y += -T $(src)/kpatch.lds
|
||||
targets += kpatch.lds
|
||||
|
|
|
@ -849,7 +849,7 @@ if grep -q "CONFIG_LIVEPATCH=y" "$CONFIGFILE" && (kernel_is_rhel || kernel_versi
|
|||
if [[ "$KLP_REPLACE" -eq 1 ]] ; then
|
||||
support_klp_replace || die "The kernel doesn't support klp replace"
|
||||
else
|
||||
export KBUILD_CFLAGS_MODULE="$KBUILD_CFLAGS_MODULE -DKLP_REPLACE_ENABLE=false"
|
||||
export CFLAGS_MODULE="$CFLAGS_MODULE -DKLP_REPLACE_ENABLE=false"
|
||||
fi
|
||||
else
|
||||
# No support for livepatch in the kernel. Kpatch core module is needed.
|
||||
|
|
|
@ -10,13 +10,13 @@ local: slow
|
|||
remote: remote_slow
|
||||
|
||||
slow: clean
|
||||
./kpatch-test -d $(PATCH_DIR) $(PATCHES)
|
||||
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) $(PATCHES)
|
||||
|
||||
quick: clean
|
||||
./kpatch-test -d $(PATCH_DIR) --quick $(PATCHES)
|
||||
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) --quick $(PATCHES)
|
||||
|
||||
cached:
|
||||
./kpatch-test -d $(PATCH_DIR) --cached $(PATCHES)
|
||||
./kpatch-test --kpatch-build-opts="$(KPATCH_BUILD_OPTS)" -d $(PATCH_DIR) --cached $(PATCHES)
|
||||
|
||||
vagrant: vagrant-quick
|
||||
|
||||
|
|
Loading…
Reference in New Issue