Hi guys, On Sun, Aug 21, 2011 at 9:29 PM, John Rigby <john.ri...@linaro.org> wrote: > On Sun, Aug 21, 2011 at 7:54 PM, Nicolas Pitre <nicolas.pi...@linaro.org> > wrote: >> On Sun, 21 Aug 2011, John Rigby wrote: >> >>> I'm having trouble building the Thumb2 kernel on, I actually believe >>> this same code worked some time ago before a toolchain update. There >>> are actually two problems described below. I get past the first with >>> a config change but don't know how to fix the second one. >>> >> [...] >>> AS arch/arm/boot/compressed/head.o >>> arch/arm/boot/compressed/head.S: Assembler messages: >>> arch/arm/boot/compressed/head.S:127: Error: selected processor does >>> not support requested special purpose register -- `mrs r2,cpsr' >>> arch/arm/boot/compressed/head.S:134: Error: selected processor does >>> not support requested special purpose register -- `mrs r2,cpsr' >>> arch/arm/boot/compressed/head.S:136: Error: selected processor does >>> not support requested special purpose register -- `msr cpsr_c,r2' >>> make[2]: *** [arch/arm/boot/compressed/head.o] Error 1 >>> make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2 >>> make: *** [uImage] Error 2 >>> >>> Here is my gcc version: >>> >>> $ arm-linux-gnueabi-gcc --version >>> arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.6.1-5ubuntu2~ppa1) 4.6.1 >>> Copyright (C) 2011 Free Software Foundation, Inc. >>> This is free software; see the source for copying conditions. There is NO >>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >>> >>> And as version: >>> GNU assembler (GNU Binutils for Ubuntu) 2.21.52.20110707 >>> Copyright 2011 Free Software Foundation, Inc. >>> This program is free software; you may redistribute it under the terms of >>> the GNU General Public License version 3 or later. >>> This program has absolutely no warranty. >>> This assembler was configured for a target of `arm-linux-gnueabi'. >> >> Looks to me like your assembler is broken, or gcc is not properly >> telling it about the actual architecture in use. >> >> To confirm, please try this: >> >> echo -e ".arch armv7-a\n.thumb\nmrs r2, cpsr" | \ >> arm-linux-gnueabi-as - -o /dev/null >> >> If that works then your assembler is fine. In that case the following >> should fail: >> >> echo -e ".thumb\nmrs r2, cpsr" | \ >> arm-linux-gnueabi-gcc -march=armv7-a -x assembler -o /dev/null -c - >> >> If for some reasons this works too, then the kernel build might be >> wrong. In that case, see the output of: >> >> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- V=1 \ >> arch/arm/boot/compressed/head.o >> >> I have: >> arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.2-8ubuntu3) 4.5.2 >> GNU assembler (GNU Binutils for Ubuntu) 2.21.0.20110327 >> And that works for me just fine. >> >> > Thanks for the info, just before reading your response I found this > problem in GNU assembler when you say -march=all: > > http://sourceware.org/bugzilla/show_bug.cgi?id=12698 > > I have a workaround now by setting in -march=armv7-a in > arch/arm/boot/compressed/Makefile instead of -march=all. > > Meanwhile Ricardo is working on a fix to binutils in a ppa.
Resurrecting this as I just hit exactly the same problem cross-compiling a kernel with the gcc 4.6.1 compiler from the "linaro toolchain backports" PPA. make -f scripts/Makefile.build obj=arch/arm/boot/compressed arch/arm/boot/compressed/head.o arm-linux-gnueabi-gcc -Wp,-MD,arch/arm/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include -I/build/hub/linux-testing/arch/arm/include -Iarch/arm/include/generated -Iinclude -include /build/hub/linux-testing/include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-mx5/include -Iarch/arm/plat-mxc/include -D__ASSEMBLY__ -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated -Wa,-mthumb -D__LINUX_ARM_ARCH__=7 -march=armv7-a -include asm/unified.h -msoft-float -Wa,-march=all -DTEXT_OFFSET=0x00008000 -c -o arch/arm/boot/compressed/head.o arch/arm/boot/compressed/head.S arch/arm/boot/compressed/head.S: Assembler messages: arch/arm/boot/compressed/head.S:127: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr' arch/arm/boot/compressed/head.S:134: Error: selected processor does not support requested special purpose register -- `mrs r2,cpsr' arch/arm/boot/compressed/head.S:136: Error: selected processor does not support requested special purpose register -- `msr cpsr_c,r2' make[1]: *** [arch/arm/boot/compressed/head.o] Error 1 make: *** [arch/arm/boot/compressed/head.o] Error 2 As far as I understand it (from that bug link John posted) that -march=armv7-a should have caused this error to never appear, but it's there. I'm kind of languishing in gcc 4.4 hell right now and would quite like an updated toolchain for 4.6.2 or thereabouts (synced with the 2012.12 Linaro release). Is this available as a package or PPA somewhere or am I going to spend the night compilercompiling? -- Matt Sealey <m...@genesi-usa.com> Product Development Analyst, Genesi USA, Inc. _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev