From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC7DCC004C9 for ; Tue, 7 May 2019 15:17:54 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 683CB205ED for ; Tue, 7 May 2019 15:17:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 683CB205ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34EE9343C; Tue, 7 May 2019 17:17:53 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 84A71293B for ; Tue, 7 May 2019 17:17:51 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 May 2019 08:17:50 -0700 X-ExtLoop1: 1 Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.96]) by orsmga002.jf.intel.com with SMTP; 07 May 2019 08:17:48 -0700 Received: by (sSMTP sendmail emulation); Tue, 07 May 2019 16:17:47 +0100 Date: Tue, 7 May 2019 16:17:47 +0100 From: Bruce Richardson To: Luca Boccassi Cc: dev@dpdk.org, "thomas@monjalon.net" Message-ID: <20190507151747.GA44@bricha3-MOBL.ger.corp.intel.com> References: <20190503133537.58712-1-bruce.richardson@intel.com> <20190503133537.58712-3-bruce.richardson@intel.com> <23fe250a768fc5031a7c9018c3d730764dc9e2c8.camel@debian.org> <20190507105016.GA38@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > For testing of DPDK, we want to override the prefix given by the > > > > pkg-config file, so that we can get correct paths for DPDK > > > > installed > > > > in an unusual location. > > > > > > > > Signed-off-by: Bruce Richardson < > > > > bruce.richardson@intel.com > > > > > > > > > > > > --- > > > > examples/bbdev_app/Makefile | 13 +++++++++---- > > > > examples/bond/Makefile | 13 +++++++++---- > > > > examples/cmdline/Makefile | 13 +++++++++---- > > > > examples/distributor/Makefile | 13 +++++++++---- > > > > examples/eventdev_pipeline/Makefile | 13 +++++++++---- > > > > examples/exception_path/Makefile | 13 +++++++++---- > > > > examples/fips_validation/Makefile | 13 +++++++++---- > > > > examples/flow_classify/Makefile | 13 +++++++++---- > > > > examples/flow_filtering/Makefile | 13 +++++++++---- > > > > examples/helloworld/Makefile | 13 +++++++++---- > > > > examples/ip_fragmentation/Makefile | 13 +++++++++---- > > > > examples/ip_pipeline/Makefile | 13 +++++++++---- > > > > examples/ip_reassembly/Makefile | 13 +++++++++---- > > > > examples/ipsec-secgw/Makefile | 13 +++++++++---- > > > > examples/ipv4_multicast/Makefile | 13 +++++++++---- > > > > examples/kni/Makefile | 13 +++++++++---- > > > > examples/l2fwd-cat/Makefile | 13 +++++++++---- > > > > examples/l2fwd-crypto/Makefile | 13 +++++++++---- > > > > examples/l2fwd-jobstats/Makefile | 13 +++++++++---- > > > > examples/l2fwd-keepalive/Makefile | 13 +++++++++---- > > > > examples/l2fwd/Makefile | 13 +++++++++---- > > > > examples/l3fwd-acl/Makefile | 13 +++++++++---- > > > > examples/l3fwd-power/Makefile | 13 +++++++++---- > > > > examples/l3fwd-vf/Makefile | 13 +++++++++---- > > > > examples/l3fwd/Makefile | 13 +++++++++---- > > > > examples/link_status_interrupt/Makefile | 13 +++++++++---- > > > > examples/load_balancer/Makefile | 13 +++++++++---- > > > > examples/packet_ordering/Makefile | 13 +++++++++---- > > > > examples/ptpclient/Makefile | 13 +++++++++---- > > > > examples/qos_meter/Makefile | 13 +++++++++---- > > > > examples/qos_sched/Makefile | 13 +++++++++---- > > > > examples/rxtx_callbacks/Makefile | 13 +++++++++---- > > > > examples/service_cores/Makefile | 13 +++++++++---- > > > > examples/skeleton/Makefile | 13 +++++++++---- > > > > examples/tep_termination/Makefile | 13 +++++++++---- > > > > examples/timer/Makefile | 13 +++++++++---- > > > > examples/vhost/Makefile | 13 +++++++++---- > > > > examples/vhost_scsi/Makefile | 13 +++++++++---- > > > > examples/vmdq/Makefile | 13 +++++++++---- > > > > examples/vmdq_dcb/Makefile | 13 +++++++++---- > > > > 40 files changed, 360 insertions(+), 160 deletions(-) > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > b/examples/bbdev_app/Makefile > > > > index e8115b46a..603932ace 100644 > > > > --- a/examples/bbdev_app/Makefile > > > > +++ b/examples/bbdev_app/Makefile > > > > @@ -18,10 +18,15 @@ shared: build/$(APP)-shared > > > > static: build/$(APP)-static > > > > ln -sf $(APP)-static build/$(APP) > > > > > > > > -PC_FILE := $(shell pkg-config --path libdpdk) > > > > -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) > > > > -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) > > > > -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs > > > > libdpdk) > > > > +PKGCONF=pkg-config > > > > +ifneq ($(DPDK_PC_PREFIX),) > > > > + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) > > > > +endif > > > > + > > > > +PC_FILE := $(shell $(PKGCONF) --path libdpdk) > > > > +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) > > > > +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) > > > > +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs > > > > libdpdk) > > > > > > > > CFLAGS += -DALLOW_EXPERIMENTAL_API > > > > > > Hi, > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > DPDK_PC_PREFIX variable? > > > > > > -- > > > > Perhaps I'm missing something, but I'm not seeing how, since the code > > above > > is already using the --define-variable flag. Swapping one pkg-config > > flag > > for another isn't likely to change the flow. Whatever way things > > work, we > > need an environment variable to pull in the path change. Since one > > doesn't > > seem to be available for pkg-config directly, we need a DPDK special- > > sauced > > one. > > > > /Bruce > > I think PKG_CONFIG_PATH is a more common and more well-understood flag > to use - using define-prefix should allow to use that instead > Yes, except pkg-config-path only gives the path to the pkg-config file, it doesn't affect the prefixes in the file itself, and it's the latter we need to modify.