Eliminate `CROSS_COMPILE` for `LLVM=1 LLVM_IAS=1`
nickdesaulniers opened this issue · 8 comments
m68k, arc, parisc, sh, h8300, and mips all use cc-cross-prefix to predefine CROSS_COMPILE. Why not use this on arm, arm64, x86_64? We might have a circular dependency with the order of including arch/ specific Makefiles though.
cc-cross-prefix
hard codes an invocation of <triple>-gcc
.
@arndb had a good suggestion to limit this just to LLVM=1
for now. Perhaps we can set the --target
value per arch/ specific Makefile, and completely ignore CROSS_COMPILE when LLVM=1 LLVM_IAS=1.
Based on @arndb 's idea, I sent https://lore.kernel.org/lkml/20210701235505.1792711-1-ndesaulniers@google.com/ for arm64. If maintainers are supportive, I'll send similar patches for other architectures we currently support.
accepted
1: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=6f5b41a2f5a6314614e286274eb8e985248aac60
2: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=231ad7f409f16b9f9505f69e058dff488a7e6bde
3: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=e08831baa032e62786d88b68e26c54389e2486b6