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 9A251A0AC5 for ; Thu, 2 May 2019 18:52:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D99B1B1F7; Thu, 2 May 2019 18:52:18 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id AD80D1B1EE for ; Thu, 2 May 2019 18:52:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 09:52:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,422,1549958400"; d="scan'208";a="154194157" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by FMSMGA003.fm.intel.com with ESMTP; 02 May 2019 09:52:10 -0700 From: Bruce Richardson To: thomas@monjalon.net Cc: dev@dpdk.org, bluca@debian.org, Bruce Richardson Date: Thu, 2 May 2019 17:51:54 +0100 Message-Id: <20190502165154.21746-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502165154.21746-1-bruce.richardson@intel.com> References: <20190426165043.17268-1-bruce.richardson@intel.com> <20190502165154.21746-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4 4/4] build: add libbsd to pkg-config file if enabled 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190502165154.qFh7kLVxHH22cMlgqImXc9Q4eZgdRa3ZcNmCvMURfR0@z> If libbsd is enabled in DPDK, the strlcpy and strlcat functions in rte_string_fns.h redirect to the varients in libbsd, only using the fallbacks if it is not enabled. Therefore, if libbsd is enabled, it needs to be called out as a DPDK dependency in the pkgconfig file. To ensure that we don't have undefined variables on non-Linux platforms, we can remove the linux condition around the libbsd check - no harm comes in looking for it on other OS, since it's an optional dependency. Signed-off-by: Bruce Richardson Acked-by: Luca Boccassi --- config/meson.build | 10 ++++------ meson.build | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3678348de..0d25646f5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -132,12 +132,10 @@ if numa_dep.found() and cc.has_header('numaif.h') dpdk_extra_ldflags += '-lnuma' endif -# check for strlcpy -if is_linux - libbsd = dependency('libbsd', required: false) - if libbsd.found() - dpdk_conf.set('RTE_USE_LIBBSD', 1) - endif +# check for libbsd +libbsd = dependency('libbsd', required: false) +if libbsd.found() + dpdk_conf.set('RTE_USE_LIBBSD', 1) endif # add -include rte_config to cflags diff --git a/meson.build b/meson.build index d1e8e5239..46f9c5683 100644 --- a/meson.build +++ b/meson.build @@ -70,6 +70,8 @@ pkg.generate(name: meson.project_name(), libraries: dpdk_libraries, libraries_private: dpdk_drivers + dpdk_static_libraries + ['-Wl,-Bdynamic'] + dpdk_extra_ldflags, + requires: libbsd, # apps using rte_string_fns.h may need this if enabled + # if libbsd is not enabled, then this is blank description: '''The Data Plane Development Kit (DPDK). Note that CFLAGS might contain an -march flag higher than typical baseline. This is required for a number of static inline functions in the public headers.''', -- 2.20.1