Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven LUTHER <luther@d...>
Subject: Re: [Caml-list] Runtime overflow and what to do
On Sun, Oct 13, 2002 at 11:31:30AM +0200, Xavier Leroy wrote:
> > BTW, i compile the sparc debian package on a sparc64 box which
> > advertizes as a sparc box. Will i get access to the 64 bit integers in
> > this case or not ?
> The short answer is: it depends on the C compiler.  Caml integers
> correspond to the C "long int" type, with one bit reserved for GC
> purposes.  So, if the C compiler maps "long int" to 64-bit integers,
> you get 63-bit Caml ints; if it chooses 32-bit integers for "long int",
> you get 31-bit Caml ints.  Often, this can be controlled via flags to
> the C compiler.

Ok, ...

Which would be the relevant flags ?

i get (from the build log) :


Checking the sizes of integers and pointers...
OK, this is a regular 32 bit architecture.
64-bit "long long" integer type found (printf with "%ll").
This is a big-endian architecture.
Doubles must be doubleword-aligned.
64-bit integers must be doubleword-aligned.


Configuration for the bytecode compiler:
        C compiler used........... gcc
        options for compiling..... -fno-defer-pop -Wall -Wno-unused -D_FILE_OFFSET_BITS=64 -D_REENTRANT
        options for linking.......  -Wl,-E  -lm -ldl -lcurses -lpthread
        shared libraries are supported
        options for compiling..... -fPIC -fno-defer-pop -Wall -Wno-unused -D_FILE_OFFSET_BITS=64 -D_REENTRANT
        command for building...... gcc -shared -o -Wl,-rpath,/a/path objs

So i suppose this is not using 64 bit mode.

More importantly, i suppose code compiled in this fashion for 64 bit
sparcs will not build on 32 bit sparc boxes, if these kind of boxes are
still available anyway.

> The above is for the bytecode interpreter.  For the native-code
> compiler, the current Sparc code emitter mandates 32-bit integers.

Would it be much work to build a 64-bit integers target ?


Sven Luther
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: