Raeburn@MIT.EDU (Ken Raeburn) (10/21/89)
The following change lets you provide a spec in xm-foo.h analogous to the CC1_SPEC, but specific to invocation of cc1plus. For example, #define CC1PLUS_SPEC "-fdefault-inline -felide-constructors -fmemoize-lookups -fsave-memoized" I left CC1_SPEC in, since in terms of arguments accepted cc1plus seems to be a superset of cc1, and most of the arguments to cc1 would make sense to cc1plus also. (Those that might not, like `-pedantic', are still accepted anyways.) If for some reason an option in CC1_SPEC is not wanted for cc1plus, CC1PLUS_SPEC can override it (in most cases) with a `no-' option. The original source file is the gcc.c distributed with g++ 10/17. RCS file: gcc.c,v retrieving revision 1.1 diff -c2 -r1.1 gcc.c *** /tmp/,RCSt1028452 Fri Oct 20 19:37:33 1989 --- gcc.c Fri Oct 20 19:29:32 1989 *************** *** 84,87 **** --- 84,88 ---- %C process CPP_SPEC as a spec. A capital C is actually used here. %1 process CC1_SPEC as a spec. + %+ process CC1PLUS_SPEC as a spec. %{S} substitutes the -S switch, if that switch was given to CC. If that switch was not specified, this substitutes nothing. *************** *** 171,175 **** #endif ! /* config.h can define CC1_SPEC to provide extra args to cc1 or extra switch-translations. */ #ifndef CC1_SPEC --- 172,176 ---- #endif ! /* config.h can define CC1_SPEC to provide extra args to cc1 and cc1plus or extra switch-translations. */ #ifndef CC1_SPEC *************** *** 177,180 **** --- 178,187 ---- #endif + /* config.h can define CC1PLUS_SPEC to provide extra args to cc1plus + or extra switch-translations. */ + #ifndef CC1PLUS_SPEC + #define CC1PLUS_SPEC "" + #endif + /* config.h can define LINK_SPEC to provide extra args to the linker or extra switch-translations. */ *************** *** 231,235 **** %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ ! %{!M*:%{!E:cc1plus %{!pipe:%g.cpp} %1\ %{!Q:-quiet} -dumpbase %i %{Y*} %{d*} %{m*} %{f*} %{+e*} %{a}\ %{g} %{g0} %{O} %{W*} %{w} %{pedantic} %{traditional}\ --- 238,242 ---- %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ ! %{!M*:%{!E:cc1plus %{!pipe:%g.cpp} %1 %+\ %{!Q:-quiet} -dumpbase %i %{Y*} %{d*} %{m*} %{f*} %{+e*} %{a}\ %{g} %{g0} %{O} %{W*} %{w} %{pedantic} %{traditional}\ *************** *** 1294,1297 **** --- 1301,1308 ---- case '1': do_spec_1 (CC1_SPEC, 0); + break; + + case '+': + do_spec_1 (CC1PLUS_SPEC, 0); break;