selftests, x86: Rework x86 target architecture detection
authorAndy Lutomirski <luto@kernel.org>
Mon, 11 May 2015 22:11:36 +0000 (15:11 -0700)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 13 May 2015 02:02:40 +0000 (20:02 -0600)
commite9886ace222eb48bb57bd541320056ca334bd3a0
tree11c057e7a46cff720383c099edbee96eec4b60e6
parentc1e6e5cb941b54c2e7e84d9a796c1ad8377f44da
selftests, x86: Rework x86 target architecture detection

We currently fail to build on a non-multilib x86_64 target.  We
print a helpful error, but it's nicer to allow the build to succeed.
Fix it and improve cross-compilation support by detecting
architecture support directly and building only the relevant tests.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/check_cc.sh [new file with mode: 0755]
tools/testing/selftests/x86/trivial_32bit_program.c
tools/testing/selftests/x86/trivial_64bit_program.c [new file with mode: 0644]