User Tools

Site Tools


development:build:compile

Compile

Commands

  • query recommended compile flags for an application (from /usr/lib/pkgconfig/*.pc)
    pkg-config --cflags "gdk-2.0"
  • generate a pure assembly file with GCC
    gcc -S -c -o test.s test.c
  • generate an assembly file with C source code mixed
    gcc -c -Wa,-a,-ad test.c > test.lst
    • -Wa instructs the GCC to pass the following options to AS
    • -a is a short form of -ahls which instructs the assembler to include assembly (-al), include high-level source (-ah) and to include symbols (-as)
    • -ad omits any debugging directives from listing
  • show all pre-defined GCC preprocessor macros
    cpp -dM /dev/null
development/build/compile.txt · Last modified: 2016/12/12 17:58 by Ralf Hoppe