File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 11KPATCH_BUILD ?= /lib/modules/$(shell uname -r) /build
2- KPATCH_MAKE = $(MAKE ) -C $(KPATCH_BUILD ) M=$(PWD )
2+ KPATCH_MAKE = $(MAKE ) -C $(KPATCH_BUILD ) M=$(PWD ) CFLAGS_MODULE=' $( CFLAGS_MODULE ) '
33LDFLAGS += $(KPATCH_LDFLAGS )
44
5- # ppc64le kernel modules are expected to compile with the
6- # -mcmodel=large flag. This enables 64-bit relocations
7- # instead of a 32-bit offset from the TOC pointer.
8- PROCESSOR = $(shell uname -m)
9- ifeq ($(PROCESSOR ) , ppc64le)
10- KBUILD_CFLAGS_MODULE += -mcmodel=large
11- endif
12-
135obj-m += $(KPATCH_NAME ) .o
146ldflags-y += -T $(src ) /kpatch.lds
157targets += kpatch.lds
Original file line number Diff line number Diff line change @@ -849,7 +849,7 @@ if grep -q "CONFIG_LIVEPATCH=y" "$CONFIGFILE" && (kernel_is_rhel || kernel_versi
849849 if [[ " $KLP_REPLACE " -eq 1 ]] ; then
850850 support_klp_replace || die " The kernel doesn't support klp replace"
851851 else
852- export KBUILD_CFLAGS_MODULE =" $KBUILD_CFLAGS_MODULE -DKLP_REPLACE_ENABLE=false"
852+ export CFLAGS_MODULE =" $CFLAGS_MODULE -DKLP_REPLACE_ENABLE=false"
853853 fi
854854else
855855 # No support for livepatch in the kernel. Kpatch core module is needed.
Original file line number Diff line number Diff line change @@ -10,13 +10,13 @@ local: slow
1010remote : remote_slow
1111
1212slow : clean
13- ./kpatch-test -d $(PATCH_DIR ) $(PATCHES )
13+ ./kpatch-test --kpatch-build-opts= " $( KPATCH_BUILD_OPTS ) " - d $(PATCH_DIR ) $(PATCHES )
1414
1515quick : clean
16- ./kpatch-test -d $(PATCH_DIR ) --quick $(PATCHES )
16+ ./kpatch-test --kpatch-build-opts= " $( KPATCH_BUILD_OPTS ) " - d $(PATCH_DIR ) --quick $(PATCHES )
1717
1818cached :
19- ./kpatch-test -d $(PATCH_DIR ) --cached $(PATCHES )
19+ ./kpatch-test --kpatch-build-opts= " $( KPATCH_BUILD_OPTS ) " - d $(PATCH_DIR ) --cached $(PATCHES )
2020
2121vagrant : vagrant-quick
2222
You can’t perform that action at this time.
0 commit comments