What do C compilers generate in Cygwin?

Based on the output of the ident-compilers.sh script, it is shown below that the following C compilers are available on Cygwin. Those with the signature "Cygwin" require the cygwin1.dll file to be available.

What is the difference between "pc" and "w64" compilers?

Why is there no x86_64-pc-mingw-gcc.exe executabe?

Are there other C compilers?

/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
+4
source share
1 answer
  • gcc is just a hard link to x86_64-pc-cygwin-gcc

  • x86_64-pc-cygwin-gccand i686-pc-cygwin-gccas you said Cygwin Compilers, that is, compilers that create programs that rely oncygwin1.dll

  • x86_64-w64-mingw32-gccand i686-w64-mingw32-gccare compilers provided by the Mingw-w64 Project  

  • i686-pc-mingw32-gcc - , MinGW

, , Mingw? , Mingw-w64 , MinGW 64- . MSYS2  , MinGW .

+3

All Articles