Re: [PATCH v2 6/7] sim/ppc: Add ATTRIBUTE_PRINTF

Jan-Benedict Glaw
2022-10-12T10:37:20Z

[-- Attachment #1: Type: text/plain, Size: 3087 bytes --]

On Wed, 2022-10-12 10:39:25 +0100, Andrew Burgess <aburgess@redhat.com> wrote:
> Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
> > Building with a recent GCC, I get this:
> >
> > $ .../configure --prefix=/tmp/gdb-ppc-elf --target=ppc-elf
> > $ make V=1 all-gdb
> > [...]
> > /usr/lib/gcc-snapshot/bin/gcc -c -g -O2 -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5 -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import -DHAVE_COMMON_FPU -I../common -I./../common emul_generic.c
> > /usr/lib/gcc-snapshot/bin/gcc -c -g -O2 -Werror -DDEFAULT_INLINE=0 -DWITH_SMP=5 -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -Wall -Wdeclaration-after-statement -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wno-error=maybe-uninitialized -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wmissing-parameter-type -Wpointer-sign -Wold-style-declaration -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb -I./../../gdb/config -I../.. -I./../../gnulib/import -I../../gnulib/import -DHAVE_COMMON_FPU -I../common -I./../common emul_bugapi.c
> > emul_bugapi.c: In function 'emul_bugapi_instruction_call':
> > emul_bugapi.c:495:11: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'spreg' {aka 'unsigned int'} [-Werror=format=]
> > 495 | error("emul-bugapi: unimplemented bugapi %s from address 0x%lx\n",
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[3]: *** [Makefile:144: emul_bugapi.o] Error 1
> > make[3]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim/ppc'
> > make[2]: *** [Makefile:1933: all-recursive] Error 1
> > make[2]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> > make[1]: *** [Makefile:1185: all] Error 2
> > make[1]: Leaving directory '/var/lib/laminar/run/gdb-ppc-elf/6/binutils-gdb/sim'
> > make: *** [Makefile:11309: all-sim] Error 2
>
> Sorry for the breakage.

Nothing to worry about --- that's exactly why I do these mass CI
tests. Catch stuff early!

> I've pushed the patch below, which I think should resolve the issue you
> are seeing, as well as some other, similar issues in the ppc sim.
>
> Let me know if you are still seeing build problems with the latest
> master.

Just queued another build, will take about an hour. (Not too fast
hardware and many jobs running...)

MfG, JBG

--

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]