platform_kernel-5.15/usr
Masahiro Yamada e6cb41be83 UPSTREAM: kbuild: add --target to correctly cross-compile UAPI headers with Clang
When you compile-test UAPI headers (CONFIG_UAPI_HEADER_TEST=y) with
Clang, they are currently compiled for the host target (likely x86_64)
regardless of the given ARCH=.

In fact, some exported headers include libc headers. For example,
include/uapi/linux/agpgart.h includes <stdlib.h> after being exported.
The header search paths should match to the target we are compiling
them for.

Pick up the --target triple from KBUILD_CFLAGS in the same ways as
commit 7f58b487e9 ("kbuild: make Clang build userprogs for target
architecture").

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Bug: 190019968
Change-Id: I9f4867b4fc1d0c4cf1af2bb3d6f53c3a8a8f4437
(cherry picked from commit 9fbed27a7a1101c926718dfa9b49aff1d04477b5)
2022-04-05 17:31:51 -07:00
..
include UPSTREAM: kbuild: add --target to correctly cross-compile UAPI headers with Clang 2022-04-05 17:31:51 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig initramfs: Remove redundant dependency of RD_ZSTD on BLK_DEV_INITRD 2021-02-24 15:12:06 +09:00
Makefile usr: Add support for zstd compressed initramfs 2020-07-31 11:49:08 +02:00
default_cpio_list initramfs: add default_cpio_list, and delete -d option support 2020-01-16 00:25:22 +09:00
gen_init_cpio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gen_initramfs.sh kbuild: replace LANG=C with LC_ALL=C 2021-05-02 00:43:35 +09:00
initramfs_data.S initramfs: refactor the initramfs build rules 2020-01-16 00:26:21 +09:00