The command-line tool to detect file type is `file` e.g.
Code:
$ file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5ef2c56f72d777c753846d70aa6ef7ef7ec13c86, not stripped
Not sure the best way to see gcc build-time configuration settings but you could try