[OE-core] [PATCH] ltp: fix confiugre with numa support

Yi Zhao yi.zhao at windriver.com
Fri Feb 9 03:25:34 UTC 2018


Fix Add-knob-to-control-whether-numa-support-should-be-c.patch since it
doesn't work when set --with-numa=yes.
Disable the test program since it can not run while cross compiling.

Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
---
 ...-control-whether-numa-support-should-be-c.patch | 31 +++++++++++++++-------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
index 31460b9..f8790d7 100644
--- a/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
+++ b/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
@@ -10,36 +10,47 @@ during build depending upong numa being staged or not
 Signed-off-by: Roy.Li <rongqing.li at windriver.com>
 Signed-off-by: Khem Raj <raj.khem at gmail.com>
 Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
+Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
 Upstream-Status: Pending
 ---
  m4/ltp-numa.m4 | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
-index fc3383e..44cb559 100644
+index fc3383e..1ca4613 100644
 --- a/m4/ltp-numa.m4
 +++ b/m4/ltp-numa.m4
-@@ -24,7 +24,13 @@ dnl LTP_CHECK_SYSCALL_NUMA
+@@ -24,21 +24,18 @@ dnl LTP_CHECK_SYSCALL_NUMA
  dnl ----------------------------
  dnl
  AC_DEFUN([LTP_CHECK_SYSCALL_NUMA], [
 -	AC_CHECK_LIB(numa, numa_available, [have_libnuma=yes])
+-	AC_CHECK_HEADERS([numa.h numaif.h], [], [have_numa_headers=no])
+-
+-	if test "x$have_numa_headers" != "xno"; then
+-		AC_RUN_IFELSE([AC_LANG_PROGRAM([
+-#include <numa.h>
+-		], [
+-#if LIBNUMA_API_VERSION < 2
+-exit(1);
+-#endif
+-		])], [have_numa_headers_v2=yes])
+-	fi
 +	AC_MSG_CHECKING([for numa])
 +	AC_ARG_WITH(
 +		[numa],
-+		AC_HELP_STRING([--without-numa],
-+		[without numa support]),
-+		[],
++		AC_HELP_STRING([--with-numa],
++		[with numa support]),
 +	[AC_CHECK_LIB(numa, numa_available, [have_libnuma=yes])
- 	AC_CHECK_HEADERS([numa.h numaif.h], [], [have_numa_headers=no])
++	AC_CHECK_HEADERS([numa.h numaif.h], [have_numa_headers=yes have_numa_headers_v2=yes], [have_numa_headers=no])
  
- 	if test "x$have_numa_headers" != "xno"; then
-@@ -42,3 +48,5 @@ exit(1);
+ 	if test "x$have_libnuma" = "xyes" -a "x$have_numa_headers" != "xno" -a "x$have_numa_headers_v2" = "xyes"; then
+ 		AC_SUBST(NUMA_LIBS, "-lnuma")
  		AC_DEFINE(HAVE_NUMA_V2, 1, [Define to 1 if you have libnuma and it's headers version >= 2 installed.])
  	fi
- ])
++], [])
 +AC_MSG_RESULT([$with_numa])
-+])
+ ])
 -- 
 2.7.0
 
-- 
2.7.4




More information about the Openembedded-core mailing list