All of lore.kernel.org
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, thomas@monjalon.net
Subject: [PATCH v8 4/6] build: use dependency() for libbsd instead of manual append to ldflags
Date: Tue, 26 Feb 2019 17:46:35 +0000	[thread overview]
Message-ID: <20190226174637.27452-4-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20190226174637.27452-1-luca.boccassi@gmail.com>

From: Luca Boccassi <bluca@debian.org>

Move libbsd inclusion to librte_eal, so that all other libraries and
PMDs will inherit it.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v3: only add dependency to librte_eal and let it propagate from there
v4: add acked-by

 config/meson.build         | 10 +++++-----
 lib/librte_eal/meson.build |  3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index db32499b3..e1af468ee 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -74,11 +74,11 @@ if numa_dep.found() and cc.has_header('numaif.h')
 endif
 
 # check for strlcpy
-if host_machine.system() == 'linux' and cc.find_library('bsd',
-		required: false).found() and cc.has_header('bsd/string.h')
-	dpdk_conf.set('RTE_USE_LIBBSD', 1)
-	add_project_link_arguments('-lbsd', language: 'c')
-	dpdk_extra_ldflags += '-lbsd'
+if host_machine.system() == 'linux'
+	libbsd = dependency('libbsd', required: false)
+	if libbsd.found()
+		dpdk_conf.set('RTE_USE_LIBBSD', 1)
+	endif
 endif
 
 # add -include rte_config to cflags
diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build
index 64d857a4a..98c1d1f31 100644
--- a/lib/librte_eal/meson.build
+++ b/lib/librte_eal/meson.build
@@ -24,6 +24,9 @@ endif
 version = 9  # the version of the EAL API
 allow_experimental_apis = true
 deps += 'kvargs'
+if dpdk_conf.has('RTE_USE_LIBBSD')
+	ext_deps += libbsd
+endif
 sources = common_sources + env_sources
 objs = common_objs + env_objs
 headers = common_headers + env_headers
