[PATCH] Undef REG_Y in s12z.h, it may be defined in a system header

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Undef REG_Y in s12z.h, it may be defined in a system header

Sourceware - binutils list mailing list
This breaks the compile on Solaris with enable-targets=all.

include/ChangeLog:

2019-12-18  Christian Biesinger  <[hidden email]>

        * opcode/s12z.h: Undef REG_Y.

Change-Id: I028b2663affce50d6ca37ccdc301bde8de80d45c
---
 include/opcode/s12z.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/opcode/s12z.h b/include/opcode/s12z.h
index 7e38ac5e1c..717b4a9cbb 100644
--- a/include/opcode/s12z.h
+++ b/include/opcode/s12z.h
@@ -20,6 +20,10 @@ struct reg
 
 extern const struct reg registers[S12Z_N_REGISTERS];
 
+/* Solaris defines REG_Y in sys/regset.h; undef it here to avoid
+   breaking compilation when this target is enabled.  */
+#undef REG_Y
+
 enum {
     REG_D2 = 0,
     REG_D3,
--
2.24.1.735.g03f4e72817-goog

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Undef REG_Y in s12z.h, it may be defined in a system header

Nick Clifton
Hi Christian,

> 2019-12-18  Christian Biesinger  <[hidden email]>
>
> * opcode/s12z.h: Undef REG_Y.

Approved and applied.

Cheers
  Nick

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Undef REG_Y in s12z.h, it may be defined in a system header

Sourceware - binutils list mailing list
On Thu, Jan 2, 2020 at 7:06 AM Nick Clifton <[hidden email]> wrote:
>
> Hi Christian,
>
> > 2019-12-18  Christian Biesinger  <[hidden email]>
> >
> >       * opcode/s12z.h: Undef REG_Y.
>
> Approved and applied.

Thank you!
Christian