Documentation/prctl: don't build tsc tests when cross compiling
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 21 Jun 2015 01:22:20 +0000 (21:22 -0400)
committerJonathan Corbet <corbet@lwn.net>
Mon, 22 Jun 2015 22:05:04 +0000 (16:05 -0600)
The following was seen in linux-next build coverage, which is somewhat
unique since it uses powerpc host to cross compile x86:

Documentation/prctl/disable-tsc-on-off-stress-test.c:36:1: error:
 impossible register constraint in 'asm'
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c:34:1: error:
 impossible register constraint in 'asm'
Documentation/prctl/disable-tsc-test.c:36:1: error: impossible
 register constraint in 'asm'

It probably makes sense to just skip building these tests when
we are cross compiling.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Cc: Erik Bosman <ejbosman@cs.vu.nl>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/prctl/Makefile

index 2948b7b124b92c8412929d53533526c5ef704d13..44de3080c7f2ef2acab824755b97e27aca20982c 100644 (file)
@@ -1,3 +1,4 @@
+ifndef CROSS_COMPILE
 # List of programs to build
 hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
 # Tell kbuild to always build the programs
@@ -6,3 +7,4 @@ always := $(hostprogs-y)
 HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
 HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
 HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
+endif