-- 
2.20.1

  parent reply	other threads:[~2019-02-26 17:46 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 17:57 [PATCH 1/2] build: use static deps of libs for pkg-config libs.private Luca Boccassi
2019-01-03 17:57 ` [PATCH 2/2] build: use dependency() instead of find_library() Luca Boccassi
2019-01-07 14:28   ` Bruce Richardson
2019-01-07 16:39     ` [dpdk-stable] " Luca Boccassi
2019-01-07 16:55       ` Bruce Richardson
2019-01-07 17:03         ` [dpdk-techboard] " Thomas Monjalon
2019-01-07 17:45           ` [dpdk-stable] [dpdk-techboard] " Thomas Monjalon
2019-01-07 21:09             ` Luca Boccassi
2019-01-07 22:03               ` Luca Boccassi
2019-01-11 11:10         ` [dpdk-stable] " Luca Boccassi
2019-01-11 11:52           ` Bruce Richardson
2019-01-11 12:39             ` Luca Boccassi
2019-01-11 14:24               ` Bruce Richardson
2019-01-11 14:56                 ` Luca Boccassi
2019-01-11 15:49                   ` Bruce Richardson
2019-01-11 16:27                     ` Luca Boccassi
2019-01-11 12:38 ` [PATCH v2 1/3] build: use static deps of libs for pkg-config libs.private Luca Boccassi
2019-01-11 12:38   ` [PATCH v2 2/3] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 12:38   ` [PATCH v2 3/3] build: bump minimum Meson to 0.47.1 and use dependency() for libbsd Luca Boccassi
2019-01-11 14:27     ` Bruce Richardson
2019-01-11 14:30       ` Bruce Richardson
2019-01-11 15:04         ` Luca Boccassi
2019-01-11 15:50           ` Bruce Richardson
2019-01-11 16:14             ` Luca Boccassi
2019-01-11 16:26 ` [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-01-11 16:26   ` [PATCH v3 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 17:21     ` Bruce Richardson
2019-01-11 18:16       ` Luca Boccassi
2019-01-11 21:49         ` Bruce Richardson
2019-01-11 16:26   ` [PATCH v3 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-11 17:22     ` Bruce Richardson
2019-01-11 16:26   ` [PATCH v3 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-11 17:24     ` Bruce Richardson
2019-01-11 17:17   ` [PATCH v3 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson
2019-01-11 18:22 ` [PATCH v4 " Luca Boccassi
2019-01-11 18:22   ` [PATCH v4 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-11 18:22   ` [PATCH v4 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-11 18:22   ` [PATCH v4 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-22 13:10 ` [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-01-22 13:10   ` [PATCH v5 2/4] build: use dependency() instead of find_library() Luca Boccassi
2019-01-22 13:46     ` Bruce Richardson
2019-01-22 14:09       ` Luca Boccassi
2019-01-22 14:24         ` Bruce Richardson
2019-01-22 14:25     ` Bruce Richardson
2019-01-22 13:10   ` [PATCH v5 3/4] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-01-22 13:10   ` [PATCH v5 4/4] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-01-22 13:42   ` [PATCH v5 1/4] build: bump minimum Meson version to 0.47.1 Bruce Richardson
2019-02-06 17:08 ` [PATCH v6 1/5] " Luca Boccassi
2019-02-06 17:08   ` [PATCH v6 2/5] build: use dependency() instead of find_library() Luca Boccassi
2019-02-12 11:15     ` Thomas Monjalon
2019-02-12 11:31       ` Bruce Richardson
2019-02-12 11:36         ` Thomas Monjalon
2019-02-12 11:43           ` Bruce Richardson
2019-02-12 14:47             ` Thomas Monjalon
2019-02-12 15:03               ` Bruce Richardson
2019-02-12 16:21                 ` Thomas Monjalon
2019-02-13 10:49                   ` Luca Boccassi
2019-02-13 11:10                     ` Thomas Monjalon
2019-02-13 13:45                       ` Luca Boccassi
2019-02-13 11:48                     ` Luca Boccassi
2019-02-06 17:08   ` [PATCH v6 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-02-06 17:08   ` [PATCH v6 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-02-06 17:08   ` [PATCH v6 5/5] build: use integers for numerical options Luca Boccassi
2019-02-08 14:44     ` Bruce Richardson
2019-02-13 11:54 ` [PATCH v7 1/5] build: bump minimum Meson version to 0.47.1 Luca Boccassi
2019-02-13 11:54   ` [PATCH v7 2/5] build: use dependency() instead of find_library() Luca Boccassi
2019-02-13 15:35     ` Bruce Richardson
2019-02-13 11:54   ` [PATCH v7 3/5] build: reorder libraries and build eal before cmdline Luca Boccassi
2019-02-13 11:54   ` [PATCH v7 4/5] build: use dependency() for libbsd instead of manual append to ldflags Luca Boccassi
2019-02-13 11:54   ` [PATCH v7 5/5] build: use integers for numerical options Luca Boccassi
2019-02-26 17:46 ` [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 luca.boccassi
2019-02-26 17:46   ` [PATCH v8 2/6] build: use dependency() instead of find_library() luca.boccassi
2019-02-26 17:46   ` [PATCH v8 3/6] build: reorder libraries and build eal before cmdline luca.boccassi
2019-02-26 17:46   ` luca.boccassi [this message]
2019-02-26 17:46   ` [PATCH v8 5/6] build: use integers for numerical options luca.boccassi
2019-02-26 17:46   ` [PATCH v8 6/6] build: use dependency for pcap and fallback to find_library luca.boccassi
2019-02-26 17:49     ` Luca Boccassi
2019-02-27  8:33       ` Thomas Monjalon
2019-02-27  9:47         ` Bruce Richardson
2019-02-27 10:50           ` Luca Boccassi
2019-02-27 10:56             ` Thomas Monjalon
2019-02-27 12:03               ` Luca Boccassi
2019-02-27 13:53                 ` Bruce Richardson
2019-02-28 17:40                   ` Bruce Richardson
2019-03-01 13:13                     ` Thomas Monjalon
2019-03-01 15:13                       ` Luca Boccassi
2019-03-01 13:22     ` Thomas Monjalon
2019-02-27 11:29   ` [PATCH v8 1/6] build: bump minimum Meson version to 0.47.1 Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190226174637.27452-4-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.