diff mbox

[v2,2/6] selftests: only compile userfaultfd for x86 and powperpc

Message ID 1441634692-19494-3-git-send-email-bamvor.zhangjian@linaro.org
State New
Headers show

Commit Message

Bamvor Zhang Jian Sept. 7, 2015, 2:04 p.m. UTC
Check it before compiling to avoid the failure of building and
installation.

Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
---

 tools/testing/selftests/vm/Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Michael Ellerman Sept. 8, 2015, 5:41 a.m. UTC | #1
On Mon, 2015-09-07 at 22:04 +0800, Bamvor Jian Zhang wrote:
> Check it before compiling to avoid the failure of building and
> installation.

I asked you not to do this.

  http://lkml.kernel.org/r/1440991580.5735.4.camel@ellerman.id.au

Can you tell me why you ignored my comments?

cheers


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile
index 1dacac8..925a82d 100644
--- a/tools/testing/selftests/vm/Makefile
+++ b/tools/testing/selftests/vm/Makefile
@@ -1,5 +1,15 @@ 
 # Makefile for vm selftests
 
+uname_M := $(shell uname -m 2>/dev/null || echo not)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/)
+
+ifeq ($(ARCH),powerpc)
+support_userfaultfd = yes
+endif
+ifeq ($(ARCH),x86)
+support_userfaultfd = yes
+endif
+
 CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS)
 BINARIES = compaction_test
 BINARIES += hugepage-mmap
@@ -9,7 +19,9 @@  BINARIES += mlock2-tests
 BINARIES += on-fault-limit
 BINARIES += thuge-gen
 BINARIES += transhuge-stress
+ifdef support_userfaultfd
 BINARIES += userfaultfd
+endif
 
 all: $(BINARIES)
 %: %.c