As mentioned in this link http://www.delorie.com/djgpp/v2faq/faq8_20.html
How can I create a file where I can see the C code and its assembly translation together?
Res: If you want to see the C code together with the assembly it was converted to, use a command line like this:
gcc -c -g -Wa,-a,-ad [other GCC options] foo.c > foo.lst
I tried to make the same thing in the Mac OSX Yosemite terminal and received the following errors:
$ gcc -Wa,-a,-ad main.c > main.lst
clang: error: unsupported argument '-a' to option 'Wa,'
clang: error: unsupported argument '-ad' to option 'Wa,'
So, I'm looking for a way to generate a file with the assembly +source approach in the clang compiler, if there's one.
Thanks in advance.