From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id A70EC1B20A for ; Wed, 13 Feb 2019 12:55:42 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id q21so2101564wmc.5 for ; Wed, 13 Feb 2019 03:55:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8uOzixkrhEJ9ZPXa3KBmNIC4zvODpqVOv1d+SZ+B96o=; b=aH8Q8OQowoe8O2xF3NB0DY6KBQyYVeVF+K7r2Wjm8oA+Y4D7Xkh3VEurD8p6mpqhv5 JitgpXpdJ18rUOhkxyNV7kma+AbY4PZHs9A8WFQdCUM4kwOpJdAJDMbBq15IqbYJYc6/ N/GBvgE2loBgmgv4Z3M0jeL3O9tDEbGiHXLhxTxpGBzxSAMUhpA1Ntr7xg4AhjcQq5Ix 6zkZm4UzHpyP25UptD6k6pwKaT2pGJHPWtqMMS5o+2m3O3Nkhdh41I0QHE4evhuU7Pj0 52bq14dIsJ9EIt6gZWGJ9x4jROgANsRNmeb8TBbHDN5knUFYsEAuqw6AH1ofsIgJ2ubP GakQ== X-Gm-Message-State: AHQUAuY2LzuEShFSkoP478Do02gwy/uTzCBHlEND3VIAsyUPjJ5hRNA7 ZoSxlU/EzgjU6RT1P21utZWvCrsP X-Google-Smtp-Source: AHgI3Ia1kLqXrnSKpy8SWGucHjCwX7JOumIVa4/CBy7khr+BpzOQ0Bvauy0bif5pgqS+RJWbGIlBvg== X-Received: by 2002:a1c:a6c9:: with SMTP id p192mr37579wme.58.1550058941935; Wed, 13 Feb 2019 03:55:41 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:c934:57a:5587:ac0c]) by smtp.gmail.com with ESMTPSA id i10sm22640850wrx.54.2019.02.13.03.55.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 03:55:40 -0800 (PST) From: Luca Boccassi To: dev@dpdk.org Cc: bruce.richardson@intel.com, Luca Boccassi Date: Wed, 13 Feb 2019 11:54:51 +0000 Message-Id: <20190213115452.2264-4-bluca@debian.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190213115452.2264-1-bluca@debian.org> References: <20190103175725.5836-1-bluca@debian.org> <20190213115452.2264-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 4/5] build: use dependency() for libbsd instead of manual append to ldflags 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: , X-List-Received-Date: Wed, 13 Feb 2019 11:55:42 -0000 Move libbsd inclusion to librte_eal, so that all other libraries and PMDs will inherit it. Signed-off-by: Luca Boccassi Acked-by: Bruce Richardson --- 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 a18f3a826..fa60736c9 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -25,6 +25,9 @@ version = 9 # the version of the EAL API allow_experimental_apis = true deps += 'compat' 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