From nobody Thu May 16 16:52:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1677157438459495.793944929135; Thu, 23 Feb 2023 05:03:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.500346.771678 (Exim 4.92) (envelope-from ) id 1pVBFs-0005Wo-Sz; Thu, 23 Feb 2023 13:03:24 +0000 Received: by outflank-mailman (output) from mailman id 500346.771678; Thu, 23 Feb 2023 13:03:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pVBFs-0005Wh-QB; Thu, 23 Feb 2023 13:03:24 +0000 Received: by outflank-mailman (input) for mailman id 500346; Thu, 23 Feb 2023 13:03:23 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pVBFr-0005Wb-PL for xen-devel@lists.xenproject.org; Thu, 23 Feb 2023 13:03:23 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id 72f3f6a2-b37a-11ed-88bb-e56d68cac8db; Thu, 23 Feb 2023 14:03:22 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 02594C14; Thu, 23 Feb 2023 05:04:04 -0800 (PST) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3B3B83F881; Thu, 23 Feb 2023 05:03:20 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 72f3f6a2-b37a-11ed-88bb-e56d68cac8db From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: jens.wiklander@linaro.org, Wei Liu , Anthony PERARD , Juergen Gross Subject: [PATCH] tools: Use PKG_CONFIG_FILE instead of PKG_CONFIG variable Date: Thu, 23 Feb 2023 13:03:03 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1677157440464100001 Content-Type: text/plain; charset="utf-8" Replace PKG_CONFIG variable name with PKG_CONFIG_FILE for the name of the pkg-config file. This is preventing a conflict in some build systems where PKG_CONFIG actually contains the path to the pkg-config executable to use, as the default assignment in libs.mk is using a weak assignment (?=3D). This problem has been found when trying to build the latest version of Xen tools using buildroot. Signed-off-by: Bertrand Marquis Reviewed-by: Anthony PERARD --- tools/libs/ctrl/Makefile | 2 +- tools/libs/libs.mk | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index 094e84b8d819..5fe0bfad0c7e 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk include Makefile.common =20 LIBHEADER :=3D xenctrl.h xenctrl_compat.h -PKG_CONFIG :=3D xencontrol.pc +PKG_CONFIG_FILE :=3D xencontrol.pc PKG_CONFIG_NAME :=3D Xencontrol =20 NO_HEADERS_CHK :=3D y diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index ffb6c9f064f1..8115aa58a671 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -1,7 +1,7 @@ # Common Makefile for building a lib. # # Variables taken as input: -# PKG_CONFIG: name of pkg-config file (xen$(LIBNAME).pc if empty) +# PKG_CONFIG_FILE: name of pkg-config file (xen$(LIBNAME).pc if empty) # MAJOR: major version of lib (Xen version if empty) # MINOR: minor version of lib (0 if empty) # version-script: Specify the name of a version script to the linker. @@ -30,7 +30,7 @@ endif =20 version-script ?=3D lib$(LIB_FILE_NAME).map.tmp =20 -PKG_CONFIG ?=3D $(LIB_FILE_NAME).pc +PKG_CONFIG_FILE ?=3D $(LIB_FILE_NAME).pc PKG_CONFIG_NAME ?=3D Xen$(LIBNAME) PKG_CONFIG_DESC ?=3D The $(PKG_CONFIG_NAME) library for Xen hypervisor PKG_CONFIG_VERSION :=3D $(MAJOR).$(MINOR) @@ -39,13 +39,13 @@ PKG_CONFIG_LIB :=3D $(LIB_FILE_NAME) PKG_CONFIG_REQPRIV :=3D $(subst $(space),$(comma),$(strip $(foreach lib,$(= patsubst ctrl,control,$(USELIBS_$(LIBNAME))),xen$(lib)))) =20 ifneq ($(CONFIG_LIBXC_MINIOS),y) -TARGETS +=3D $(PKG_CONFIG) -$(PKG_CONFIG): PKG_CONFIG_PREFIX =3D $(prefix) -$(PKG_CONFIG): PKG_CONFIG_INCDIR =3D $(includedir) -$(PKG_CONFIG): PKG_CONFIG_LIBDIR =3D $(libdir) +TARGETS +=3D $(PKG_CONFIG_FILE) +$(PKG_CONFIG_FILE): PKG_CONFIG_PREFIX =3D $(prefix) +$(PKG_CONFIG_FILE): PKG_CONFIG_INCDIR =3D $(includedir) +$(PKG_CONFIG_FILE): PKG_CONFIG_LIBDIR =3D $(libdir) endif =20 -PKG_CONFIG_LOCAL :=3D $(PKG_CONFIG_DIR)/$(PKG_CONFIG) +PKG_CONFIG_LOCAL :=3D $(PKG_CONFIG_DIR)/$(PKG_CONFIG_FILE) =20 LIBHEADER ?=3D $(LIB_FILE_NAME).h LIBHEADERS =3D $(foreach h, $(LIBHEADER), $(XEN_INCLUDE)/$(h)) @@ -108,7 +108,7 @@ install:: all $(SYMLINK_SHLIB) lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(lib= dir)/lib$(LIB_FILE_NAME).so.$(MAJOR) $(SYMLINK_SHLIB) lib$(LIB_FILE_NAME).so.$(MAJOR) $(DESTDIR)$(libdir)/lib$= (LIB_FILE_NAME).so for i in $(LIBHEADERS); do $(INSTALL_DATA) $$i $(DESTDIR)$(includedir); d= one - $(INSTALL_DATA) $(PKG_CONFIG) $(DESTDIR)$(PKG_INSTALLDIR) + $(INSTALL_DATA) $(PKG_CONFIG_FILE) $(DESTDIR)$(PKG_INSTALLDIR) =20 .PHONY: uninstall uninstall:: --=20 2.25.1