16 bit cross compilation

Inge Witsoe Inge.Witsoe at q-free.com
Fri Dec 29 16:44:28 CET 2006

Hi all,

I am new to this list, and new to GMP.

I am trying to make GMP 4.2.1 (or at least MPN) run on a 16 bit MSP430
microcontroller, but I am having some problems:

- The mp_limb_t type becomes 32 bit by default. How can I change this to a
16 bit type (i.e. how do I set the __GMP_SHORT_LIMB preprocessor flag)?

- The configure script concludes that a file system is available (probably
because a stdio.h is available), and sets _GMP_H_HAVE_FILE, which leeds to a
lot of compilation errors.

- When trying do fix these problems by manually editing mp-h.in, gmp-h.in
and configure, I get an error when compiling mpq/set_d.c (it tries to
compile the line 'choke me'). This is probably caused by mp_limb_t being
only 2 bytes long. Could this be an indication that GMP will not run, or at
least is not tested, on a 16 bit CPU?

Any suggestions?

Best regards,
Inge Witsøe

More information about the gmp-discuss mailing list