criu/0002-Fix-build-with-nftables-installed-in-different-direc.patch
Takashi Iwai fd3d011d18 Accepting request 977879 from home:tiwai:branches:devel:tools
- Update to criu 3.17:
  New features:
  * Introduced mount-v2 engine
  * Added support for MAP_HUGETLB mappings
  * Added support for Linux Restartable Sequences
  * Added support for SOCK_SEQPACKET unix sockets
  * CRIU AMD GPU plugin
  Bugfixes:
  * GCC 12 compatibility fixes
  * cgroup: fix --manage-cgroups=ignore
  * several memory leaks fixed in net, files, mount, tun and config
    subsystems
  * Improvements:
  * bpf: switch from deprecated bpf_create_map_xattr to bpf_map_create
  * bpfmap: handle map_extra field
  * setsockopt(SO_BUF_LOCK) support for tcp sockets
- New criu-plugin-amdgpu sub-package for AMDGPU ROCm plugin, enabled
  only for x86_64 and aarch64.
- Build fixes for plugins:
  criu-amdgpu-plugin-fix.patch
- Change the plugin install path to $libdir/criu:
  plugin-dir-path.patch

OBS-URL: https://build.opensuse.org/request/show/977879
OBS-URL: https://build.opensuse.org/package/show/devel:tools/criu?expand=0&rev=109
2022-05-18 07:36:00 +00:00

43 lines
1.8 KiB
Diff

From 95191250537d1cd872668647da76234241f16661 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 1 Dec 2020 16:32:19 +0100
Subject: [PATCH] Fix build with nftables installed in different directory
The cflags needs to be passed to the build test.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
Makefile.config | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/Makefile.config
+++ b/Makefile.config
@@ -38,13 +38,16 @@ else
endif
ifeq ($(call pkg-config-check,libnftables),y)
+ CFLAGS_NFTABLES := $(shell $(PKG_CONFIG) --cflags libnftables)
LIB_NFTABLES := $(shell $(PKG_CONFIG) --libs libnftables)
- ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(LIB_NFTABLES)),true)
+ ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(CFLAGS_NFTABLES) $(LIB_NFTABLES)),true)
LIBS_FEATURES += $(LIB_NFTABLES)
FEATURE_DEFINES += -DCONFIG_HAS_NFTABLES_LIB_API_0
- else ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_1),$(LIB_NFTABLES)),true)
+ FEATURE_CFLAGS += $(CFLAGS_NFTABLES)
+ else ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_1),$(CFLAGS_NFTABLES) $(LIB_NFTABLES)),true)
LIBS_FEATURES += $(LIB_NFTABLES)
FEATURE_DEFINES += -DCONFIG_HAS_NFTABLES_LIB_API_1
+ FEATURE_CFLAGS += $(CFLAGS_NFTABLES)
else
$(warning Warn: you have libnftables installed but it has incompatible API)
$(warning Warn: Building without nftables support)
@@ -75,7 +78,7 @@ endif
endif
export DEFINES += $(FEATURE_DEFINES)
-export CFLAGS += $(FEATURE_DEFINES)
+export CFLAGS += $(FEATURE_DEFINES) $(FEATURE_CFLAGS)
FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE OPENAT2