16 bit cross compilation
Torbjorn Granlund
tege at swox.com
Tue Jan 2 12:30:00 CET 2007
> 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.
It seems like I left out some important information. What happens is that
since _GMP_H_HAVE_FILE is defined (caused by the fact that stdio.h exists),
a lot of file system related code is included when compiling GMP. The FILE
type is not defined in the msp430 compiler. This will generate a lot of
compilation errors when compiling gmp.h (see for instance function
gmp_fprintf).
Then there is no hope of compiling GMP. GMP requires an ISO C environment,
but can cope with most obsolete K&R environments as well. But without FILE
you will not be able to compile GMP. It is not C if FILE is not defined by
stdio.h.
I also have another problem: For test purposes I have made a 16 bit
(generic) GMP library for PC, but when running it, my test program produces
wrong results. mpn_mul_n is working fine, but mpn_tdiv_qr is not. Do you
have any tip about where I should start looking for the problem?
Yes, in the division code. :-)
--
Torbjörn
More information about the gmp-discuss
mailing list