When building perl with the mingw64 x64 cross-compiler 'incpath', 'libpth',
'ldflags', 'lddlflags' and 'ldflags_nolargefiles' values in Config.pm and
Config_heavy.pl are not being set correctly because, with that compiler, the
include and lib directories are not immediately below $(CCHOME).
.ELSE
CCHOME *= $(MSVCDIR)
.ENDIF
-CCINCDIR *= $(CCHOME)\include
-CCLIBDIR *= $(CCHOME)\lib
#
# If building with gcc-4.x.x (or x86_64-w64-mingw32-gcc-4.x.x), then
#GCCCROSS *= define
#
+# Following sets $Config{incpath} and $Config{libpth}
+#
+
+.IF "$(GCCCROSS)" == "define"
+CCINCDIR *= $(CCHOME)\mingw\include
+CCLIBDIR *= $(CCHOME)\mingw\lib
+.ELSE
+CCINCDIR *= $(CCHOME)\include
+CCLIBDIR *= $(CCHOME)\lib
+.ENDIF
+
+#
# Additional compiler flags can be specified here.
#
BUILDOPT *= $(BUILDOPTEXTRA)