Thread overview
[D-runtime] druntime and 64-bit build
Feb 14, 2011
Jonathan M Davis
Feb 14, 2011
Brad Roberts
Feb 14, 2011
Walter Bright
February 13, 2011
Is the druntime posix.mak makefile not set up for a 64-bit build? I can't figure out how to make it build a 64-bit version, and it doesn't seem to have a lib32 and lib64 directory or anything similar.

Looking at Phobos' posix.mak makefile, it looks like you build with MODEL=64, and it will do the 64-bit build and put the library in generated/linux/debug/64 instead of generated/linux/debug/32 ( or generated/release/... for release). But if druntime isn't built as 64-bit, then I don't see as how you could build Phobos that way. druntime is obviously being built and run as 64-bit on the autotester, but I haven't a clue how.

What do I need to do to build druntime as 64-bit, and do the makefiles need updating?

- Jonathan M Davis
February 13, 2011
On 2/13/2011 10:12 PM, Jonathan M Davis wrote:
> Is the druntime posix.mak makefile not set up for a 64-bit build? I can't figure out how to make it build a 64-bit version, and it doesn't seem to have a lib32 and lib64 directory or anything similar.
> 
> Looking at Phobos' posix.mak makefile, it looks like you build with MODEL=64, and it will do the 64-bit build and put the library in generated/linux/debug/64 instead of generated/linux/debug/32 ( or generated/release/... for release). But if druntime isn't built as 64-bit, then I don't see as how you could build Phobos that way. druntime is obviously being built and run as 64-bit on the autotester, but I haven't a clue how.
> 
> What do I need to do to build druntime as 64-bit, and do the makefiles need updating?
> 
> - Jonathan M Davis

Same as for phobos, just that it doesn't output two libs yet -- no one has bothered to alter the makefiles yet. MODEL=64 or MODEL=32

February 14, 2011

Jonathan M Davis wrote:
> Is the druntime posix.mak makefile not set up for a 64-bit build? I can't figure out how to make it build a 64-bit version, and it doesn't seem to have a lib32 and lib64 directory or anything similar.
>
> Looking at Phobos' posix.mak makefile, it looks like you build with MODEL=64, and it will do the 64-bit build and put the library in generated/linux/debug/64 instead of generated/linux/debug/32 ( or generated/release/... for release). But if druntime isn't built as 64-bit, then I don't see as how you could build Phobos that way. druntime is obviously being built and run as 64-bit on the autotester, but I haven't a clue how.
>
> What do I need to do to build druntime as 64-bit, and do the makefiles need
> updating?
> 

Here's what I use to build and test on linux. (To make things more convenient, I use makefiles that just forward to -f posix.mak, and account for the different directory structure than is used on github.) The salient point is that in between 32 and 64 bit druntime builds, a 'clean' is run. This is different from phobos building.


if ./unzipall
then
if make clean
then
if make dmd
then
strip -s dmd
if cd druntime
then
if make clean
then
if make
then
if cd ../phobos
then
if make clean
then
if make
then
if make unittest
then
if cd ../druntime
then
if make clean MODEL=64
then
if make MODEL=64
then
if cd ../phobos
then
if make MODEL=64
then
if make unittest MODEL=64
then
cd ../test
shell -j linux.sh
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi