[PATCH v3 2/2] build: change libfdt flag variable type to boolean
Bruce Richardson
bruce.richardson at intel.com
Tue Jun 13 17:33:33 CEST 2023
The has_libfdt flag was using 0 and 1 integer values, instead of the
more appropriate boolean type. Change to use true/false instead.
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
config/meson.build | 4 ++--
drivers/net/ipn3ke/meson.build | 2 +-
drivers/raw/ifpga/meson.build | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/config/meson.build b/config/meson.build
index 8aebccbbdc..22d7d908b7 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -190,11 +190,11 @@ if find_libnuma
endif
endif
-has_libfdt = 0
+has_libfdt = false
fdt_dep = cc.find_library('fdt', required: false)
if fdt_dep.found() and cc.has_header('fdt.h')
dpdk_conf.set10('RTE_HAS_LIBFDT', true)
- has_libfdt = 1
+ has_libfdt = true
add_project_link_arguments('-lfdt', language: 'c')
dpdk_extra_ldflags += '-lfdt'
endif
diff --git a/drivers/net/ipn3ke/meson.build b/drivers/net/ipn3ke/meson.build
index 104d2f58e5..464bdbd8b6 100644
--- a/drivers/net/ipn3ke/meson.build
+++ b/drivers/net/ipn3ke/meson.build
@@ -15,7 +15,7 @@ endif
# rte_eth_switch_domain_free()
#
-if has_libfdt == 0
+if not has_libfdt
build = false
reason = 'missing dependency, "libfdt"'
subdir_done()
diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build
index cc30dc8be7..20dea23206 100644
--- a/drivers/raw/ifpga/meson.build
+++ b/drivers/raw/ifpga/meson.build
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-if has_libfdt == 0
+if not has_libfdt
build = false
reason = 'missing dependency, "libfdt"'
subdir_done()
--
2.39.2
More information about the dev
mailing list