diff options
author | Sisyphus <sisyphus1@optusnet.com.au> | 2009-11-09 22:56:14 -0500 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2009-11-09 22:56:14 -0500 |
commit | fa58a56f3cdf71021d7d7a49e98845f57652a3fe (patch) | |
tree | 7f1bcb4b29fa6d5d8645346f7871a9dedeeee64c /README.win32 | |
parent | cca43f7877df27a183ef8184587126e106940d27 (diff) | |
download | perl-fa58a56f3cdf71021d7d7a49e98845f57652a3fe.tar.gz |
Add mingw64 support
Hi,
Using the attached patch to the blead source (as of a few hours ago), I can
build perl with the following OS/compiler/make combos.
On 32-bit XP:
MSVC++ 7.0 / dmake (uses win32/makefile.mk)
MSVC++ 7.0 / nmake (uses win32/Makefile)
Borland C++ 5.5.1 / dmake
mingw.org's gcc-4.3.0 / dmake
mingw.org's gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
(There's a bug with that last compiler on XP.
The perl it builds on XP hangs on XP, but runs ok if copied across to Vista.
I think this is unrelated to the patches - probably even unrelated to perl.
Without these patches perl will not even build using that last compiler.)
On 64-bit Vista:
32-bit MSVC++ 7.0 / nmake (uses win32/Makefile)
32-bit MSVC++ 7.0 / dmake (uses win32/makfile.mk)
32-bit Borland C++ 5.5.1 / dmake
mingw.org's 32-bit gcc-4.4.0 / dmake
mingw.org's 32-bit gcc-3.4.5 / dmake
mingw-w64.sf's 32-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit gcc-4.4.3 / dmake
mingw-w64.sf's 64-bit x86_64-w64-mingw32-gcc-4.4.3 / dmake
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / dmake (uses
win32/makefile.mk)
64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / nmake (uses
win32/Makefile)
Not all of those builds pass all tests - but where the removal of the
patches still permits perl to build, the same tests still fail. That is,
*nothing* is lost by including these patches - but there are significant
gains.
Each of the above builds was done according to the normal win32
configuration parameters - ie multi-threaded, non debug. No unusual config
settings were applied. (I did build one debug perl on Vista using
mingw-w64.sf's 32-bit gcc-4.4.3 and it built fine.)
Please feel free to apply these patches (with or without modification) -
and, yes, you're more than welcome to blame me if they cause any breakages
;-)
Of course, some of those compilers (Borland, Microsoft, and the compilers
from mingw.org) already build perl *without* having to apply any patches.
It's just the other compilers that need the patches. The purpose of testing
with Borland, Microsoft, and the mingw.org compilers is just to check that
these patches don't break them.
As a final check, I've done a build on my aging linux (mandrake-9.1) box,
gcc-3.2.2. I built with '-des -Duselongdouble -Duse64bitint -Dusedevel'. No
problem with that, either.
If there's additional testing requirements please let me know, and I'll try
to oblige.
I believe the patch applied successfully for me - see below my sig for the
output.
Cheers,
Rob
Rob@desktop2 ~/GIT/blead
$ patch -p0 <blead_diff.diff
patching file dist/threads/threads.xs
patching file handy.h
patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm
patching file op.c
Hunk #1 succeeded at 5774 (offset 47 lines).
patching file pp_pack.c
patching file util.c
Hunk #1 succeeded at 5366 (offset -28 lines).
patching file win32/makefile.mk
patching file win32/perlhost.h
patching file win32/win32.c
patching file win32/win32.h
patching file README.win32
patching file XSUB.h
Diffstat (limited to 'README.win32')
-rw-r--r-- | README.win32 | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/README.win32 b/README.win32 index 231252a9e5..2a3a5b4afd 100644 --- a/README.win32 +++ b/README.win32 @@ -44,9 +44,18 @@ following compilers on the Intel x86 architecture: Borland C++ version 5.02 or later Microsoft Visual C++ version 2.0 or later MinGW with gcc gcc version 2.95.2 or later - -The last of these is a high quality freeware compiler. Use version -3.2.x or later for the best results with this compiler. + Gcc by mingw.org gcc version 2.95.2 or later + Gcc by mingw-w64.sf.net gcc version 4.4.3 or later + +Note that the last two of these are actually competing projects both +delivering complete gcc toolchain for MS Windows: +- http://mingw.org - delivers gcc toolchain targeting 32-bit Windows + platform. + Use version 3.2.x or later for the best results with this compiler. +- http://mingw-w64.sf.net - delivers gcc toolchain targeting both 64-bit + Windows and 32-bit Windows platforms (despite the project name "mingw-w64" + they are not only 64-bit oriented). They deliver the native gcc compilers + + cross-compilers that are also supported by perl's makefile. The Borland C++ and Microsoft Visual C++ compilers are also now being given away free. The Borland compiler is available as "Borland C++ Compiler Free @@ -57,11 +66,19 @@ as part of the ".NET Framework SDK") and is the same compiler that ships with "Visual C++ .NET 2003 Professional" or "Visual C++ 2005/2008 Professional" respectively. -This port can also be built on the Intel IA64 using: +This port can also be built on IA64/AMD64 using: Microsoft Platform SDK Nov 2001 (64-bit compiler and tools) + MinGW64 compiler (gcc version 4.4.3 or later) The MS Platform SDK can be downloaded from http://www.microsoft.com/. +The MinGW64 compiler is available at http://sourceforge.net/projects/mingw-w64. +The latter is actually a cross-compiler targeting Win64. There's also a trimmed +down compiler (no java, or gfortran) suitable for building perl available at: +http://svn.ali.as/cpan/users/kmx/strawberry_gcc-toolchain/ + +NOTE: If you're using a 32-bit compiler to build perl on a 64-bit Windows +operating system, then you should set the WIN64 environment variable to "undef". This port fully supports MakeMaker (the set of modules that is used to build extensions to perl). Therefore, you should be @@ -330,6 +347,9 @@ gcc-3.2.3. It can be downloaded here: Perl also compiles with earlier releases of gcc (2.95.2 and up). See below for notes about using earlier versions of MinGW/gcc. +And perl also compiles with gcc-4.3.0 and up, and perhaps even some of the +earlier 4.x.x versions. + You also need dmake. See L</"Make"> above on how to get it. =item MinGW release 1 with gcc @@ -396,7 +416,16 @@ may end up building against the installed perl's lib/CORE directory rather than the one being tested. You will have to make sure that CCTYPE is set correctly and that -CCHOME points to wherever you installed your compiler. +CCHOME points to wherever you installed your compiler. If building with +gcc-4.x.x, you'll also need to uncomment the assignment to GCC_4XX and +uncomment the assignment to the appropriate GCCHELPERDLL in the makefile.mk. + +If building with the cross-compiler provided by +mingw-w64.sourceforge.net you'll need to uncomment the line that sets +GCCCROSS in the makefile.mk. Do this only if it's the cross-compiler - ie +only if the bin folder doesn't contain a gcc.exe. (The cross-compiler +does not provide a gcc.exe, g++.exe, ar.exe, etc. Instead, all of these +executables are prefixed with 'x86_64-w64-mingw32-'.) The default value for CCHOME in the makefiles for Visual C++ may not be correct for some versions. Make sure the default exists |