gcc80: Add local -save-temps=objects option.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 20 Mar 2019 06:08:06 +0000 (08:08 +0200)
committerzrj <zrj@dragonflybsd.org>
Wed, 20 Mar 2019 06:49:53 +0000 (08:49 +0200)
commitdf642abc046981dfea4020a80f466a1acc7607ca
treefed91aa40aab3ae0b3a2b24186275904b740c445
parent59950cbfa915a2517df822c9a2be697295bda757
gcc80: Add local -save-temps=objects option.

The gcc currently supports -save-temps= cwd, obj, object(not documented).
None of those variants can be used at all during buildworld sequence,
even at serial buildworld, without interfering with build in funny ways.
This is very easy to notice while compiling libraries, where rules are:
 * foo.c --> foo.o  (non-pic)
 * foo.c --> foo.So (pic)
 * foo.c --> foo.po (profiled)

The added option forces to use full object name (if it was supplied)
when constructing names for .s and .i intermediates, as follows:
 cc -c foo.c -o foo.o --> foo.o.s + foo.o.i
This allows to use -save-temps globally during buildworld and it is
*less* likely to interfere while producing normally created objects.
Repeated quickworld likely *will* have side effects, because the '-o'
flags are not used for kernel and programs (foo.s will shadow foo.c).

Tested by binary comparing /usr/obj trees for differences.
contrib/gcc-8.0/README.DRAGONFLY
contrib/gcc-8.0/gcc/gcc.c