]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: make Clang build userprogs for target architecture
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 30 Jun 2020 15:06:25 +0000 (00:06 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 1 Jul 2020 15:58:00 +0000 (00:58 +0900)
commitefa5a3f46e3f96a5f04c6162f909e67a722377a9
treed4912fafbd144b54679f7c4d4e8f15a9ccd75c72
parent1f85b8b04e9969f5e47aa30b4a5211143d1e071b
kbuild: make Clang build userprogs for target architecture

Programs added 'userprogs' should be compiled for the target
architecture i.e. the same architecture as the kernel.

GCC does this correctly since the target architecture is implied
by the toolchain prefix.

Clang builds userspace programs always for the host architecture
because the target triple is currently missing.

Fix this.

Fixes: 7d307633543d ("kbuild: add infrastructure to build userspace programs")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Makefile