Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation/prctl: don't build tsc tests when cross compiling

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>

authored by

Paul Gortmaker and committed by
Jonathan Corbet
f59514b6 6a407a81

+2
+2
Documentation/prctl/Makefile
··· 1 + ifndef CROSS_COMPILE 1 2 # List of programs to build 2 3 hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test 3 4 # Tell kbuild to always build the programs ··· 7 6 HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include 8 7 HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include 9 8 HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include 9 + endif