Compiling GMP for Windows CE / ARM processor (cegcc)

Torbjorn Granlund tg at gmplib.org
Sat Nov 14 17:57:57 CET 2009


Dear Marian,

Did you succeed with your cross compilation?  Did you check out the item
on cross compilation in the GMP manual?  It seems you had problems
getting the GMP cpnfigure locate your cross compiler.

The manual mentions how cross compilers are located.  (This is actually
not specific for GMP, but common to all autoconf based packages.)

Then the output from configure should give you additional hints how the
compiler tools are looked for.
  
  I am actually fighting now with the same task: how to compile GMP for
  Windows Mobile 5 (or Windows Mobile 6) so that a correct library is
  created. And I am mightily confused about which build target to choose.
  >From the CPU-VENDOR-OS triad, I am quite sure that CPU is "arm". But
  what "VENDOR" and "OS"?
  
VENDOR can often be left as "unknown".  OS might be relevant, in
particular if it means some non-standard ABI is needed, but then it
needs to make sense to GMP.  If SOME_OS is unknown to GMP, then GMP will
try to default to something sensible.

I think this is all covered quite well in the GMP manual.

  I tried to dig around the GCC documentation, but I was not able to find
  the list of supported OSes, maybe I am looking to wrong places. Searches
  for "gcc cross-compilation windows mobile" tend to land me on the CeGCC
  project's webpages. As I can see from your previous reply to Tobias ,
  this is not a recommended toolchain.
  
There is no list of supported OSes.  Such a list would always be
incomplete, since GMP's configure is quite clever about finding ways to
support an OS it has never seen.

  I had a little more luck with
  ./configure --host=arm-unknown-wince --disable-static --enable-shared
  which was able to finish correctly, but the subsequent make spit out the
  following errors:
  
  tmp-add_n.s: Assembler messages:
  tmp-add_n.s:58: Error: no such instruction: `stmfd r13!,{r8,r9,r14}'
  tmp-add_n.s:59: Error: too many memory references for `movs'
  tmp-add_n.s:60: Error: no such instruction: `bcc .Lskip1'
  tmp-add_n.s:61: Error: no such instruction: `ldr r12,[r1],'
  tmp-add_n.s:62: Error: no such instruction: `ldr r14,[r2],'
  
  So I think I qualify for the situation "I read the documentation
  thoroughly and made honest attempts to get the thing working, but can't
  help myself."
  
Please re-read the text about how GMP locates the cross compiler.

-- 
Torbjörn


More information about the gmp-discuss mailing list