[Pixman] [PATCH] MIPS: Use .if instead of #ifdef definition of LEAF_MIPS32R2

James Cowgill james410 at cowgill.org.uk
Tue May 5 08:29:19 PDT 2015


On Tue, 2015-05-05 at 18:04 +0300, Siarhei Siamashka wrote:
> Thanks. But this is not quite correct. For example, try the
> following example with the GNU assembler:
> 
>     $ cat test.S
>     .if __FOOBAR__
>        .foobar_specific_directive
>     .endif
> 
>     $ gcc test.S
>     test.S: Assembler messages:
>     test.S:1: Error: non-constant expression in ".if" statement
> 
> As such, the ".if __ELF__" code will fail to compile on non-ELF systems.

Thanks! I completely missed that.

> I would suggest to simply remove this ".if __ELF__" / "#ifdef __ELF__"
> check altogether. There is probably no notable MIPS system using a
> non-ELF object file format nowadays. And even if such a MIPS system
> exists, its users will just get a more meaningful error message about
> the unsupported ELF-specific ".hidden" directive, which would look
> similar to:
> 
>     test.S:1: Error: unknown pseudo-op: `.foobar_specific_directive'

OK that seems reasonable. I'll remove it.

James

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/pixman/attachments/20150505/53f4cfeb/attachment.sig>


More information about the Pixman mailing list