FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 12-15-2011, 12:53 PM
peter green
 
Default Bug#652205: assembler errors when trying to build flint on armhf

package: gcc-4.6
severity: important
version: 1.011-2

flint FTBFS on armhf with the following errors

gcc -fPIC -std=c99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -funroll-loops -I/usr/include -I/usr/include/NTL -c ZmodF.c -o ZmodF.o
ZmodF.c: In function 'ZmodF_divby3':
ZmodF.c:556:18: warning: unused variable 'rem' [-Wunused-variable]
/tmp/ccqrATB5.s: Assembler messages:
/tmp/ccqrATB5.s:4619: Error: selected processor does not support Thumb mode `rsc ip,ip,ip'
make[1]: *** [ZmodF.o] Error 1
make[1]: Leaving directory `/build/buildd-flint_1.011-2-armhf-_anfYZ/flint-1.011'
make: *** [debian/stamp-makefile-build] Error 2

To try and find the issue I first tried to disable optimisation, doing so changed the register names but left us with a very similar error.

root@debian:/flint-1.011# gcc -fPIC -std=c99 -g -O0 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -funroll-loops -I/usr/include -I/usr/include/NTL -c ZmodF.c -o ZmodF.o
ZmodF.c: In function 'ZmodF_divby3':
ZmodF.c:556:18: warning: unused variable 'rem' [-Wunused-variable]
/tmp/cc3zqlRw.s: Assembler messages:
/tmp/cc3zqlRw.s:1594: Error: selected processor does not support Thumb mode `rsc r4,r1,#0'

when that failed I built a .s file with the following command.

gcc -S -fPIC -std=c99 -g -O0 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -funroll-loops -I/usr/include -I/usr/include/NTL ZmodF.c

and tried to build it with as which resulted in

root@debian:/flint-1.011# as ZmodF.s
ZmodF.s: Assembler messages:
ZmodF.s:1594: Error: selected processor does not support Thumb mode `rsc r4,r1,#0'
root@debian:/flint-1.011#

looking at ZmodF.s I see

@ 242 "ZmodF.c" 1
rsbs r2, r4, r0
rsc r4, r1, #0
@ 0 "" 2

looking at line 242 in ZmodF.c I see

sub_ddmmss(Z, b[ss-1], 0, b[ss-1], 0, underflow);

adding -marm to the cflags made the package build and when looking at
the source file I didn't see any evidence of inline assembler so
presumablly this is a c compiler and/or binutils bug. I'm filing against
the c compiler in the first instance., please reassign to binutils if
you think this is a problem in the linker. If the bug in the toolchain
cannot be dealt with in a timely manner I will file a bug report against
flint that makes the package build with -marm on armhf.




--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EE9FBC4.5080203@postgrad.manchester.ac.uk">http://lists.debian.org/4EE9FBC4.5080203@postgrad.manchester.ac.uk
 

Thread Tools




All times are GMT. The time now is 12:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org