diff mbox

add opengl_cflags to QEMU_CFLAGS

Message ID 1490018607-11838-1-git-send-email-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gerd Hoffmann March 20, 2017, 2:03 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 configure        | 2 +-
 ui/Makefile.objs | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

Comments

Peter Maydell March 20, 2017, 3:36 p.m. UTC | #1
On 20 March 2017 at 14:03, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  configure        | 2 +-
>  ui/Makefile.objs | 7 ++-----
>  2 files changed, 3 insertions(+), 6 deletions(-)

Tested-by: Peter Maydell <peter.maydell@linaro.org>

This does fix the compile issue on OpenBSD.

> diff --git a/configure b/configure
> index 99d8bec..89f29c1 100755
> --- a/configure
> +++ b/configure
> @@ -3449,6 +3449,7 @@ if test "$opengl" != "no" ; then
>      if test "$gtk" = "yes" && $pkg_config --exists "$gtkpackage >= 3.16"; then
>          gtk_gl="yes"
>      fi
> +    QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags"
>    else
>      if test "$opengl" = "yes" ; then
>        feature_not_found "opengl" "Please install opengl (mesa) devel pkgs: $opengl_pkgs"
> @@ -5503,7 +5504,6 @@ fi
>
>  if test "$opengl" = "yes" ; then
>    echo "CONFIG_OPENGL=y" >> $config_host_mak
> -  echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
>    echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
>    if test "$opengl_dmabuf" = "yes" ; then
>      echo "CONFIG_OPENGL_DMABUF=y" >> $config_host_mak
> diff --git a/ui/Makefile.objs b/ui/Makefile.objs
> index dc936f1..27566b3 100644
> --- a/ui/Makefile.objs
> +++ b/ui/Makefile.objs
> @@ -41,11 +41,8 @@ endif
>  endif
>
>  gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
> -gtk-egl.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) $(OPENGL_CFLAGS)
> -gtk-gl-area.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) $(OPENGL_CFLAGS)
> -shader.o-cflags += $(OPENGL_CFLAGS)
> -console-gl.o-cflags += $(OPENGL_CFLAGS)
> -egl-helpers.o-cflags += $(OPENGL_CFLAGS)
> +gtk-egl.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
> +gtk-gl-area.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
>
>  gtk-egl.o-libs += $(OPENGL_LIBS)
>  shader.o-libs += $(OPENGL_LIBS)

This isn't the only makefile that adds OPENGL_CFLAGS to things.
Shouldn't we also remove the reference in hw/display/Makefile.objs ?

thanks
-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index 99d8bec..89f29c1 100755
--- a/configure
+++ b/configure
@@ -3449,6 +3449,7 @@  if test "$opengl" != "no" ; then
     if test "$gtk" = "yes" && $pkg_config --exists "$gtkpackage >= 3.16"; then
         gtk_gl="yes"
     fi
+    QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags"
   else
     if test "$opengl" = "yes" ; then
       feature_not_found "opengl" "Please install opengl (mesa) devel pkgs: $opengl_pkgs"
@@ -5503,7 +5504,6 @@  fi
 
 if test "$opengl" = "yes" ; then
   echo "CONFIG_OPENGL=y" >> $config_host_mak
-  echo "OPENGL_CFLAGS=$opengl_cflags" >> $config_host_mak
   echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
   if test "$opengl_dmabuf" = "yes" ; then
     echo "CONFIG_OPENGL_DMABUF=y" >> $config_host_mak
diff --git a/ui/Makefile.objs b/ui/Makefile.objs
index dc936f1..27566b3 100644
--- a/ui/Makefile.objs
+++ b/ui/Makefile.objs
@@ -41,11 +41,8 @@  endif
 endif
 
 gtk.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
-gtk-egl.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) $(OPENGL_CFLAGS)
-gtk-gl-area.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS) $(OPENGL_CFLAGS)
-shader.o-cflags += $(OPENGL_CFLAGS)
-console-gl.o-cflags += $(OPENGL_CFLAGS)
-egl-helpers.o-cflags += $(OPENGL_CFLAGS)
+gtk-egl.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
+gtk-gl-area.o-cflags := $(GTK_CFLAGS) $(VTE_CFLAGS)
 
 gtk-egl.o-libs += $(OPENGL_LIBS)
 shader.o-libs += $(OPENGL_LIBS)