Le 04/02/2012 10:18, Paulo César Pereira de Andrade a écrit :
2012/2/4 Julien Puydt<julien.pu...@laposte.net>:

(sage subshell) hecke:Olinux-armv7l jpuydt$ make
gcc  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer  -g
-funroll-loops -fPIC -I. -I../src/headers
-I/home/jpuydt/sage-4.8/local/include -o mp.o mp.c

   Try running something like:

gcc -c -S -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -g
-funroll-loops -fPIC -I. -I../src/headers
-I/home/jpuydt/sage-4.8/local/include -o mp.s mp.c

and then look at the assembler generated in mp.s

you can also s/-S/-E/; s/mp.s/mp.e/ or variant to reduce to, and
create a self contained small test case and report upstream.

Hmmm... I'll send the mp.e as a mp.c ; it doesn't compile with both -funroll-loops and -O3, so I guess it's a valid test case. Not really small (19147 lines), but I guess that will do.

   If you want it "working now", you can try removing -funroll-loops

I used the -O option instead of -O3 ;-)

/tmp/ccgVJ73D.s: Assembler messages:
/tmp/ccgVJ73D.s:376: Error: branch out of range
/tmp/ccgVJ73D.s:5127: Error: branch out of range
make: *** [mp.o] Erreur 1
SAGE_ROOT=/home/jpuydt/sage-4.8
(sage subshell) hecke:Olinux-armv7l jpuydt$ gcc -c -O2 -Wall
-fno-strict-aliasing -fomit-frame-pointer -g -funroll-loops -fPIC -I.
-I../src/headers -I/home/jpuydt/sage-4.8/local/include -o mp.o mp.c
/tmp/ccMfUGHc.s: Assembler messages:
/tmp/ccMfUGHc.s:376: Error: branch out of range
/tmp/ccMfUGHc.s:5120: Error: branch out of range
SAGE_ROOT=/home/jpuydt/sage-4.8
(sage subshell) hecke:Olinux-armv7l jpuydt$ gcc -c -O -Wall
-fno-strict-aliasing -fomit-frame-pointer -g -funroll-loops -fPIC -I.
-I../src/headers -I/home/jpuydt/sage-4.8/local/include -o mp.o mp.c
SAGE_ROOT=/home/jpuydt/sage-4.8

The gcc version is Ubuntu/Linaro 4.6.2-12ubuntu1.

I'll try to investigate where the problem is (pari? gcc? other?), but I
thought sharing early would raise good suggestions.

   Hard to tell without looking at what is being generated, but I
suspect something related to -mimplict-it=??? assembler option
with the assembler generating extra code, and branch encoding
for short jumps (8 or 11 bits). You can add -marm to CFLAGS
and then it can only generate 24 bit displacement jumps...

Adding -marm makes the file compile too.

Snark on #sagemath

PS: https://bugs.launchpad.net/ubuntu/+source/gcc-4.6/+bug/926855

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to