===================================
MSYS2 provides two versions of make, one in the make package and one in the mingw-w64-{i686,x86_64}-make packages. The latter one is called mingw32-make on command line, is fully native and doesn't depend on msys2 shells.
MSYS2 uses Pacman (known from Arch Linux) to manage its packages and comes with three different package repositories:
msys2: Containing MSYS2-dependent software
mingw64: Containing 64-bit native Windows software (compiled with mingw-w64 x86_64 toolchain)
mingw32: Containing 32-bit native Windows software (compiled with mingw-w64 i686 toolchain)
Cygwin comes only with Cygwin-dependent software. It uses its own package management system, commonly called setup.exe.
-----------------------
lhu3@PC-HM6DD43 MINGW32
lhu3@PC-HM6DD43 MINGW32
$ uname -a
MINGW32_NT-10.0-18363 PC-HM6DD43 3.1.7-340.x86_64 2020-09-22 20:54 UTC x86_64 Msys
$ which gcc
/mingw32/bin/gcc
$ gcc hello.c -omingw32.exe
lhu3@PC-HM6DD43 MINGW32 /c/work/Develop
$ file mingw32.exe
mingw32.exe: PE32 executable (console) Intel 80386, for MS Windows
C:\work\Develop>\work\Software\UTIL\SysinternalsSuite\sigcheck64.exe mingw32.exe
Sigcheck v2.80 - File version and signature viewer
Copyright (C) 2004-2020 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\work\Develop\mingw32.exe:
Verified: Unsigned
Link date: 2:07 PM 10/19/2020
Publisher: n/a
Company: n/a
Description: n/a
Product: n/a
Prod version: n/a
File version: n/a
MachineType: 32-bit
C:\work\Develop>\work\Dependencies_x64_Release_.without.peview.exe\Dependencies.exe -imports mingw32.exe
[-] Import listing for file : mingw32.exe
Import from module KERNEL32.dll :
Function DeleteCriticalSection
Function EnterCriticalSection
Function FreeLibrary
Function GetLastError
Function GetModuleHandleA
Function GetModuleHandleW
Function GetProcAddress
Function GetStartupInfoA
Function InitializeCriticalSection
Function IsDBCSLeadByteEx
Function LeaveCriticalSection
Function LoadLibraryA
Function MultiByteToWideChar
Function SetUnhandledExceptionFilter
Function Sleep
Function TlsGetValue
Function VirtualProtect
Function VirtualQuery
Function WideCharToMultiByte
Import from module msvcrt.dll :
Function __getmainargs
Function __initenv
Function __lconv_init
Function __mb_cur_max
Function __p__acmdln
Function __p__commode
Function __p__fmode
Function __set_app_type
Function __setusermatherr
Function _amsg_exit
Function _cexit
Function _errno
Function _initterm
Function _iob
Function _lock
Function _onexit
Function _unlock
Function abort
Function atoi
Function calloc
Function exit
Function fprintf
Function fputc
Function free
Function fwrite
Function localeconv
Function malloc
Function memcpy
Function memset
Function setlocale
Function signal
Function strchr
Function strerror
Function strlen
Function strncmp
Function vfprintf
Function wcslen
[-] Import listing done
########### Note WinXP/mingw32.exe runs OK
-----------------------
#### MINGW64
lhu3@PC-HM6DD43 MINGW64 /c/work/Develop
$ uname -a
MINGW64_NT-10.0-18363 PC-HM6DD43 3.1.7-340.x86_64 2020-09-22 20:54 UTC x86_64 Msys
lhu3@PC-HM6DD43 MINGW64 /c/work/Develop
$ gcc hello.c -omingw64.exe
lhu3@PC-HM6DD43 MINGW64 /c/work/Develop
$ file mingw64.exe
mingw64.exe: PE32+ executable (console) x86-64, for MS Windows
lhu3@PC-HM6DD43 MINGW64 /c/work/Develop
$
C:\work\Develop>\work\Dependencies_x64_Release_.without.peview.exe\Dependencies.exe -imports mingw64.exe
[-] Import listing for file : mingw64.exe
Import from module KERNEL32.dll :
Function DeleteCriticalSection
Function EnterCriticalSection
Function GetLastError
Function GetStartupInfoA
Function InitializeCriticalSection
Function IsDBCSLeadByteEx
Function LeaveCriticalSection
Function MultiByteToWideChar
Function SetUnhandledExceptionFilter
Function Sleep
Function TlsGetValue
Function VirtualProtect
Function VirtualQuery
Function WideCharToMultiByte
Import from module msvcrt.dll :
Function __C_specific_handler
Function ___lc_codepage_func
Function ___mb_cur_max_func
Function __getmainargs
Function __initenv
Function __iob_func
Function __lconv_init
Function __set_app_type
Function __setusermatherr
Function _acmdln
Function _amsg_exit
Function _cexit
Function _commode
Function _errno
Function _fmode
Function _initterm
Function _lock
Function _onexit
Function _unlock
Function abort
Function calloc
Function exit
Function fprintf
Function fputc
Function free
Function fwrite
Function localeconv
Function malloc
Function memcpy
Function memset
Function signal
Function strerror
Function strlen
Function strncmp
Function vfprintf
Function wcslen
[-] Import listing done
<!-- @TOC -->
-----------------------
Cygwin provides a runtime library called cygwin1.dll that provides the POSIX compatibility layer where necessary. The MSYS2 variant of this library is called msys-2.0.dll
lhu3@PC-HM6DD43 MSYS ~
$ which gcc
/usr/bin/gcc
lhu3@PC-HM6DD43 MSYS ~
$ cd /c/work/Develop
lhu3@PC-HM6DD43 MSYS /c/work/Develop
$ gcc hello.c -o msys2-hello.exe
lhu3@PC-HM6DD43 MSYS /c/work/Develop
$ file msys2-hello.exe
msys2-hello.exe: PE32+ executable (console) x86-64, for MS Windows
lhu3@PC-HM6DD43 MSYS /c/work/Develop
$
C:\work\Develop>\work\Dependencies_x64_Release_.without.peview.exe\Dependencies.exe -imports msys2-hello.exe
[-] Import listing for file : msys2-hello.exe
Import from module msys-2.0.dll :
Function __cxa_atexit
Function __main
Function _dll_crt0
Function _impure_ptr
Function calloc
Function cygwin_internal
Function dll_dllcrt0
Function free
Function malloc
Function msys_detach_dll
Function posix_memalign
Function puts
Function realloc
Import from module KERNEL32.dll :
Function GetModuleHandleA
[-] Import listing done
C:\work\Develop>