[21.11,v2,3/3] common/octeontx2: enable build only on 64-bit Linux

Message ID 20210325145209.2000195-4-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series octeontx build only on 64-bit Linux |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed

Commit Message

Thomas Monjalon March 25, 2021, 2:52 p.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Due to Linux kernel dependency, only enable build for 64-bit Linux.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/octeontx2/meson.build  |  4 ++--
 drivers/event/octeontx2/meson.build   |  4 ++--
 drivers/mempool/octeontx2/meson.build |  9 ++-------
 drivers/net/octeontx2/meson.build     | 10 ++--------
 drivers/raw/octeontx2_dma/meson.build | 10 ++++++----
 5 files changed, 14 insertions(+), 23 deletions(-)
  

Patch

diff --git a/drivers/common/octeontx2/meson.build b/drivers/common/octeontx2/meson.build
index 84fb11524d..3ae1067921 100644
--- a/drivers/common/octeontx2/meson.build
+++ b/drivers/common/octeontx2/meson.build
@@ -2,9 +2,9 @@ 
 # Copyright(C) 2019 Marvell International Ltd.
 #
 
-if not dpdk_conf.get('RTE_ARCH_64')
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
 	build = false
-	reason = 'only supported on 64-bit'
+	reason = 'only supported on 64-bit Linux'
 	subdir_done()
 endif
 
diff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build
index 22e7e4cb63..c81950cefe 100644
--- a/drivers/event/octeontx2/meson.build
+++ b/drivers/event/octeontx2/meson.build
@@ -2,9 +2,9 @@ 
 # Copyright(C) 2019 Marvell International Ltd.
 #
 
-if not dpdk_conf.get('RTE_ARCH_64')
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
 	build = false
-	reason = 'only supported on 64-bit'
+	reason = 'only supported on 64-bit Linux'
 	subdir_done()
 endif
 
diff --git a/drivers/mempool/octeontx2/meson.build b/drivers/mempool/octeontx2/meson.build
index 0586321abe..c67d8e2d20 100644
--- a/drivers/mempool/octeontx2/meson.build
+++ b/drivers/mempool/octeontx2/meson.build
@@ -2,14 +2,9 @@ 
 # Copyright(C) 2019 Marvell International Ltd.
 #
 
-if is_windows
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
 	build = false
-	reason = 'not supported on Windows'
-	subdir_done()
-endif
-if not dpdk_conf.get('RTE_ARCH_64')
-	build = false
-	reason = 'only supported on 64-bit'
+	reason = 'only supported on 64-bit Linux'
 	subdir_done()
 endif
 
diff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build
index 779a75b5d0..5dbe002e3f 100644
--- a/drivers/net/octeontx2/meson.build
+++ b/drivers/net/octeontx2/meson.build
@@ -2,15 +2,9 @@ 
 # Copyright(C) 2019 Marvell International Ltd.
 #
 
-if is_windows
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
 	build = false
-	reason = 'not supported on Windows'
-	subdir_done()
-endif
-
-if not dpdk_conf.get('RTE_ARCH_64')
-	build = false
-	reason = 'only supported on 64-bit'
+	reason = 'only supported on 64-bit Linux'
 	subdir_done()
 endif
 
diff --git a/drivers/raw/octeontx2_dma/meson.build b/drivers/raw/octeontx2_dma/meson.build
index 11f74680a5..1910351253 100644
--- a/drivers/raw/octeontx2_dma/meson.build
+++ b/drivers/raw/octeontx2_dma/meson.build
@@ -2,14 +2,16 @@ 
 # Copyright(C) 2019 Marvell International Ltd.
 #
 
+if not is_linux or not dpdk_conf.get('RTE_ARCH_64')
+	build = false
+	reason = 'only supported on 64-bit Linux'
+	subdir_done()
+endif
+
 deps += ['bus_pci', 'common_octeontx2', 'rawdev']
 sources = files('otx2_dpi_rawdev.c', 'otx2_dpi_msg.c', 'otx2_dpi_test.c')
 
 extra_flags = []
-# This integrated controller runs only on a arm64 machine, remove 32bit warnings
-if not dpdk_conf.get('RTE_ARCH_64')
-	extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']
-endif
 
 foreach flag: extra_flags
 	if cc.has_argument(flag)