16 bit cross compilation

Vincent Lefevre vincent at vinc17.org
Tue Jan 2 13:32:32 CET 2007


On 2007-01-02 12:30:00 +0100, Torbjorn Granlund wrote:
>   > 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.

This is wrong. The C standard defines two forms of conforming
implementation: hosted and freestanding. <stdio.h> does not exist
in freestanding implementations or completely depends on the
implementation. So, even if FILE is not defined, it can still
be C. Now, the fact that GMP supports (all) freestanding
implementations or not is another matter...

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


More information about the gmp-discuss mailing list