GNU project C and C++ compiler
-save-temps
-save-temps=cwd
    Store the usual "temporary" intermediate files permanently; place them in the current directory and
    name them based on the source file.  Thus, compiling foo.c with -c -save-temps would produce files
    foo.i and foo.s, as well as foo.o.  This creates a preprocessed foo.i output file even though the
    compiler now normally uses an integrated preprocessor.

    When used in combination with the -x command line option, -save-temps is sensible enough to avoid
    over writing an input source file with the same extension as an intermediate file.  The corresponding
    intermediate file may be obtained by renaming the source file before using -save-temps.

    If you invoke GCC in parallel, compiling several different source files that share a common base name
    in different subdirectories or the same source file compiled for multiple output destinations, it is
    likely that the different parallel compilers will interfere with each other, and overwrite the
    temporary files.  For instance:

            gcc -save-temps -o outdir1/foo.o indir1/foo.c&
            gcc -save-temps -o outdir2/foo.o indir2/foo.c&

    may result in foo.i and foo.o being written to simultaneously by both compilers.
-o file
    Place output in file file.  This applies regardless to whatever sort of output is being produced,
    whether it be an executable file, an object file, an assembler file or preprocessed C code.

    If -o is not specified, the default is to put an executable file in a.out, the object file for
    source.suffix in source.o, its assembler file in source.s, a precompiled header file in
    source.suffix.gch, and all preprocessed C source on standard output.
source manpages: gcc