title: how to instruct gcc/clang to output temporary files to a particular directory
body: <p>While using the --save-temps option to save the temporary files, gcc/clang outputs the temporary file in the same directory as the input files. Is there an option to instruct gcc to output the files to some other directory.</p>
  
  <p>OR </p>
  
  <p>When not using the --save-temps option the temporary files are created in a default directory (i.e. $TMPDIR such as /tmp) but they are deleted once the object file is created. Is there a way to instruct the compiler to keep those files instead of just deleting them ( i think that the only option is --save-temps, which has the problem stated above) </p>