From: Valentin Vidic Date: Sun, 18 Nov 2018 10:22:59 +0100 Subject: [Cluster-devel] [PATCH] dlm_controld: fix pkg-config call for cross build Message-ID: <20181118092259.13543-1-Valentin.Vidic@CARNet.hr> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit From: Helmut Grohne 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. Signed-off-by: Valentin Vidic --- dlm_controld/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile index 85c2db12..75c5750e 100644 --- a/dlm_controld/Makefile +++ b/dlm_controld/Makefile @@ -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) -- 2.19.1