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
Compiling for Mac OS 64 bit?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-10-25 (16:37)
From: Fritz Anderson <fritza@u...>
Subject: Compiling for Mac OS 64 bit?
I've been asked to research the use of Ocaml in high-performance  
computing applications on Mac OS X. I take this to mean (a) 64-bit  
applications (the client says so) and (b) compiled applications.

I've configured the build with
     ./configure -cc 'gcc -arch ppc64' -tk-no-x11
... which seems to produce the interpreter with no complaints, with  
the only exception that had to be edited so that '-arch  
ppc64' was appended to the value of the mksharedlib variable. Make  
bootstrap concludes without error.

(Caveats that an interpreter that has to haul 64-bit entities around  
instead of 32-bit entities is apt to be slower, are already  
understood. By me. The client sees a knob labeled 32/64, and wants to  
turn it all the way up.)

Make opt is not so happy. One example is that the assembler balks at

     .long    _caml_int64_ops
     .long    1018167296
     .long    4372995238176751616
     .long    2303

because the huge number should take the .quad directive, not .long.  
But given that the huge number is 0x3cb0000000000000, I have bad  
feelings that this is some badly-cleared or -shifted native integer.  
In fact, my skimming of the compiler source suggests that the  
compiler doesn't do native 64-bit pointers and integers.

Is there a way to configure Ocaml to produce a 64-bit compiler, or is  
there a project for one? (I know, I'm asking for magic beans.) Or do  
I tell the client that on PowerPC/Mac OS, it's 32 bits or nothing?

     -- F

Fritz Anderson
Mac Programmer
University of Chicago