0

guys.i want to compile the gmp source code for arm platform,and i have written an android.mk file for it(just some src file and c-includes).failed when compile /mpf/sub.c file with asm error,but i haven't found any asm code in the sub.c file,the output is as below:

[armeabi] Compile arm    : gmp <= sub.c
/tmp/ccVI3Tsx.s: Assembler messages:
/tmp/ccVI3Tsx.s:1253: Error: bad instruction 'subq $1,(r3)'
/tmp/ccVI3Tsx.s:1254: Error: bad instruction 'lea 4(r3),r3'
/tmp/ccVI3Tsx.s:1255: Error: bad instruction 'jc .Lasm_1581_top
make: *** [obj/local/armeabi/objs/gmp/mpf/sub.o] Error 1`

I know little about asm, Can anyone tell me what happened and solution to fix it? I will appreciate whatever you did.

  • I don't build ndk products, but that output suggests that sub.c directly or indirectly is using a _GCC_ extended assembler template written for intel x86 but is being compiled on an arm version of GCC. – Michael Petch Jun 08 '16 at 02:32
  • It looks as though the source code has embedded assembly... which will make it difficult to compile for any other target. :) – David Hoelzer Jun 08 '16 at 10:15

0 Answers0