All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Compilation error for qemu-system-ppc on Fedora 28
@ 2018-05-06 10:56 Howard Spoelstra
  2018-05-07 17:51 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Howard Spoelstra @ 2018-05-06 10:56 UTC (permalink / raw)
  To: qemu-ppc, QEMU Developers

Hi all,

I get these errors compiling qemu-system-ppc on Fedora 28, gcc 8.0.1:

/home/hsp/src/qemu-master/hw/ppc/e500.c: In function ‘ppce500_load_device_tree’:
/home/hsp/src/qemu-master/hw/ppc/e500.c:442:37: error: ‘/pic@’
directive output may be truncated writing 5 bytes into a region of
size between 1 and 128 [-Werror=format-truncation=]
     snprintf(mpic, sizeof(mpic), "%s/pic@%llx", soc, MPC8544_MPIC_REGS_OFFSET);
                                     ^~~~~
In file included from /usr/include/stdio.h:862,
                 from /home/hsp/src/qemu-master/include/qemu/osdep.h:68,
                 from /home/hsp/src/qemu-master/hw/ppc/e500.c:17:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’
output between 11 and 138 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hsp/src/qemu-master/hw/ppc/e500.c:470:39: error:
‘/global-utilities@’ directive output may be truncated writing 18
bytes into a region of size between 1 and 128
[-Werror=format-truncation=]
     snprintf(gutil, sizeof(gutil), "%s/global-utilities@%llx", soc,
                                       ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from /home/hsp/src/qemu-master/include/qemu/osdep.h:68,
                 from /home/hsp/src/qemu-master/hw/ppc/e500.c:17:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’
output between 24 and 151 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/hsp/src/qemu-master/hw/ppc/e500.c:477:36: error: ‘/msi@’
directive output may be truncated writing 5 bytes into a region of
size between 0 and 127 [-Werror=format-truncation=]
     snprintf(msi, sizeof(msi), "/%s/msi@%llx", soc, MPC8544_MSI_REGS_OFFSET);
                                    ^~~~~
In file included from /usr/include/stdio.h:862,
                 from /home/hsp/src/qemu-master/include/qemu/osdep.h:68,
                 from /home/hsp/src/qemu-master/hw/ppc/e500.c:17:
/usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’
output between 12 and 139 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/home/hsp/src/qemu-master/rules.mak:66: hw/ppc/e500.o] Error 1
make: *** [Makefile:478: subdir-ppc-softmmu] Error 2

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-gcc-major-version-only
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--with-isl --enable-libmpx --enable-offload-targets=nvptx-none
--without-cuda-driver --enable-gnu-indirect-function
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.0.1 20180324 (Red Hat 8.0.1-0.20) (GCC)

Best, Howard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Compilation error for qemu-system-ppc on Fedora 28
  2018-05-06 10:56 [Qemu-devel] Compilation error for qemu-system-ppc on Fedora 28 Howard Spoelstra
@ 2018-05-07 17:51 ` Eric Blake
  2018-05-07 20:25   ` Howard Spoelstra
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2018-05-07 17:51 UTC (permalink / raw)
  To: Howard Spoelstra, qemu-ppc, QEMU Developers, Greg Kurz

On 05/06/2018 05:56 AM, Howard Spoelstra wrote:
> Hi all,
> 
> I get these errors compiling qemu-system-ppc on Fedora 28, gcc 8.0.1:
> 
> /home/hsp/src/qemu-master/hw/ppc/e500.c: In function ‘ppce500_load_device_tree’:
> /home/hsp/src/qemu-master/hw/ppc/e500.c:442:37: error: ‘/pic@’
> directive output may be truncated writing 5 bytes into a region of
> size between 1 and 128 [-Werror=format-truncation=]
>       snprintf(mpic, sizeof(mpic), "%s/pic@%llx", soc, MPC8544_MPIC_REGS_OFFSET);
>                                       ^~~~~

Looks like this fixes it:
https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01359.html

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Compilation error for qemu-system-ppc on Fedora 28
  2018-05-07 17:51 ` Eric Blake
@ 2018-05-07 20:25   ` Howard Spoelstra
  0 siblings, 0 replies; 3+ messages in thread
From: Howard Spoelstra @ 2018-05-07 20:25 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-ppc, QEMU Developers, Greg Kurz

On Mon, May 7, 2018 at 7:51 PM, Eric Blake <eblake@redhat.com> wrote:
> On 05/06/2018 05:56 AM, Howard Spoelstra wrote:
>>
>> Hi all,
>>
>> I get these errors compiling qemu-system-ppc on Fedora 28, gcc 8.0.1:
>>
>> /home/hsp/src/qemu-master/hw/ppc/e500.c: In function
>> ‘ppce500_load_device_tree’:
>> /home/hsp/src/qemu-master/hw/ppc/e500.c:442:37: error: ‘/pic@’
>> directive output may be truncated writing 5 bytes into a region of
>> size between 1 and 128 [-Werror=format-truncation=]
>>       snprintf(mpic, sizeof(mpic), "%s/pic@%llx", soc,
>> MPC8544_MPIC_REGS_OFFSET);
>>                                       ^~~~~
>
>
> Looks like this fixes it:
> https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01359.html
>

Yes it does. I already did let Greg know, but forget to reply to all. Thanks.

Best, Howard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-07 20:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-06 10:56 [Qemu-devel] Compilation error for qemu-system-ppc on Fedora 28 Howard Spoelstra
2018-05-07 17:51 ` Eric Blake
2018-05-07 20:25   ` Howard Spoelstra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.