ClangBuiltLinux/linux

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.