summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2016-02-13 04:05:24 -0500
committerTony Cook <tony@develop-help.com>2016-02-15 11:49:27 +1100
commit745dedb9b507e0e36ba9794c704b9b3fc44a8ab3 (patch)
treea40085e5de526c1af782eaa7bfb87f497a9b668a /win32
parent99b234bca42d2b5f9f5f74960bfd693b6d9c0b27 (diff)
downloadperl-745dedb9b507e0e36ba9794c704b9b3fc44a8ab3.tar.gz
fix win32 gmake with win64 VC with 32 bit GCC in PATH build failure
The assignment of PROCESSOR_ARCHITEW6432 to PROCESSOR_ARCHITECTURE near the "When we are running from a 32bit cmd.exe on AMD64 then" comment doesn't happen if WIN64 var was already assigned to. Do the 32/64 auto detection only for GCC builds, not for VC builds. I not implementing 32/64 and cl version (CCTYPE setting) detection by parsing stdout of "cl<enter>" with batch and gmake syntax at this time. failure message: generate_uudmap.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' GNUmakefile:1416: recipe for target '..\generate_uudmap.exe' failed gmake: *** [..\generate_uudmap.exe] Error 2
Diffstat (limited to 'win32')
-rw-r--r--win32/GNUmakefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 3abcba6bed..92d4528027 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -41,15 +41,6 @@ GCCVER1 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion')
GCCVER2 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%j)
GCCVER3 := $(shell for /f "delims=. tokens=1,2,3" %%i in ('gcc -dumpversion') do echo %%k)
-ifeq ($(GCCTARGET),x86_64-w64-mingw32)
-WIN64 := define
-ARCHITECTURE := x64
-endif
-ifeq ($(GCCTARGET),i686-w64-mingw32)
-WIN64 := undef
-ARCHITECTURE := x86
-endif
-
##
## Build configuration. Edit the values below to suit your needs.
##
@@ -363,6 +354,17 @@ ifeq ($(USE_NO_REGISTRY),define)
BUILDOPT += -DWIN32_NO_REGISTRY
endif
+ifeq ($(CCTYPE),GCC)
+ifeq ($(GCCTARGET),x86_64-w64-mingw32)
+WIN64 := define
+ARCHITECTURE := x64
+endif
+ifeq ($(GCCTARGET),i686-w64-mingw32)
+WIN64 := undef
+ARCHITECTURE := x86
+endif
+endif
+
PROCESSOR_ARCHITECTURE ?= x86
ifeq ($(WIN64),undef)