PowerPC Disassembler Fails to Compile on CentOS 7
Joel Sherrill
joel@rtems.org
Thu May 6 13:34:13 GMT 2021
Hi
binutils hash ed29efb which should be near the head appears to be assuming
that a newer GCC is being used which defaults to something else. The host
GCC reports:
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
And the compilation fails with this:
libtool: compile: gcc -O2 -g -pipe
-I/home/joel/rtems-cron-7/rtems-source-builder/rtems/build/tmp/sb-1001/7/rtems-powerpc/home/joel/rtems-cron-7/tools/7/include
-DHAVE_CONFIG_H -I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes
-I. -I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes -I../bfd
-I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../include
-I../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/../bfd -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT ppc-opc.lo -MD
-MP -MF .deps/ppc-opc.Tpo -c
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-opc.c -o ppc-opc.o
mv -f .deps/disassemble.Tpo .deps/disassemble.Plo
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c: In function
'print_insn_powerpc':
mv -f .deps/dis-buf.Tpo .deps/dis-buf.Plo
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c:1071:8:
error: 'for' loop initial declarations are only allowed in C99 mode
for (int i = 0; i < 2; i++)
^
../../sourceware-mirror-binutils-gdb-ed29efb/opcodes/ppc-dis.c:1071:8:
note: use option -std=c99 or -std=gnu99 to compile your code
Should the code not declare i in the for loop of the compiler arguments add
C99?
--joel
More information about the Binutils
mailing list