Makefile.config: set CR_PLUGIN_DEFAULT variable

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 <rstoyanov@fedoraproject.org>
This commit is contained in:
Radostin Stoyanov 2024-09-26 10:59:32 +01:00 committed by Andrei Vagin
parent f1d465448f
commit 4f8f6f2883
2 changed files with 5 additions and 1 deletions

View file

@ -59,6 +59,10 @@ endif
export LIBS += $(LIBS_FEATURES)
ifneq ($(PLUGINDIR),)
FEATURE_DEFINES += -DCR_PLUGIN_DEFAULT="\"$(PLUGINDIR)\""
endif
CONFIG_FILE = .config
$(CONFIG_FILE):

View file

@ -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)