www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 64 Support on Mac, FreeBSD

reply dsimcha <dsimcha yahoo.com> writes:
Purely out of curiosity (as in I personally have no pressing need for 
it), what are the main roadblocks to DMD supporting 64-bit on Mac OS and 
FreeBSD?  I understand that on Windows we'd need a new linker, etc, but 
IIUC FreeBSD and Mac OS use GCC like Linux does.
May 06 2011
next sibling parent reply Brad Roberts <braddr puremagic.com> writes:
On 5/6/2011 9:58 PM, dsimcha wrote:
 Purely out of curiosity (as in I personally have no pressing need for it),
what are the main roadblocks to DMD
 supporting 64-bit on Mac OS and FreeBSD?  I understand that on Windows we'd
need a new linker, etc, but IIUC FreeBSD and
 Mac OS use GCC like Linux does.

For freebsd, almost nothing since it's all elf and uses the gnu tool chain largely as is. I've already done a first pass test of it and the results were extremely promising. Maybe the next release can have it. For OSX, it's more work since it's not elf based and they diverge fairly far from a pure gnu tool chain. At a minimum, the ability to write out macho 64 bit .o files. Probably more, but hopefully not a lot more. It'll be a lot easier to assess after that part is done I suspect. Later, Brad
May 06 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-05-07 07:24, Brad Roberts wrote:
 On 5/6/2011 9:58 PM, dsimcha wrote:
 Purely out of curiosity (as in I personally have no pressing need for it),
what are the main roadblocks to DMD
 supporting 64-bit on Mac OS and FreeBSD?  I understand that on Windows we'd
need a new linker, etc, but IIUC FreeBSD and
 Mac OS use GCC like Linux does.

For freebsd, almost nothing since it's all elf and uses the gnu tool chain largely as is. I've already done a first pass test of it and the results were extremely promising. Maybe the next release can have it. For OSX, it's more work since it's not elf based and they diverge fairly far from a pure gnu tool chain. At a minimum, the ability to write out macho 64 bit .o files. Probably more, but hopefully not a lot more. It'll be a lot easier to assess after that part is done I suspect. Later, Brad

Mac OS X has the advantage of universal binaries, almost every library and application (at least the system libraries) are available both for 32 and 64bit in the same binary and you usually don't have to think about 32 vs 64bit libraries. -- /Jacob Carlborg
May 08 2011
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 5/6/2011 9:58 PM, dsimcha wrote:
 Purely out of curiosity (as in I personally have no pressing need for it), what
 are the main roadblocks to DMD supporting 64-bit on Mac OS and FreeBSD? I
 understand that on Windows we'd need a new linker, etc, but IIUC FreeBSD and
Mac
 OS use GCC like Linux does.

I don't think there are any technical problems, just a lot of detail work. Mac OS64 will be harder because there's that Mach-O format for object files that is unique to the Mac. FreeBSD64 uses ELF-64 which has already been done for Linux64.
May 06 2011