From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 066C4A034F; Mon, 22 Mar 2021 15:08:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E13B940040; Mon, 22 Mar 2021 15:08:00 +0100 (CET) Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by mails.dpdk.org (Postfix) with ESMTP id C96C94003D for ; Mon, 22 Mar 2021 15:07:58 +0100 (CET) Received: from localhost (unknown [10.16.0.62]) by proxy.6wind.com (Postfix) with ESMTP id BDB1D91481F; Mon, 22 Mar 2021 15:07:58 +0100 (CET) From: Gabriel Ganne To: Bruce Richardson , Kevin Laatz Cc: dev@dpdk.org, olivier.matz@6wind.com, thierry.herbelot@6wind.com, Gabriel Ganne Date: Mon, 22 Mar 2021 15:07:56 +0100 Message-Id: <20210322140757.7888-1-gabriel.ganne@6wind.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" meson guarantees this is portable, so this also allows us to remove a is_windows switch. Link: https://mesonbuild.com/howtox.html#enable-threads Signed-off-by: Gabriel Ganne --- config/meson.build | 5 +---- lib/librte_metrics/meson.build | 2 ++ lib/librte_telemetry/meson.build | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3cf560b8a3f5..0fb7e1b27a0f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -113,10 +113,7 @@ if not is_windows endif # use pthreads if available for the platform -if not is_windows - add_project_link_arguments('-pthread', language: 'c') - dpdk_extra_ldflags += '-pthread' -endif +threads_dep = dependency('threads') # on some OS, maths functions are in a separate library if cc.find_library('m', required : false).found() diff --git a/lib/librte_metrics/meson.build b/lib/librte_metrics/meson.build index d5be6a214530..29d922eded53 100644 --- a/lib/librte_metrics/meson.build +++ b/lib/librte_metrics/meson.build @@ -4,6 +4,8 @@ sources = files('rte_metrics.c', 'rte_metrics_telemetry.c') headers = files('rte_metrics.h', 'rte_metrics_telemetry.h') +ext_deps += threads_dep + jansson = dependency('jansson', required: false, method: 'pkg-config') if jansson.found() dpdk_conf.set('RTE_HAS_JANSSON', 1) diff --git a/lib/librte_telemetry/meson.build b/lib/librte_telemetry/meson.build index 719973ff9240..46ac9829e54b 100644 --- a/lib/librte_telemetry/meson.build +++ b/lib/librte_telemetry/meson.build @@ -3,6 +3,8 @@ includes = [global_inc] +ext_deps += threads_dep + sources = files('telemetry.c', 'telemetry_data.c', 'telemetry_legacy.c') headers = files('rte_telemetry.h') includes += include_directories('../librte_metrics') -- 2.29.2