diff options
author | Sisyphus <sisyphus@cpan.org> | 2011-05-22 23:15:30 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-22 23:15:30 -0700 |
commit | 4cef65c2f148d62eb1918e68e26b4298d9786a00 (patch) | |
tree | e96dd0c3f156518ea54b82b997d0fa6c2208ec02 | |
parent | 0e21945565eb4664d843bb819fb032cedee4d5a6 (diff) | |
download | perl-4cef65c2f148d62eb1918e68e26b4298d9786a00.tar.gz |
[perl #91354] win32/makefile.mk needs patching for gcc-4.x.x
The current win32/makefile.mk wants us to edit it when we are using
the gcc-4.x.x compiler. Firstly, we have to signify that we are using
gcc-4.x.x, then we have to nominate (from a supplied list) the name of
the helper dll that needs to be copied to the t folder (in order that
the taint.t tests can pass).
The supplied list of candidates is deficient - the name of the helper
dll from one of my gcc compilers is not listed there. Also, I'm now
finding that a second dll (libstdc++-6.dll) needs to be copied to the
t folder - otherwise the taint.t test still crashes.
The attached makefile.mk patch addresses these issues in such a way
that we don't have to do any editting (re the using of gcc-4.x.x) of
the makefile.mk at all.
There's a small discussion about this on the p5p mailing list in the
thread "win32/makefile.mk patch" (15 may 2011).
This change to the makefile.mk means that README.win32 needs a
slight modification - and the attached README.win32 patch addresses
that issue.
The README.win32 patch also alters the link to the 64-bit (mingw64)
compiler made available by kmx. This has nothing to do with the
subject of this bug report, but I don't see why that correction to
the link (as suggested to me by kmx, in private correspondence)
can't be made.
-rw-r--r-- | README.win32 | 6 | ||||
-rw-r--r-- | win32/makefile.mk | 31 |
2 files changed, 14 insertions, 23 deletions
diff --git a/README.win32 b/README.win32 index ba9f69a1b5..106d6990cb 100644 --- a/README.win32 +++ b/README.win32 @@ -80,7 +80,7 @@ The Windows SDK can be downloaded from L<http://www.microsoft.com/>. The MinGW64 compiler is available at L<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: -L<http://strawberryperl.com/package/kmx/64_gcctoolchain/mingw64-w64-20100123-kmx-v2.zip> +L<http://strawberryperl.com/package/kmx/64_gcctoolchain/> 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". @@ -362,9 +362,7 @@ 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. 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. +CCHOME points to wherever you installed your compiler. If building with the cross-compiler provided by mingw-w64.sourceforge.net you'll need to uncomment the line that sets diff --git a/win32/makefile.mk b/win32/makefile.mk index 069e8ed9fa..2cbcdeaa76 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -200,22 +200,6 @@ CCHOME *= $(MSVCDIR) .ENDIF # -# If building with gcc-4.x.x (or x86_64-w64-mingw32-gcc-4.x.x), then -# uncomment the following assignment to GCC_4XX, make sure that CCHOME -# has been set correctly above, and uncomment the appropriate -# GCCHELPERDLL line. -# The name of the dll can change, depending upon which vendor has supplied -# your 4.x.x compiler, and upon the values of "x". -# (The dll will be in your mingw/bin folder, so check there if you're -# unsure about the correct name.) -# Without these corrections, the op/taint.t test script will fail. -# -#GCC_4XX *= define -#GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_sjlj-1.dll -#GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_dw2-1.dll -#GCCHELPERDLL *= $(CCHOME)\bin\libgcc_s_1.dll - -# # uncomment this if you are using x86_64-w64-mingw32 cross-compiler # ie if your gcc executable is called 'x86_64-w64-mingw32-gcc' # instead of the usual 'gcc'. @@ -1623,10 +1607,19 @@ test-prep : all utils ..\pod\perltoc.pod .ELSE $(XCOPY) $(GLOBEXE) ..\t\$(NULL) .ENDIF + .IF "$(CCTYPE)" == "GCC" -.IF "$(GCC_4XX)" == "define" - $(XCOPY) $(GCCHELPERDLL) ..\t\$(NULL) -.ENDIF +# If building with gcc versions 4.x.x or greater, then +# the GCC helper DLL will also need copied to the test directory. +# The name of the dll can change, depending upon which vendor has supplied +# your compiler, and upon the values of "x". +# libstdc++-6.dll is copied if it exists as it, too, may then be needed. +# Without this copying, the op/taint.t test script will fail. + if exist $(CCHOME)\bin\libgcc_s_sjlj-1.dll $(XCOPY) $(CCHOME)\bin\libgcc_s_sjlj-1.dll ..\t\$(NULL) + if exist $(CCHOME)\bin\libgcc_s_dw2-1.dll $(XCOPY) $(CCHOME)\bin\libgcc_s_dw2-1.dll ..\t\$(NULL) + if exist $(CCHOME)\bin\libgcc_s_1.dll $(XCOPY) $(CCHOME)\bin\libgcc_s_1.dll ..\t\$(NULL) + if exist $(CCHOME)\bin\w64gcc_s_sjlj-1.dll $(XCOPY) $(CCHOME)\bin\w64gcc_s_sjlj-1.dll ..\t\$(NULL) + if exist $(CCHOME)\bin\libstdc++-6.dll $(XCOPY) $(CCHOME)\bin\libstdc++-6.dll ..\t\$(NULL) .ENDIF test : $(RIGHTMAKE) test-prep |