[llvmlinux] Added Linaro compiler, but it can't build the Linux ARM kernel

Charlebois, Mark mcharleb at quicinc.com
Wed Aug 1 21:29:33 UTC 2012


It seems that the current version of the Linaro compiler can't handle -march=all. It seems to be an issue with the version of binutils used.

http://sourceware.org/bugzilla/show_bug.cgi?id=12698

The version of the Linaro compiler that I tried (2012.07-20120720) cannot successfully build the versatile express kernel.

  /local/mnt/workspace/mcharleb/shared/llvm/llvm-setup/toolchain/clang/install/bin/clang -ccc-host-triple arm-none-gnueabi -ccc-gcc-name arm-linux-gnueabihf-gcc -march=armv7-a -mfloat-abi=softfp -mfpu=neon -fno-builtin  -Wp,-MD,arch/arm/boot/compressed/.head.o.d  -nostdinc -isystem /local/mnt/workspace/mcharleb/shared/llvm/llvm-setup/toolchain/clang/install/bin/../lib/clang/3.2/include -I/local/mnt/workspace/mcharleb/shared/llvm/llvm-setup/targets/vexpress/src/linux/arch/arm/include -Iarch/arm/include/generated -Iinclude  -include /local/mnt/workspace/mcharleb/shared/llvm/llvm-setup/targets/vexpress/src/linux/include/linux/kconfig.h -D__KERNEL__ -Iarch/arm/mach-vexpress/include -Iarch/arm/plat-versatile/include -D__ASSEMBLY__   -D__LINUX_ARM_ARCH__=7 -march=armv7-a  -include asm/unified.h -msoft-float -gdwarf-2    -Wa,-march=all  -DTEXT_OFFSET=0x00008000   -c -o arch/arm/boot/compressed/head.o arch/arm/boot/compressed/head.S
arm-linux-gnueabihf-gcc: error: unrecognized argument in option '-march=all'
arm-linux-gnueabihf-gcc: note: valid arguments to '-march=' are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m ep9312 iwmmxt iwmmxt2 native
clang-3: error: assembler (via gcc) command failed with exit code 1 (use -v to see invocation)
make[3]: *** [arch/arm/boot/compressed/head.o] Error 1
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[1]: *** [zImage] Error 2
make[1]: Leaving directory `/local/mnt/workspace/mcharleb/shared/llvm/llvm-setup/targets/vexpress/src/linux'


In arch/arm/boot/compressed/Makefile

asflags-y := -Wa,-march=all



More information about the LLVMLinux mailing list