diff options
| author | Anders Roxell <anders.roxell@linaro.org> | 2018-09-04 06:47:21 -0400 |
|---|---|---|
| committer | Shuah Khan (Samsung OSG) <shuah@kernel.org> | 2018-09-05 10:12:09 -0400 |
| commit | b2d35fa5fc80c27e868e393dcab4c94a0d71737f (patch) | |
| tree | 1ff2d280109a4b5b43cc5ec6a4e70ff23131ca78 /scripts/subarch.include | |
| parent | c31d02d1290e1e82a08015199e408228e152991f (diff) | |
selftests: add headers_install to lib.mk
If the kernel headers aren't installed we can't build all the tests.
Add a new make target rule 'khdr' in the file lib.mk to generate the
kernel headers and that gets include for every test-dir Makefile that
includes lib.mk If the testdir in turn have its own sub-dirs the
top_srcdir needs to be set to the linux-rootdir to be able to generate
the kernel headers.
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'scripts/subarch.include')
| -rw-r--r-- | scripts/subarch.include | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/subarch.include b/scripts/subarch.include new file mode 100644 index 000000000000..650682821126 --- /dev/null +++ b/scripts/subarch.include | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # SUBARCH tells the usermode build what the underlying arch is. That is set | ||
| 2 | # first, and if a usermode build is happening, the "ARCH=um" on the command | ||
| 3 | # line overrides the setting of ARCH below. If a native build is happening, | ||
| 4 | # then ARCH is assigned, getting whatever value it gets normally, and | ||
| 5 | # SUBARCH is subsequently ignored. | ||
| 6 | |||
| 7 | SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ | ||
| 8 | -e s/sun4u/sparc64/ \ | ||
| 9 | -e s/arm.*/arm/ -e s/sa110/arm/ \ | ||
| 10 | -e s/s390x/s390/ -e s/parisc64/parisc/ \ | ||
| 11 | -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ | ||
| 12 | -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ | ||
| 13 | -e s/riscv.*/riscv/) | ||
