This post will be dedicated to gcc’s command line options and various other questions related to compiling/building your code with gcc. For example…
How can I get gcc to generate assembly code for my C file:
gcc -O2 -S -c foo.c
How can I tell gcc to generate an assembly listing? (that is C and ASM instructions interspersed, and also displaying the byte offsets and line numbers):
gcc -c -g -Wa,-a,-ad $(DCEAPP_CFLAGS) db.c > db.LST

Tagged with:

One Response to How can I make gcc do this…

  1. Alan says:

    To see default include and lib directories:
    gcc -v source_file.c

    The key part is giving it a source file (any C file) – otherwise it will only print version info and exit.

Leave a Reply

Your email address will not be published. Required fields are marked *

Set your Twitter account name in your settings to use the TwitterBar Section.