Jay Scott wrote:
I have a MacBook (which is a Core 2 Duo) running Mac OS X 10.4. On this
platform, gcc makes 32-bit executables by default, but if you give it -
m64 it makes them 64-bit. I've tried it, and it works. gcc gives its
version as "i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer,
Inc. build 5367)"

But 64-bit doesn't work with my ghc installation (6.8.2 from the binary
distribution on the downloads page). If I compile a "Hello World"
program with -fvia-c -optc-m64, it fails, saying

--
Warning: retaining unknown function `_siC_entry.eh' in output from C compiler
Warning: retaining unknown function `_Main_main_entry.eh' in output from
C compiler
Warning: retaining unknown function `_ZCMain_main_entry.eh' in output
from C compiler
Prologue junk?: _siC_entry:
LFB142:
        subq    $8, %rsp
LCFI0:
--

I don't need to solve this, but I thought I should make sure it's known.

GHC is built up front to generate either 32-bit or 64-bit code, there's no way to change this for a given GHC build. You should be able to install two versions of GHC side-by-side, but if you need to pass -m64 to gcc to get it to generate 64-bit code, then you will need to invoke ghc with something like

  ghc -optc-m64 -opta-m64 -optl-m64 ...

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to