Trivial ppc64 patch

Message ID b9889d18-2d19-d8a6-301f-c0b5b43e4ea8@gmail.com
State New
Headers show
Series
  • Trivial ppc64 patch
Related show

Commit Message

Nick Clifton via Binutils April 30, 2021, 4:06 p.m.
My jenkins builds for ppc64le have been failing for a little while due 
to the C99-ism in ppc-dis.c.   This trivial patch ought to fix the 
binutils issue and at least get things further along.


Neither I nor Tachyum have an assignment in place (yet), but this should 
be trivial enough to not need one.  OK for the trunk?


Jeff

Comments

Nick Clifton via Binutils April 30, 2021, 6:07 p.m. | #1
On 4/30/21 11:06 AM, Jeff Law via Binutils wrote:
> 

> My jenkins builds for ppc64le have been failing for a little while due to the C99-ism in ppc-dis.c.

> This trivial patch ought to fix the binutils issue and at least get things further along.

> 

> Neither I nor Tachyum have an assignment in place (yet), but this should be trivial enough to not need one.  OK for the trunk?


Heh, Jan and Simon have reported this already.  The code should work, given our
move to require C99.  Options have been discussed in:

    https://sourceware.org/pipermail/binutils/2021-April/116325.html

Basically, AC_PROG_CC_C99 is deprecated in newer Autoconf, so the discussion
is talking about maybe upgrading to Autoconf 2.71.


That said, given 3 different people have now run into this and any conversion
to Autoconf 2.71 might be a while, please go ahead and commit the trivial
fix to unblock everyone.  Thanks.


Peter
Nick Clifton via Binutils May 7, 2021, 12:34 p.m. | #2
Hi Guys,

   Just FYI - the patch to replace AC_PROG_CC with AC_PROG_CC_C99 has now
   been applied to both the gcc and binutils-gdb mainline branches.

Cheers
   Nick

Patch

diff --git a/opcodes/ppc-dis.c b/opcodes/ppc-dis.c
index 739195a9910..9f3d229683e 100644
--- a/opcodes/ppc-dis.c
+++ b/opcodes/ppc-dis.c
@@ -1068,7 +1068,8 @@  print_insn_powerpc (bfd_vma memaddr,
 	      && ((insn & ((-1ULL << 50) | (0x3fULL << 26)))
 		  == ((1ULL << 58) | (1ULL << 52) | (57ULL << 26)) /* pld */))
 	    {
-	      for (int i = 0; i < 2; i++)
+	      int i;
+	      for (i = 0; i < 2; i++)
 		if (print_got_plt (private_data (info)->special + i, d34, info))
 		  break;
 	    }