16 bit cross compilation
Torbjorn Granlund
tege at swox.com
Fri Dec 29 17:27:29 CET 2006
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:
Cool project!
- 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)?
There is no configuration that does that today, we just added the
mechanism to simplify for people that wanted to do things like this.
- 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.
Well, I don't think it is because the absense or presence of a file
system. If you get compilation errors, it is a bug in your stdio.h,
or a bug in GMP.
- 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?
In need of some porting. The porting should not be hard, though.
You should run into compiling things like "choke me" and "you lose",
indicating that something needs to be addressed exactly there.
Typically you need to fill out a table, or add some constants.
--
Torbjörn
More information about the gmp-discuss
mailing list