develooper Front page | perl.perl5.porters | Postings from August 2012

WIN64 builds with dmake

Thread Next
Steve Hay
August 1, 2012 13:49
WIN64 builds with dmake
Message ID:
In the course of testing the new USE_64_BIT_INT option which
1f64ae1564 added to the Windows makefiles, I found that there are
(existing) problems with doing a full 64-bit build (WIN64=define) when
using dmake /

The problem is that dmake.exe is a 32-bit program, so it only sees the
WOW6432 environment, even when running in the 64-bit cmd.exe. It
therefore ends up seeing that PROCESSOR_ARCHITECTURE is x86 rather
than AMD64 (and PROCESSOR_ARCHITEW6432 is also defined (set to
AMD64)), and hence ARCHITECTURE gets wrongly set to x86 rather than

For MinGW-w64 this seems to succeed, producing a full 64-bit build,
but with archname wrongly set to MSWin32-x86... rather than

But for VC++ it results in LINK_FLAGS specifying -machine:x86 instead
of the required -machine:x64 and the build fails very early on.

Normally, of course, one uses nmake / Makefile for VC++ builds, and
with the x64 tools nmake.exe is 64-bit itself so it sees the correct
PROCESSOR_ARCHITECTURE value and the problem doesn't occur.

Is there any way around this (other than the obvious fix of building a
64-bit dmake.exe)?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About