[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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.



Reply to: