Page 1 of 1

mips-gcc 4.8.1 fails with Chipmunk 7.0. Works Ok with 6.2.2

PostPosted: Wed Feb 04, 2015 12:33 am
by riq
This seems to be a bug in mips-linux-gnu-gcc 4.8.1 and not a bug in Chipmunk 7.0... but since I cannot upgrade the toolchain, I would like to work-around it.

Some context:

* I'm cross-compiling Chipmunk to CI20, a Linux Mips machine (
* I'm using gcc-mips v4.8.1 as the cross-compiler, and I cannot upgrade it ( ... cmpid=7108)
* Chipmunk v6.2.2 cross-compiles Ok
* Chipmunk v7.0.0 (github master branch from today) fails with the following error:

Code: Select all
cd /home/riq/src/Chipmunk2D/mips/src && /home/riq/MentorGraphics/Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux/bin/mips-linux-gnu-gcc  -Dchipmunk_EXPORTS -std=gnu99 -O3 -DNDEBUG -ffast-math -fPIC -I/home/riq/src/Chipmunk2D/include    -o CMakeFiles/chipmunk.dir/cpPolyShape.c.o   -c /home/riq/src/Chipmunk2D/src/cpPolyShape.c
/tmp/cc3TBu8t.s: Assembler messages:
/tmp/cc3TBu8t.s:306: Error: invalid operands `movz $24,$25,$fcc0'
src/CMakeFiles/chipmunk.dir/build.make:721: recipe for target 'src/CMakeFiles/chipmunk.dir/cpPolyShape.c.o' failed

For some reason, mips-gcc doesn't like "movz...", but apparently it is a valid opcode.

The opcode seems to be in the cpPolyShapeQuery function. I posted the disassembly here: ... -error-L92

any idea how to work-around it?

Re: mips-gcc 4.8.1 fails with Chipmunk 7.0. Works Ok with 6.

PostPosted: Wed Feb 04, 2015 12:50 am
by riq
Ok, apparently this tiny change makes it compile:

the "movz..." opcode is not generated and mips-gcc 4.8.1 is happy with it.