diff -Naur Python-3.8.0-orig/Lib/distutils/ccompiler.py Python-3.8.0/Lib/distutils/ccompiler.py
--- Python-3.8.0-orig/Lib/distutils/ccompiler.py	2019-10-14 16:34:47.000000000 +0300
+++ Python-3.8.0/Lib/distutils/ccompiler.py	2019-10-22 10:01:58.266844500 +0300
@@ -9,7 +9,7 @@
 from distutils.file_util import move_file
 from distutils.dir_util import mkpath
 from distutils.dep_util import newer_pairwise, newer_group
-from distutils.util import split_quoted, execute
+from distutils.util import split_quoted, execute, get_platform
 from distutils import log
 
 class CCompiler:
@@ -948,6 +948,8 @@
         osname = os.name
     if platform is None:
         platform = sys.platform
+    if get_platform().startswith('mingw'):
+        return 'mingw32'
     for pattern, compiler in _default_compilers:
         if re.match(pattern, platform) is not None or \
            re.match(pattern, osname) is not None:
diff -Naur Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py Python-3.8.0/Lib/distutils/cygwinccompiler.py
--- Python-3.8.0-orig/Lib/distutils/cygwinccompiler.py	2019-10-14 16:34:47.000000000 +0300
+++ Python-3.8.0/Lib/distutils/cygwinccompiler.py	2019-10-22 10:01:58.656845200 +0300
@@ -255,11 +255,16 @@
             output_dir = ''
         obj_names = []
         for src_name in source_filenames:
-            # use normcase to make sure '.rc' is really '.rc' and not '.RC'
-            base, ext = os.path.splitext(os.path.normcase(src_name))
+            base, ext = os.path.splitext(src_name)
+            # use 'normcase' only for resource suffixes
+            ext_normcase = os.path.normcase(ext)
+            if ext_normcase in ['.rc','.res']:
+                ext = ext_normcase
             if ext not in (self.src_extensions + ['.rc','.res']):
                 raise UnknownFileError("unknown file type '%s' (from '%s')" % \
                       (ext, src_name))
+            base = os.path.splitdrive(base)[1] # Chop off the drive
+            base = base[os.path.isabs(base):]  # If abs, chop off leading /
             if strip_dir:
                 base = os.path.basename (base)
             if ext in ('.res', '.rc'):
@@ -315,7 +320,7 @@
 
         # Include the appropriate MSVC runtime library if Python was built
         # with MSVC 7.0 or later.
-        self.dll_libraries = get_msvcr()
+        self.dll_libraries = get_msvcr() or []
 
 # Because these compilers aren't configured in Python's pyconfig.h file by
 # default, we should at least warn the user if he is using an unmodified
