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 6EE741BBF0 for ; Fri, 11 Jan 2019 13:38:18 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id t27so15013494wra.6 for ; Fri, 11 Jan 2019 04:38:18 -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=wWc0MqUzicNcz+a8H3pd/JAdnSO+rA/tUz+OUpTqbZQ=; b=Wp2ABxdK63BkBWX84u9Wwzi0vNmQJ33SOFyykAJHqekf+DBtfSYaqWld4oe+H0wF+g xcgshz+pkV5NBcYiszVHuedNz3OsNpXA7AzYt8ggMR8uoiYOjo3lyJlvM/YlFbDzpfQU qEPNmUYQWXc3nXZMq6KX8qCA5DqE3ukHwMRnUaXWr6Om2jGTcSsfNim9dLF5ygg+feHP /lW2zrtW9e2Y71DqWc7LlOXUKzXRIF7m7LI7GLIqg3l9cv8lQOlMvsLFxBwoibEj3uBu zvAeN2due9AD27gnNBz9BtGAZk4+aYKNUefVniIDcYZpQ0qMkgBeT7TIyx8jty+HEXrI q1DQ== X-Gm-Message-State: AJcUukeIpS1MCHm3rkNc+5zcLsDA7/zNkQfLjqGr5DwIVinxzNoD6Dbj zbowcbyNgGg5qwvLyt8Bvsl1ThUkbFA= X-Google-Smtp-Source: ALg8bN6aJ7Mn544SnuEvTCh0GW09/bgrzujqjaYi3F1gLxF8d/enf16y/P2VxbmKg70eBW2DIHVHdg== X-Received: by 2002:a5d:47d1:: with SMTP id l17mr13105062wrs.319.1547210297756; Fri, 11 Jan 2019 04:38:17 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id b18sm53656482wrr.43.2019.01.11.04.38.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Jan 2019 04:38:17 -0800 (PST) From: Luca Boccassi To: dev@dpdk.org Cc: bruce.richardson@intel.com, Luca Boccassi Date: Fri, 11 Jan 2019 12:38:09 +0000 Message-Id: <20190111123809.8789-3-bluca@debian.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190111123809.8789-1-bluca@debian.org> References: <20190103175725.5836-1-bluca@debian.org> <20190111123809.8789-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/3] build: bump minimum Meson to 0.47.1 and use dependency() for libbsd 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: Fri, 11 Jan 2019 12:38:19 -0000 Move libbsd inclusion to librte_eal, so that all other libraries and PMDs will inherit it, and librte_cmdline which is built before librte_eal. Bump Meson dependency to 0.47.1, to avoid bug where the linker flag of the dependency gets replicated again and again. Signed-off-by: Luca Boccassi --- v2: bump meson minimum version to 0.47.1 to avoid meson bug, and move libbsd dependency to eal and cmdline config/meson.build | 10 +++++----- lib/librte_cmdline/meson.build | 4 ++++ lib/librte_eal/meson.build | 3 +++ meson.build | 2 +- 4 files changed, 13 insertions(+), 6 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_cmdline/meson.build b/lib/librte_cmdline/meson.build index 30498906c..be286d4a2 100644 --- a/lib/librte_cmdline/meson.build +++ b/lib/librte_cmdline/meson.build @@ -5,6 +5,10 @@ includes = [global_inc] includes += include_directories('../librte_eal/common/include') +if dpdk_conf.has('RTE_USE_LIBBSD') + ext_deps += libbsd +endif + version = 2 sources = files('cmdline.c', 'cmdline_cirbuf.c', 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 diff --git a/meson.build b/meson.build index 35126106a..4041eccb6 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,7 @@ project('DPDK', 'C', version: '19.02.0-rc1', license: 'BSD', default_options: ['buildtype=release', 'default_library=static'], - meson_version: '>= 0.42' + meson_version: '>= 0.47.1' ) # set up some global vars for compiler, platform, configuration, etc. -- 2.20.1