From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id A2B4AA0096 for ; Tue, 7 May 2019 15:28:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F42E2BB8; Tue, 7 May 2019 15:28:15 +0200 (CEST) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id E418928FD for ; Tue, 7 May 2019 15:28:13 +0200 (CEST) Received: by mail-wm1-f67.google.com with SMTP id b10so20535599wmj.4 for ; Tue, 07 May 2019 06:28:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=P7kgs1OAJm9gtfwU+lC7jfkfPzM/AU3uh06uv3L7Pfc=; b=cEeZqH7hgPkWTDJin6HVUekdJW09A+HjVi7AkkW80U1KT8rtHJILRZBtvynhPW7GNs +td6dJSami313DdY64Ds+KMXEsbXfzfgazxK8q8wM3qhvMIodnEGQjdStShKUJtQFbIC 5Dm0lsKCNhtKhTQZCOVbIqV9OEJQ1HlinDcoqPmPb5qnssOldjTwLCd3z2uzvZ9Lc73U bR/NwuY23phdHC/XHVFcKtQQBABaZmdM6xSOuS6IB+0CHCvmWN86LdWtB1TdgxbQWGCs 5+FzwFSMPdu8lQq6/Twr2rszD3KkHtE6t1JinXMCOFR8VTx1UZa1my4gxLP/l5BiBJy/ s9PA== X-Gm-Message-State: APjAAAWWizGhjX5jA4PASfYxyc8Gz72OCOiKn7NQPo2bDULh7G2q0ryz hwC1Zsn9UmkC9e+wPu7duBs= X-Google-Smtp-Source: APXvYqyzPpTUDzZBEKyB4mNcYIh8rpzd7nfMRXEvwhCot7GRL5VkDIQUWyQbXVTy+thpoWyqxCQwvA== X-Received: by 2002:a05:600c:22c5:: with SMTP id 5mr2954967wmg.129.1557235693358; Tue, 07 May 2019 06:28:13 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id s3sm27218958wre.97.2019.05.07.06.28.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 06:28:12 -0700 (PDT) Message-ID: From: Luca Boccassi To: Bruce Richardson Cc: dev@dpdk.org, "thomas@monjalon.net" Date: Tue, 07 May 2019 14:28:11 +0100 In-Reply-To: <20190507105016.GA38@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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 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" Message-ID: <20190507132811._P3py3FgARSr5pXOoJQEwHrBxYLWR5fl0ayUQGOgWVo@z> 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. > > >=20 > > > Signed-off-by: Bruce Richardson < > > > bruce.richardson@intel.com > > >=20 > > >=20 > > > --- > > > 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(-) > > >=20 > > > 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) > > > =20 > > > -PC_FILE :=3D $(shell pkg-config --path libdpdk) > > > -CFLAGS +=3D -O3 $(shell pkg-config --cflags libdpdk) > > > -LDFLAGS_SHARED =3D $(shell pkg-config --libs libdpdk) > > > -LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell pkg-config --static --libs > > > libdpdk) > > > +PKGCONF=3Dpkg-config > > > +ifneq ($(DPDK_PC_PREFIX),) > > > + PKGCONF +=3D --define-variable=3Dprefix=3D$(DPDK_PC_PREFIX) > > > +endif > > > + > > > +PC_FILE :=3D $(shell $(PKGCONF) --path libdpdk) > > > +CFLAGS +=3D -O3 $(shell $(PKGCONF) --cflags libdpdk) > > > +LDFLAGS_SHARED =3D $(shell $(PKGCONF) --libs libdpdk) > > > +LDFLAGS_STATIC =3D -Wl,-Bstatic $(shell $(PKGCONF) --static --libs > > > libdpdk) > > > =20 > > > CFLAGS +=3D -DALLOW_EXPERIMENTAL_API > >=20 > > Hi, > >=20 > > Would using "--define-prefix" allow to avoid the special-sauced > > DPDK_PC_PREFIX variable? > >=20 > > --=20 >=20 > 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. >=20 > /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 --=20 Kind regards, Luca Boccassi