Avoid gcc deleting intermediate files while compiling C Code

We know our C Code goes through four stages: Preprocessing, compiling, assembling and linking
gcc creates many intermediate files for each stage. By default gcc deletes these intermediate files. You can instruct gcc to avoid deleting intermediate files passing '--save-temps' option to it.


Observe from the above screenshot, the intermediate files after

  • Preprocessing (*.i)
  • Compiling (*.s)
  • assembling (*.o)
Are placed in the same directory


Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

Connecting Serial ports of two Ubuntu VMWare Virtual Machines

Linux Commands for Hardware Info - lshw, lspci, lsdev, lscpu, lsblk, lsusb