Skip to content

Commit

Permalink
Makefile.config: set CR_PLUGIN_DEFAULT variable
Browse files Browse the repository at this point in the history
By default, CRIU uses the path "/usr/lib/criu" to install and load
plugins at runtime. This path is defined by the `PLUGINDIR` variable
in Makefile.install and `CR_PLUGIN_DEFAULT` in `criu/include/plugin.h`.
However, some distribution packages might install the CRIU plugins at
"/usr/lib64/criu" instead. This patch updates the makefile to align
the path defined by `CR_PLUGIN_DEFAULT` with the value of `PLUGINDIR`.

Signed-off-by: Radostin Stoyanov <[email protected]>
  • Loading branch information
rst0git committed Sep 26, 2024
1 parent 1079a51 commit bb35901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ endif

export LIBS += $(LIBS_FEATURES)

ifneq ($(PLUGINDIR),)
FEATURE_DEFINES += -DCR_PLUGIN_DEFAULT="\"$(PLUGINDIR)\""
endif

CONFIG_FILE = .config

$(CONFIG_FILE):
Expand Down
2 changes: 1 addition & 1 deletion plugins/amdgpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DEPS_NOK := ;
__nmk_dir ?= ../../scripts/nmk/scripts/
include $(__nmk_dir)msg.mk

PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC -DCR_PLUGIN_DEFAULT="$(PLUGINDIR)"
PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC
PLUGIN_LDFLAGS := -lpthread -lrt -ldrm -ldrm_amdgpu

ifeq ($(CONFIG_AMDGPU),y)
Expand Down

0 comments on commit bb35901

Please sign in to comment.