From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 33D9D397D for ; Tue, 26 Feb 2019 18:46:59 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id i12so14973138wrw.0 for ; Tue, 26 Feb 2019 09:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HOIljby3nNDoKKXEOr/1uJP25V6rlQJZlSTGsNdi2Ws=; b=hPfsPpDlAd1dzh7L220H1TDSYxIZ6EmVZeWn+yRb+eGT7r3IP4REeeK9XnJu29QNOg zJmtAh2ykil3Wt5idFwiebqOFT4pa7CnEHRL1DIEM7b5mNBZbpOg0tuflZJ9EcuvigV2 KB+PgpPIz/NtGBJzMcSzaYWifBzqD0I4DLDAJMAwo3mbEaRpnKODAI47jLuVslm4Gsde V4iArOaCy9HHM+p4QZVuDA4KkRgf/aNGEOWDxFjaJjiSWdjoedcEeOGLM6IFP9gy+F5i RFefBwFewKZSAe/S21g7HfgxfGabVzerAe1Rxr4v0Xy3QB16PVG3oMLCdBzz1jA0PGw+ dnQg== 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=HOIljby3nNDoKKXEOr/1uJP25V6rlQJZlSTGsNdi2Ws=; b=Orm2jrA/xx7M7c0EhTQBlZNC/2eNWLwdNBeeCupT14Y3p3YnEtpvKtwTsva0VGv8rJ ntWny/ieJmqjbw30ixWD0Ubwd8aNuGU1A7IIef7T/XqC6rTua3WAOxDiiMaOQmv54MBz NAf8J+EBqxh6A9Fg/G91uWjMuGhPsdrc/wp7cJKWNdbCvz6HNmXt1OZ9ZU3WezgeR1rj /gthjKqIXP2XGyQbcaGoge5IgqTifgsRt926KzUdNExPIBQUex09VabqkeMrVDsv0xxH uEy2Pu+ibGsOqfwdiQs0DakyLf36TsvjijCkvAep6wsnGYWIxhnepo/mqoSQFH/v26Nv MkOQ== X-Gm-Message-State: AHQUAuYttZwaiKqwyD4XDF6IQWkmJu+7sewabAsj8Cm0308Jk0KKiUdK DEGNv18XKepiKBKjCH224JX7A9uSg4Q= X-Google-Smtp-Source: AHgI3IbR6iZDWlMjYwJbLPO3Sfibi4LSgX/u5j7QRgf8sAard/owS+Y5aEzi8YqwIHH+OyIyYo548g== X-Received: by 2002:adf:fa47:: with SMTP id y7mr17416729wrr.301.1551203218397; Tue, 26 Feb 2019 09:46:58 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:b00c:66c8:99df:336]) by smtp.gmail.com with ESMTPSA id d1sm8208559wrs.13.2019.02.26.09.46.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Feb 2019 09:46:57 -0800 (PST) From: luca.boccassi@gmail.com To: dev@dpdk.org Cc: bruce.richardson@intel.com, thomas@monjalon.net Date: Tue, 26 Feb 2019 17:46:35 +0000 Message-Id: <20190226174637.27452-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190226174637.27452-1-luca.boccassi@gmail.com> References: <20190103175725.5836-1-bluca@debian.org> <20190226174637.27452-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v8 4/6] 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: Tue, 26 Feb 2019 17:46:59 -0000 From: Luca Boccassi 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 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