[llvmlinux] Why is there a CodeSourcery toolchain? and make question

Charlebois, Mark mcharleb at quicinc.com
Fri Nov 8 23:23:00 UTC 2013

The install of gcc is used for (cross) assembly and linking. Clang has a built in assembler but it is not used for the kernel.

Clang produces the assembly code from the C files and the gcc toolchain assembler and linker finish the job. Clang does not yet have its own linker. The command below tells clang where to look to find the other pieces it needs to do the full compile.


From: llvmlinux-bounces at lists.linuxfoundation.org [llvmlinux-bounces at lists.linuxfoundation.org] on behalf of Rick Mann [rmann at latencyzero.com]
Sent: Friday, November 08, 2013 3:08 PM
To: Compiling the Linux Kernel with Clang/LLVM
Subject: [llvmlinux] Why is there a CodeSourcery toolchain? and make question

• I thought the point was to build with clang. Why is gcc used?

• One of the invocations that’s failing for me right now is this:

$ cd src/linux
$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j9 CONFIG_DEBUG_INFO=1 CONFIG_DEBUG_SECTION_MISMATCH=y CONFIG_NO_ERROR_ON_MISMATCH=y   CC?="/Users/rmann/Projects/LFS/LLVMLinux/llvmlinux/toolchain/clang/install/bin/clang -gcc-toolchain /Users/rmann/Projects/LFS/LLVMLinux/llvmlinux/arch/arm/toolchain/codesourcery/arm-2013.05”

I don’t know what the question mark in ‘CC?=“…”’ is.


More information about the LLVMLinux mailing list