Message ID | 20180308083231.20180-1-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
On 8 March 2018 at 08:32, Gerd Hoffmann <kraxel@redhat.com> wrote: > The following changes since commit f32408f3b472a088467474ab152be3b6285b2d7b: > > misc: don't use hwaddr as a type in trace events (2018-03-06 14:24:30 +0000) > > are available in the git repository at: > > git://git.kraxel.org/qemu tags/ui-20180308-pull-request > > for you to fetch changes up to 5c71cfd94d46a9c2e09d041dcc82b297efab2b57: > > ui/gtk-egl: add cursor_dmabuf support (2018-03-08 08:59:01 +0100) > > ---------------------------------------------------------------- > gtk: add dmabuf support. cleanups, i18n fix. > sdl: workaround sdl 2.0.8 header bug, > > ---------------------------------------------------------------- > > Bruce Rogers (1): > make: switch language file build to be gtk module aware > > Gerd Hoffmann (7): > sdl: workaround bug in sdl 2.0.8 headers > ui/gtk: make GtkGlArea usage a runtime option > ui/gtk: group gtk.mo declarations in Makefile > ui/opengl: Makefile cleanup > ui/gtk: use GtkGlArea on wayland only > ui/gtk-egl: add scanout_dmabuf support > ui/gtk-egl: add cursor_dmabuf support > Hi. This gives me a new warning on FreeBSD: CC ui/gtk.o /root/qemu/ui/gtk.c:2141:13: warning: 'gtk_widget_set_double_buffered' is deprecated [-Wdeprecated-declarations] gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE); ^ /usr/local/include/gtk-3.0/gtk/gtkwidget.h:876:23: note: 'gtk_widget_set_double_buffered' has been explicitly marked deprecated here void gtk_widget_set_double_buffered (GtkWidget *widget, ^ 1 warning generated. thanks -- PMM
Hi, > Hi. This gives me a new warning on FreeBSD: > > CC ui/gtk.o > /root/qemu/ui/gtk.c:2141:13: warning: 'gtk_widget_set_double_buffered' > is deprecated [-Wdeprecated-declarations] > gtk_widget_set_double_buffered(vc->gfx.drawing_area, FALSE); > ^ > /usr/local/include/gtk-3.0/gtk/gtkwidget.h:876:23: note: > 'gtk_widget_set_double_buffered' has been explicitly marked deprecated > here > void gtk_widget_set_double_buffered (GtkWidget *widget, Known issue. The gtk-egl.c code needs this even though it is deprecated. We have a diagnostic pragma in place for gcc, seems that doesn't work on freebsd because it builds with clang not gcc. Hmm, quick googling shows clang seems to support this too. https://clang.llvm.org/docs/UsersManual.html#pragma-gcc-diagnostic /me looks puzzled. Test for CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE not working properly on freebsd? Seems clang doesn't support a pragma used in qemu, config.log says: error: unknown warning group '-Wunused-but-set-variable'. Maybe I should move the code to a separate source file so it can be built with different compiler flags, without needing #pragma? I don't feel like building all gtk code with -Wno-deprecated-declarations ... cheers, Gerd
Hi, > Maybe I should move the code to a separate source file so it can be > built with different compiler flags, without needing #pragma? I don't > feel like building all gtk code with -Wno-deprecated-declarations ... Hmm, that idea doesn't fly, seems per-object cflags don't work for object files which get linked into a module. Other ideas anyone? cheers, Gerd
On 09.03.2018 08:50, Gerd Hoffmann wrote: > Hi, > >> Maybe I should move the code to a separate source file so it can be >> built with different compiler flags, without needing #pragma? I don't >> feel like building all gtk code with -Wno-deprecated-declarations ... > > Hmm, that idea doesn't fly, seems per-object cflags don't work for > object files which get linked into a module. > > Other ideas anyone? Maybe simply remove the '#pragma GCC diagnostic ignored "-Wunused-but-set-variable"' from the configure test and change util/coroutine-ucontext.c: diff a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -170,7 +170,7 @@ Coroutine *qemu_coroutine_new(void) } #ifdef CONFIG_VALGRIND_H -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +#if defined(CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE) && !defined(__clang__) /* Work around an unused variable in the valgrind.h macro... */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-but-set-variable" @@ -179,7 +179,7 @@ static inline void valgrind_stack_deregister(CoroutineUContext *co) { VALGRIND_STACK_DEREGISTER(co->valgrind_stack_id); } -#ifdef CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE +#if defined(CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE) && !defined(__clang__) #pragma GCC diagnostic pop #endif #endif ? Thomas
On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > On 09.03.2018 08:50, Gerd Hoffmann wrote: > > Hi, > > > >> Maybe I should move the code to a separate source file so it can be > >> built with different compiler flags, without needing #pragma? I don't > >> feel like building all gtk code with -Wno-deprecated-declarations ... > > > > Hmm, that idea doesn't fly, seems per-object cflags don't work for > > object files which get linked into a module. > > > > Other ideas anyone? > > Maybe simply remove the '#pragma GCC diagnostic ignored > "-Wunused-but-set-variable"' from the configure test and change > util/coroutine-ucontext.c: I'll try. Will probably have the effect that freebsd builds with -Werror then (which is now turned off by configure due to missing pragma support), which might trigger more issues ... cheers, Gerd
On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: > On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > > On 09.03.2018 08:50, Gerd Hoffmann wrote: > > > Hi, > > > > > >> Maybe I should move the code to a separate source file so it can be > > >> built with different compiler flags, without needing #pragma? I don't > > >> feel like building all gtk code with -Wno-deprecated-declarations ... > > > > > > Hmm, that idea doesn't fly, seems per-object cflags don't work for > > > object files which get linked into a module. > > > > > > Other ideas anyone? > > > > Maybe simply remove the '#pragma GCC diagnostic ignored > > "-Wunused-but-set-variable"' from the configure test and change > > util/coroutine-ucontext.c: > > I'll try. Will probably have the effect that freebsd builds with > -Werror then (which is now turned off by configure due to missing > pragma support), which might trigger more issues ... Well, guessed almost right. -Werror is enabled on linux only, so freebsd builds do not fail. But clang builds on linux fail, due to a bunch of warnings (now errors) about unaligned access to struct members. cheers, Gerd
On 09.03.2018 10:44, Gerd Hoffmann wrote: > On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: >> On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: >>> On 09.03.2018 08:50, Gerd Hoffmann wrote: >>>> Hi, >>>> >>>>> Maybe I should move the code to a separate source file so it can be >>>>> built with different compiler flags, without needing #pragma? I don't >>>>> feel like building all gtk code with -Wno-deprecated-declarations ... >>>> >>>> Hmm, that idea doesn't fly, seems per-object cflags don't work for >>>> object files which get linked into a module. >>>> >>>> Other ideas anyone? >>> >>> Maybe simply remove the '#pragma GCC diagnostic ignored >>> "-Wunused-but-set-variable"' from the configure test and change >>> util/coroutine-ucontext.c: >> >> I'll try. Will probably have the effect that freebsd builds with >> -Werror then (which is now turned off by configure due to missing >> pragma support), which might trigger more issues ... > > Well, guessed almost right. -Werror is enabled on linux only, so > freebsd builds do not fail. But clang builds on linux fail, due to a > bunch of warnings (now errors) about unaligned access to struct members. Ugh, this is getting messy ... could you maybe turn them back into warnings again with -Wno-error=... when compiling with clang? Thomas
On Fri, Mar 09, 2018 at 10:48:13AM +0100, Thomas Huth wrote: > On 09.03.2018 10:44, Gerd Hoffmann wrote: > > On Fri, Mar 09, 2018 at 10:15:33AM +0100, Gerd Hoffmann wrote: > >> On Fri, Mar 09, 2018 at 09:46:44AM +0100, Thomas Huth wrote: > >>> On 09.03.2018 08:50, Gerd Hoffmann wrote: > >>>> Hi, > >>>> > >>>>> Maybe I should move the code to a separate source file so it can be > >>>>> built with different compiler flags, without needing #pragma? I don't > >>>>> feel like building all gtk code with -Wno-deprecated-declarations ... > >>>> > >>>> Hmm, that idea doesn't fly, seems per-object cflags don't work for > >>>> object files which get linked into a module. > >>>> > >>>> Other ideas anyone? > >>> > >>> Maybe simply remove the '#pragma GCC diagnostic ignored > >>> "-Wunused-but-set-variable"' from the configure test and change > >>> util/coroutine-ucontext.c: > >> > >> I'll try. Will probably have the effect that freebsd builds with > >> -Werror then (which is now turned off by configure due to missing > >> pragma support), which might trigger more issues ... > > > > Well, guessed almost right. -Werror is enabled on linux only, so > > freebsd builds do not fail. But clang builds on linux fail, due to a > > bunch of warnings (now errors) about unaligned access to struct members. > > Ugh, this is getting messy ... could you maybe turn them back into > warnings again with -Wno-error=... when compiling with clang? Well, I can add -Wno-address-of-packed-member to the list of flags configure tries to use with the compiler. That gets me past that warning, but the build will stop on the next then. qemu simply doesn't build warning-clean with clang ... cheers, Gerd
On 9 March 2018 at 10:41, Gerd Hoffmann <kraxel@redhat.com> wrote: > Well, I can add -Wno-address-of-packed-member to the list of flags > configure tries to use with the compiler. That gets me past that > warning, but the build will stop on the next then. qemu simply doesn't > build warning-clean with clang ... That depends on your clang version. I have 3.8.0 in my test set builds with -Werror enabled. At some point we should go through and fix the issues that newer clang versions warn about. thanks -- PMM