Fix broken compilation for non-numa aware platforms 19/12519/3
authorSachin Saxena <sachin.saxena@nxp.com>
Thu, 10 May 2018 10:52:09 +0000 (16:22 +0530)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 16 May 2018 20:00:04 +0000 (20:00 +0000)
 - The dpdk plugin always looks for libnuma library during compilation.
   For non-numa aware platforms compilation breaks, if third party
   libnuma lib is not available.
 - Issue is more severe with Cross Compilation scenario where one has to
   download and cross compile libnuma-dev package even when target platofrom
   is NUMA disabled.
   Like when cross compiling for ARM platforms, Linaro tool-chain doesn't have
   libnuma by default.

Change-Id: Ib85b3188b787c23ba33b47e3f6123c74fd37190e
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
build-data/platforms/dpaa.mk
build-data/platforms/vpp.mk
src/configure.ac
src/plugins/dpdk.am

index 3ccabef..e0a37fa 100644 (file)
@@ -64,7 +64,7 @@ endif
 endif
 
 # Disable the unused plugins in order to decrease the VPP pacakage size.
-vpp_configure_args_dpaa = --without-ipv6sr --with-pre-data=128
+vpp_configure_args_dpaa = --without-ipv6sr --with-pre-data=128 --without-libnuma
 
 # Other optional vpp_configure_args
 ifneq ($(VPP_CFG_ARGS),)
index ad15d7e..c172972 100644 (file)
@@ -36,6 +36,7 @@ vpp_root_packages = vpp vom
 # vpp_dpdk_lib_dir = /usr/lib
 # vpp_dpdk_shared_lib = yes
 
+# Use '--without-libnuma' for non-numa aware architecture
 vpp_configure_args_vpp =
 
 # load balancer plugin is not portable on 32 bit platform
index ca967bb..bae3fde 100644 (file)
@@ -135,6 +135,7 @@ DISABLE_ARG(japi,   [Disable Java API bindings])
 WITHOUT_ARG(libssl,    [Disable libssl])
 WITHOUT_ARG(apicli,    [Disable binary api CLI])
 WITHOUT_ARG(mbedtls,   [Disable mbedtls])
+WITHOUT_ARG(libnuma,   [for non numa architectures])
 
 AC_ARG_WITH(unix,
             AC_HELP_STRING([--with-unix],[Compile unix version of clib]),
@@ -203,6 +204,7 @@ AC_SUBST(APICLI,            [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
 AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB,    [${n_enable_dpdk_shared}])
 AC_DEFINE_UNQUOTED(WITH_LIBSSL,                [${n_with_libssl}])
 AC_DEFINE_UNQUOTED(WITH_MBEDTLS,       [${n_with_mbedtls}])
+AC_DEFINE_UNQUOTED(WITH_LIBNUMA,       [${n_with_libnuma}])
 
 
 # Silence following noise:
index 7c6e005..af7d96d 100644 (file)
@@ -26,7 +26,9 @@ if WITH_ISA_L_CRYPTO_LIB
 dpdk_plugin_la_LDFLAGS += -Wl,--exclude-libs,libisal_crypto.a,-l:libisal_crypto.a
 endif
 dpdk_plugin_la_CFLAGS = $(AM_CFLAGS)
+if WITH_LIBNUMA
 dpdk_plugin_la_LDFLAGS += -Wl,-lnuma
+endif
 
 dpdk_plugin_la_LDFLAGS += -Wl,-lm,-ldl
 dpdk_plugin_la_LIBADD =