Am 20.02.2011 03:22, schrieb Jonathan M Davis:
On Saturday 19 February 2011 16:21:05 Nick Sabalausky wrote:
"Jonathan M Davis"<[email protected]>  wrote in message
news:[email protected]...

On Saturday 19 February 2011 01:12:25 Russel Winder wrote:
Am I correct in assuming that DMD generates 32-bit by default and that
for 64-bit you have to give the -m64 option?

Is the eventual plan to use the natural word length of the platform as
the default, i.e. 32-bit on 32-bit and 64-bit on 64-bit, with the
option to force something different using the -m option à la GCC?

32 bit is the default for now. I don't know what Walter intends to do in
the
long run. If it were like gcc, then the default platform would be the
platform
which the compiler is built for (which is exactly what it's doing right
now),
but as far as I know, Walter has no plans to port dmd to x86_64.

So, for now 32 bit is the default. It may or may not change later to be
the
platform that you're building on. Ideally though, it would be like gcc
and we'd
actually get a 64 bit version of dmd at some point.

I don't mean this as "anti-64bit" trolling, just a genuine question, but
what would be the point of a 64-bit build of DMD? (Note: I'm talking about
host, not target). Just to compile projects that have (on the order of)
gigabytes of source?

1. Pure 64-bit systems don't run 32-bit programs unless they're statically
linked. You can't currently use dmd on a pure 64-bit system. You either have to
have a multilib system (which I'd argue you really should be doing anyway, but
it can be annoying) or you have to have a chrooted 32-bit environment to run it
in (yuck). And even if you _can_ have a multilib system, it's still nice to have
as many programs natively 64-bit as possible - especially since it reduces the
number of stray 32-bit libraries that you have to have installed.

2. dmd uses a lot of memory. It's trivial to write a program which causes dmd to
run out of memory - especially when using a lot of templates or CTFE. Now, a
good chunk of that is caused by dmd bugs and not an intrinsic need for more
memory, but it could still be very useful to have dmd be able to go beyond the
32-bit memory barrier.

This would however promote the development of programs that can be compiled on (for?) 64bit only. Not sure if this is desirable, especially as long as there's only 64bit support on Linux but not Windows/OSX (What about FreeBSD? Is it supported yet? Is it much different from Linux in this regard?)


- Jonathan M Davis

Cheers,
- Daniel

Reply via email to