Need g++ all compilation work files in some location

How do we put gcc/g++ all compilation work files in other certain directory ?
The location and the names of auxiliary and dump outputs can be adjusted by the options -dumpbase, -dumpbase-ext, -dumpdir, -save-temps=cwd, and -save-temps=obj.
https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#Overall-Options
Topic archived. No new replies allowed.