public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyich@gmail.com>
To: binutils@sourceware.org
Cc: gdb-patches@sourceware.org, Sergei Trofimovich <siarheit@google.com>
Subject: [PATCH] microblaze: fix fsqrt collicion to build on glibc-2.35
Date: Sat, 12 Feb 2022 13:43:19 +0000	[thread overview]
Message-ID: <20220212134319.1754457-1-slyich@gmail.com> (raw)

From: Sergei Trofimovich <siarheit@google.com>

'fsqrt' is is now a part of C2X and is present in glibc-2.35.
Notced as a gdb build failure:

    opcodes/microblaze-opcm.h:45:9: error: 'fsqrt' redeclared as different kind of symbol
       45 |   fint, fsqrt,
    glibc-2.35-dev/include/bits/mathcalls-narrow.h:36:20:
    note: previous declaration of 'fsqrt' with type 'float(double)'

opcodes/

	* microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'.
	* microblaze-opc.h: Follow 'fsqrt' rename.
---
 opcodes/microblaze-opc.h  | 2 +-
 opcodes/microblaze-opcm.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h
index 81bf2e19548..ffb0f08c692 100644
--- a/opcodes/microblaze-opc.h
+++ b/opcodes/microblaze-opc.h
@@ -268,7 +268,7 @@ const struct op_code_struct
   {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst },
   {"flt",   INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt,   arithmetic_inst },
   {"fint",  INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint,  arithmetic_inst },
-  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },
+  {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },
   {"tget",   INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget,   anyware_inst },
   {"tcget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget,  anyware_inst },
   {"tnget",  INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget,  anyware_inst },
diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h
index 1b0955c4e0f..be681eb5d29 100644
--- a/opcodes/microblaze-opcm.h
+++ b/opcodes/microblaze-opcm.h
@@ -42,7 +42,8 @@ enum microblaze_instr
   shr, sw, swr, swx, lbui, lhui, lwi,
   sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv,
   fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt,
-  fint, fsqrt,
+  /* 'fsqrt' is a glibc:math.h symbol */
+  fint, microblaze_fsqrt,
   tget, tcget, tnget, tncget, tput, tcput, tnput, tncput,
   eget, ecget, neget, necget, eput, ecput, neput, necput,
   teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput,
-- 
2.35.1


             reply	other threads:[~2022-02-12 13:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 13:43 Sergei Trofimovich [this message]
2022-02-14 17:13 ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220212134319.1754457-1-slyich@gmail.com \
    --to=slyich@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=siarheit@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).