[Bug driver/48524] spec language does not cover switches with separated form

dirtyepic at gentoo dot org gcc-bugzilla@gcc.gnu.org
Sat Apr 9 18:51:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48524

--- Comment #2 from Ryan Hill <dirtyepic at gentoo dot org> 2011-04-09 18:51:20 UTC ---
Sorry, i just wanted a trivial example.  The actual rule we use is 

%{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}

but this is just one example of several.  The reason we use specs instead of
just changing the default is so we can easily bypass them at runtime.  This
allows us, for example, to have a single compiler for both normal and hardened
profiles.

I understand what you're saying, but it still seems like an omission to me to
not have a way to match switches with separate arguments.  Surely this isn't
the only case where this is useful?



More information about the Gcc-bugs mailing list