Writing spec rules for preprocessor definitions in 4.6

Ryan Hill dirtyepic@gentoo.org
Thu Apr 7 23:15:00 GMT 2011


On Mon, 4 Apr 2011 18:09:21 -0600
Ryan Hill <dirtyepic@gentoo.org> wrote:

> Before 4.6, you could write a spec rule for a preprocessor definition using
> its joined non-canonical form.  Eg.
> 
> %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}
> 
> Several distros used this rule to enable -D_FORTIFY_SOURCE=2 by default.
> 
> After 4.6, preprocessor definitions are passed in their separated, canonical,
> form (see PR #47236) and the rule above stops working.  After a couple hours
> of experimenting, I can't find any way to write a rule that works with the
> new form.  Shouldn't the joined form still be usable, even if the new default
> is separate?  Am I missing something obvious?  I know you can use whitespace
> and * in a spec, but apparently not in the middle of a switch name.

Could anyone tell me if it would be considered a bug that we can't write spec
rules matching options having both separate and joined forms any more?


-- 
fonts, gcc-porting,                  it makes no sense how it makes no sense
toolchain, wxwidgets                           but i'll take it free anytime
@ gentoo.org                EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20110407/a5c649fb/attachment.sig>


More information about the Gcc-help mailing list