[dpdk-dev] [PATCH v2 02/10] meson: add BUILDING_RTE_SDK

Neil Horman nhorman at tuxdriver.com
Thu Jun 13 16:23:36 CEST 2019

The __rte_internal macro is defined dependent on the value of the build
environment variable BUILDING_RTE_SDK.  This variable was set in the
Makefile environment but not the meson environment, so lets reconcile
the two by defining it for meson in the lib and drivers directories, but
not the examples/apps directories, which should be treated as they are
not part of the core DPDK library

Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
CC: Jerin Jacob Kollanukkaran <jerinj at marvell.com>
CC: Bruce Richardson <bruce.richardson at intel.com>
CC: Thomas Monjalon <thomas at monjalon.net>
 drivers/meson.build | 1 +
 lib/meson.build     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/meson.build b/drivers/meson.build
index 4c444f495..a312277d1 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -23,6 +23,7 @@ endif
 # specify -D_GNU_SOURCE unconditionally
 default_cflags += '-D_GNU_SOURCE'
+default_cflags += '-DBUILDING_RTE_SDK'
 foreach class:dpdk_driver_classes
 	drivers = []
diff --git a/lib/meson.build b/lib/meson.build
index e067ce5ea..0e398d534 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -35,6 +35,7 @@ if is_windows
 default_cflags = machine_args
+default_cflags += '-DBUILDING_RTE_SDK'
 if cc.has_argument('-Wno-format-truncation')
 	default_cflags += '-Wno-format-truncation'

More information about the dev mailing list