Message-ID: <53271E68.6020502@xenomai.org> Date: Mon, 17 Mar 2014 17:10:16 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: <20140317155912.GC17765@csclub.uwaterloo.ca> In-Reply-To: <20140317155912.GC17765@csclub.uwaterloo.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] xenomai 2.6.3 build failure on armhf List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lennart Sorensen Cc: xenomai@xenomai.org On 03/17/2014 04:59 PM, Lennart Sorensen wrote: > I saw armhf had been added to debian/control in the xenomai-2.6 > tree, and since I am trying to get it running there I figured it was > worth pulling that version. Unfortunately it fails to build with the > same error as 2.6.3 does. > > So any idea what this error means: > > assert_context.c: In function 'assert_nrt_inner': > assert_context.c:43:1: error: r7 cannot be used in asm here > > I am compiling on Debian wheezy armhf. > > The command line it used appears to be: /bin/bash ../../../libtool > --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../../../src/include -O2 -D_GNU_SOURCE -D_REENTRANT -Wall > -Werror-implicit-function-declaration -pipe -D__XENO__ -D__IN_XENO__ > -Wstrict-prototypes -I../../../include -D_FORTIFY_SOURCE=2 -g -O2 > -fstack-protector --param=ssp-buffer-size=4 -Wformat > -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-omit-frame-pointer > -MT libxenomai_la-assert_context.lo -MD -MP -MF > .deps/libxenomai_la-assert_context.Tpo -c -o > libxenomai_la-assert_context.lo `test -f 'assert_context.c' || echo > './'`assert_context.c > > Debian armhf uses thumb2 mode by default targeting armv7 with > VFP3-D16, in case that is relevant. > Could you show us the assembly that the assembler is trying to assemble? (gcc -S) I do not see anything at line 43, but the end of the function itself, but from the look of it, I would say that your build options are incompatible with our macro syscalls. Most probably the -fno-omit-frame-pointer, as I believe r7 is the frame-pointer with thumb (this would have to be checked). If that is true, it will be difficult to fix, as there is no way to detect (at least, last time I checked on x86) at compilation time if omit-frame-pointer is enabled or not, to use different syscall macros. FWIW, as I already said, I routinely compile Xenomai with armhf compilers, and with default options, I have no problems. -- Gilles.