Skip to contentSkip to conversation

dlm_controld: fix pkg-config call for cross build

PATCH New Valentin Vidic 1 participant 1 message Nov 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dlm_controld: fix pkg-config call for cross build

From: Helmut Grohne <[email protected]>

dlm fails to cross build from source, because the upstream Makefile hard codes the build architecture pkg-config. The attached patch makes pkg-config substitutable.

---
 dlm_controld/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
dlm_controld/Makefile +3 -2
index 85c2db12..75c5750e 100644
@@ -48,10 +48,11 @@ BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie
 BIN_LDFLAGS += -lpthread -lrt -lcpg -lcmap -lcfg -lquorum
 LIB_LDFLAGS += $(LDFLAGS) -Wl,-z,relro -pie
 
+PKG_CONFIG ?= pkg-config
 ifeq ($(USE_SD_NOTIFY),yes)
-	BIN_CFLAGS += $(shell pkg-config --cflags libsystemd) \
+	BIN_CFLAGS += $(shell $(PKG_CONFIG) --cflags libsystemd) \
 		      -DUSE_SD_NOTIFY
-	BIN_LDFLAGS += $(shell pkg-config --libs libsystemd)
+	BIN_LDFLAGS += $(shell $(PKG_CONFIG) --libs libsystemd)
 endif
 
 all: $(LIB_TARGET) $(BIN_TARGET)
Signature · 1 line
2.19.1