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

Message ID 20191219000103.36667-3-cbiesinger@google.com
State New, archived
Headers

Commit Message

Terekhov, Mikhail via Gdb-patches Dec. 19, 2019, 12:01 a.m. UTC
  This breaks the compile on Solaris with enable-targets=all.

include/ChangeLog:

2019-12-18  Christian Biesinger  <cbiesinger@google.com>

	* opcode/s12z.h: Undef REG_Y.

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

Comments

Tom Tromey Dec. 19, 2019, 6:18 p.m. UTC | #1
>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:

Christian> This breaks the compile on Solaris with enable-targets=all.
Christian> include/ChangeLog:

Christian> 2019-12-18  Christian Biesinger  <cbiesinger@google.com>

Christian> 	* opcode/s12z.h: Undef REG_Y.

I think this one should go to the binutils list.

Tom
  

Patch

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,