Is DMD 2.052 32-bit?

jam gr0v3er+d at gmail.com
Wed Mar 9 08:17:55 PST 2011


On Wed, 09 Mar 2011 01:24:56 -0600, Jason E. Aten wrote:

> On Wed, Mar 9, 2011 at 12:55 AM, Walter Bright
> <newshound2 at digitalmars.com>wrote:
> 
>> On 3/8/2011 1:23 PM, Trass3r wrote:
>>
>>> Yes, but you can compile an x64 dmd yourself on Linux.
>>>>>
>>>>>
>>>> Is there any "how to"?
>>>>
>>>>
>>> IIRC you have to edit linux.mak to use -m64 instead of -m32.
>>>
>>>
>> It has worked in the past, but the 64 bit build is not regularly
>> tested.
>>
>>
> When I tried this last week, changing -m32 to -m64 got me a clean 64-bit
> build of dmd2, with no build errors.  Very easy.
> 
> A caveat-- I tried the same search and replace s/32/64/ in places on the
> druntime and phobos makefiles, but there was something more subtle going
> on--the generated libraries built fine but were still 32-bit objects
> inside the .a archives.  Somehow I wasn't passing the right flags to
> generate 64-bit libraries.
> 
> Is there a flag to tell dmd to compile to 64-bit objects?
> 
> Thanks,
> Jason

In addition to changing the MODEL env variable in the makefiles, I also 
had to pass the -m64 flag to the dmd binary to build x64 libphobos.a and 
libdruntime.a

i.e. make -f posix.mak DMD="PATH_TO_DMD -m64"



More information about the Digitalmars-d mailing list