Re: [PATCH] x86: fix CFI macro invocations to deal with shortcomings in gas

H. Peter Anvin
2010-10-19T21:15:40Z

On 10/19/2010 06:52 AM, Jan Beulich wrote:
> gas prior to (perhaps) 2.16.90 has problems with passing non-
> parenthesized expressions containing spaces to macros. Spaces, however,
> get inserted by cpp between any macro expanding to a number and a
> subsequent + or -. For the +, current x86 gas then removes the space
> again (future gas may not do so), but for the - the space gets retained
> and is then considered a separator between macro arguments.
>
> Fix the respective definitions for both the - and + cases, so that they
> neither contain spaces nor make cpp insert any (the latter by adding
> seemingly redundant parentheses).
>
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
> Cc: Alexander van Heukelum <heukelum@fastmail.fm>
>

It's ugly -- very ugly -- and will almost certainly bitrot and break
again, but it's a lot less ugly than any other alternative I can think
of. Unfortunately these versions of gas are not old enough that we can
just kill them off, I don't think.

-hpa