event/cnxk: fix Tx adapter enqueue return for CN10K
[dpdk.git] / config / meson.build
index 737cbd2..7f7b6c9 100644 (file)
@@ -22,7 +22,8 @@ is_ms_linker = is_windows and (cc.get_id() == 'clang')
 # depending on the configuration options
 pver = meson.project_version().split('.')
 major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))
-abi_version = run_command(find_program('cat', 'more'), abi_version_file).stdout().strip()
+abi_version = run_command(find_program('cat', 'more'), abi_version_file,
+        check: true).stdout().strip()
 
 # Libraries have the abi_version as the filename extension
 # and have the soname be all but the final part of the abi_version.
@@ -120,6 +121,8 @@ if cpu_instruction_set == 'generic'
         cpu_instruction_set = 'generic'
     elif host_machine.cpu_family().startswith('ppc')
         cpu_instruction_set = 'power8'
+    elif host_machine.cpu_family().startswith('riscv')
+        cpu_instruction_set = 'riscv'
     endif
 endif
 
@@ -218,6 +221,11 @@ if libbsd.found()
     dpdk_conf.set('RTE_USE_LIBBSD', 1)
 endif
 
+jansson_dep = dependency('jansson', required: false, method: 'pkg-config')
+if jansson_dep.found()
+    dpdk_conf.set('RTE_HAS_JANSSON', 1)
+endif
+
 # check for pcap
 pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
 pcap_lib = is_windows ? 'wpcap' : 'pcap'
@@ -241,10 +249,9 @@ endif
 add_project_arguments('-include', 'rte_config.h', language: 'c')
 
 # enable extra warnings and disable any unwanted warnings
+# -Wall is added by default at warning level 1, and -Wextra
+# at warning level 2 (DPDK default)
 warning_flags = [
-        # -Wall is added by meson by default, so add -Wextra only
-        '-Wextra',
-
         # additional warnings in alphabetical order
         '-Wcast-qual',
         '-Wdeprecated',
@@ -329,7 +336,7 @@ if max_lcores == 'detect'
         error('Discovery of max_lcores is not supported for cross-compilation.')
     endif
     # overwrite the default value with discovered values
-    max_lcores = run_command(get_cpu_count_cmd).stdout().to_int()
+    max_lcores = run_command(get_cpu_count_cmd, check: true).stdout().to_int()
     min_lcores = 2
     # DPDK must be built for at least 2 cores
     if max_lcores < min_lcores
@@ -428,7 +435,7 @@ if get_option('b_sanitize') == 'address' or get_option('b_sanitize') == 'address
         dpdk_extra_ldflags += '-lasan'
     endif
 
-    if is_linux and arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
+    if is_linux and dpdk_conf.get('RTE_ARCH_64')
         dpdk_conf.set10('RTE_MALLOC_ASAN', true)
     endif
 endif