> From the documentation
> (https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html):
>
> %{S*}
>
> Substitutes all the switches specified to GCC whose names start
> with -S, but which also take an argument. This is used for switches like
> -o, -D, -I, etc. GCC considers -o foo as being one switch whose name
> starts with ‘o’. %{o*} substitutes this text, including the space. Thus
> two arguments are generated.
The ultimate spec(!) is to be found in gcc.cc though, which says:
%{S*} substitutes all the switches specified to GCC whose names start
with -S. This is used for -o, -I, etc; switches that take
arguments. GCC considers `-o foo' as being one switch whose
name starts with `o'. %{o*} would substitute this text,
including the space; thus, two arguments would be generated
%{S*&T*} likewise, but preserve order of S and T options (the order
of S and T in the spec is not significant). Can be any number
of ampersand-separated variables; for each the wild card is
optional. Useful for CPP as %{D*&U*&A*}.
> It looks like this is working as documented. I checked this with the
> following spec file:
But you wouldn't have a problem if it was, would you? What happens if the '+'
is changed to another character in the line passed to the driver.
--
Eric Botcazou