简体   繁体   English

如何从GHC for Snow Leopard获得64位二进制文​​件?

[英]How to get 64-bit binaries from GHC for Snow Leopard?

I've recently upgraded my OS to Snow Leopard, which broke my GHC. 我最近将我的操作系统升级到Snow Leopard,这打破了我的GHC。 I was able to fix it on one machine by adding flags for 32-bit compiles in /usr/bin/ghc (something like -optl -m32 -opta -m32 -optc -m32, gathered from here ). 我能够通过在/ usr / bin / ghc中添加32位编译的标志在一台机器上修复它(类似于-optl -m32 -opta -m32 -optc -m32,从这里收集)。 Now I can't get it to produce 64-bit binaries for my other machine, which supports 64-bits. 现在我不能让它为我的另一台支持64位的机器生成64位二进制文​​件。 The 32-bit flags break, and removing them breaks as well. 32位标志中断,删除它们也会中断。 Any tips? 有小费吗?

When I try to compile I get stuff like this: 当我尝试编译时,我得到这样的东西:

/var/folders/az/az3Ef9shFZq6RajmTEBwu++++TI/-Tmp-//ghc8006_0/ghc8006_0.s:212:0:
32-bit absolute addressing is not supported for x86-64

/var/folders/az/az3Ef9shFZq6RajmTEBwu++++TI/-Tmp-//ghc8006_0/ghc8006_0.s:212:0:
cannot do signed 4 byte relocation

/var/folders/az/az3Ef9shFZq6RajmTEBwu++++TI/-Tmp-//ghc8006_0/ghc8006_0.s:215:0:
32-bit absolute addressing is not supported for x86-64

/var/folders/az/az3Ef9shFZq6RajmTEBwu++++TI/-Tmp-//ghc8006_0/ghc8006_0.s:215:0:
cannot do signed 4 byte relocation

Thanks! 谢谢!

64 bit Snow Leopard installers for the Haskell Platform are available, as of 2011. 截至2011年,Haskell平台的64位Snow Leopard安装程序可供使用。

Haskell平台

My understanding is that at the moment ghc cannot generate correct 64 bit binaries under Snow Leopard. 我的理解是,目前ghc无法在Snow Leopard下生成正确的64位二进制文​​件。 This appears to be in part because of a bug in its 64 bit link generation and in part because of a change in the native toolchain. 这似乎部分是因为其64位链接生成中的错误,部分原因是本机工具链发生了变化。 The workaround you mention simply tells it to generate a 32 bit target and thus won't be part of any actual solution to your problem. 您提到的解决方法只是告诉它生成一个32位目标,因此不会成为您问题的任何实际解决方案的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM