Based on the output of the identify-compilers.sh script below, it appears that the following C compilers are available on Cygwin. Those labeled "Cygwin" require the cygwin1.dll file to be available.
What is the difference between the "pc" and "w64" compilers?
Why is there no x86_64-pc-mingw-gcc.exe executabe?
Are there any other C compilers available?
/usr/bin/gcc.exe 64-bit Cygwin
/usr/bin/i686-pc-cygwin-gcc.exe 32-bit Cygwin
/usr/bin/i686-pc-mingw32-gcc.exe 32-bit
/usr/bin/i686-w64-mingw32-gcc.exe 32-bit
/usr/bin/x86_64-pc-cygwin-gcc.exe 64-bit Cygwin
/usr/bin/x86_64-w64-mingw32-gcc.exe 64-bit
$ cat identify-compilers.sh
#!/bin/bash
for c in $(ls -1 /usr/bin/*gcc.exe); do
echo === compiler: $c
$c -o hello.exe hello.c
objdump -p hello.exe | grep -i "cygwin"
objdump -p hello.exe | grep -i "64$"
rm hello.exe
done
gcc
is just a hard link to x86_64-pc-cygwin-gcc
x86_64-pc-cygwin-gcc
and i686-pc-cygwin-gcc
are as you have said the
Cygwin compilers, that is to say the compilers that create programs that rely
on cygwin1.dll
x86_64-w64-mingw32-gcc
and i686-w64-mingw32-gcc
are compilers provided
by the Mingw-w64 project
i686-pc-mingw32-gcc
is a compiler provided by the MinGW project
You may be wondering, why the two Mingw projects? Well the Mingw-w64 project was started because MinGW refused to adopt the 64-bit compiler. Between this and the starting of the MSYS2 project, I consider the MinGW project obsolete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With