* [Qemu-devel] [PULL 1/5] sdl: Refresh debug statements
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
@ 2015-03-03 9:58 ` Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface Gerd Hoffmann
` (4 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-03 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Put them under a #define similar to the VGA model and make them
actually compile. Add a couple too.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/sdl.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/ui/sdl.c b/ui/sdl.c
index 138ca73..b89182a 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -61,16 +61,24 @@ static SDL_PixelFormat host_format;
static int scaling_active = 0;
static Notifier mouse_mode_notifier;
+#if 0
+#define DEBUG_SDL
+#endif
+
static void sdl_update(DisplayChangeListener *dcl,
int x, int y, int w, int h)
{
- // printf("updating x=%d y=%d w=%d h=%d\n", x, y, w, h);
SDL_Rect rec;
rec.x = x;
rec.y = y;
rec.w = w;
rec.h = h;
+#ifdef DEBUG_SDL
+ printf("SDL: Updating x=%d y=%d w=%d h=%d (scaling: %d)\n",
+ x, y, w, h, scaling_active);
+#endif
+
if (guest_screen) {
if (!scaling_active) {
SDL_BlitSurface(guest_screen, &rec, real_screen, &rec);
@@ -89,7 +97,9 @@ static void do_sdl_resize(int width, int height, int bpp)
int flags;
SDL_Surface *tmp_screen;
- // printf("resizing to %d %d\n", w, h);
+#ifdef DEBUG_SDL
+ printf("SDL: Resizing to %dx%d bpp %d\n", width, height, bpp);
+#endif
flags = SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_HWACCEL;
if (gui_fullscreen) {
@@ -143,6 +153,12 @@ static void sdl_switch(DisplayChangeListener *dcl,
if (guest_screen != NULL) {
SDL_FreeSurface(guest_screen);
}
+
+#ifdef DEBUG_SDL
+ printf("SDL: Creating surface with masks: %08x %08x %08x %08x\n",
+ pf.rmask, pf.gmask, pf.bmask, pf.amask);
+#endif
+
guest_screen = SDL_CreateRGBSurfaceFrom
(surface_data(surface),
surface_width(surface), surface_height(surface),
@@ -486,6 +502,10 @@ static void sdl_scale(int width, int height)
{
int bpp = real_screen->format->BitsPerPixel;
+#ifdef DEBUG_SDL
+ printf("SDL: Scaling to %dx%d bpp %d\n", width, height, bpp);
+#endif
+
if (bpp != 16 && bpp != 32) {
bpp = 32;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PULL 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 1/5] sdl: Refresh debug statements Gerd Hoffmann
@ 2015-03-03 9:58 ` Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 3/5] configure: opengl overhaul Gerd Hoffmann
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-03 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This happens for example when doing ctrl-alt-u and segfaults
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/sdl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/sdl.c b/ui/sdl.c
index b89182a..8bdbf52 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -135,12 +135,13 @@ static void do_sdl_resize(int width, int height, int bpp)
static void sdl_switch(DisplayChangeListener *dcl,
DisplaySurface *new_surface)
{
- PixelFormat pf = qemu_pixelformat_from_pixman(new_surface->format);
+ PixelFormat pf;
/* temporary hack: allows to call sdl_switch to handle scaling changes */
if (new_surface) {
surface = new_surface;
}
+ pf = qemu_pixelformat_from_pixman(surface->format);
if (!scaling_active) {
do_sdl_resize(surface_width(surface), surface_height(surface), 0);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PULL 3/5] configure: opengl overhaul
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 1/5] sdl: Refresh debug statements Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 2/5] sdl: Fix crash when calling sdl_switch() with NULL surface Gerd Hoffmann
@ 2015-03-03 9:58 ` Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 4/5] Allow the use of X11 from a non standard location Gerd Hoffmann
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-03 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Michael Walle, Gerd Hoffmann, Anthony Liguori
Rename config option from "glx" to "opengl", glx will not be the only
option for opengl in near future. Also switch over to pkg-config for
opengl support detection.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
configure | 39 +++++++++++++++++----------------------
default-configs/lm32-softmmu.mak | 2 +-
hw/display/Makefile.objs | 2 +-
hw/lm32/milkymist-hw.h | 4 ++--
include/sysemu/sysemu.h | 1 +
vl.c | 1 +
6 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/configure b/configure
index 7ba4bcb..ecd7893 100755
--- a/configure
+++ b/configure
@@ -309,7 +309,7 @@ rbd=""
smartcard_nss=""
libusb=""
usb_redir=""
-glx=""
+opengl=""
zlib="yes"
lzo=""
snappy=""
@@ -1027,9 +1027,9 @@ for opt do
;;
--enable-vhost-scsi) vhost_scsi="yes"
;;
- --disable-glx) glx="no"
+ --disable-opengl) opengl="no"
;;
- --enable-glx) glx="yes"
+ --enable-opengl) opengl="yes"
;;
--disable-rbd) rbd="no"
;;
@@ -3107,23 +3107,18 @@ fi
libs_softmmu="$libs_softmmu $fdt_libs"
##########################################
-# GLX probe, used by milkymist-tmu2
-if test "$glx" != "no" ; then
- glx_libs="-lGL -lX11"
- cat > $TMPC << EOF
-#include <X11/Xlib.h>
-#include <GL/gl.h>
-#include <GL/glx.h>
-int main(void) { glBegin(0); glXQueryVersion(0,0,0); return 0; }
-EOF
- if compile_prog "" "-lGL -lX11" ; then
- glx=yes
+# opengl probe (for sdl2, milkymist-tmu2)
+if test "$opengl" != "no" ; then
+ opengl_pkgs="gl"
+ if $pkg_config $opengl_pkgs; then
+ opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
+ opengl=yes
else
- if test "$glx" = "yes" ; then
- feature_not_found "glx" "Install GL devel (e.g. MESA)"
+ if test "$opengl" = "yes" ; then
+ feature_not_found "opengl" "Install GL devel (e.g. MESA)"
fi
- glx_libs=
- glx=no
+ opengl_libs=""
+ opengl=no
fi
fi
@@ -4390,7 +4385,7 @@ echo "xfsctl support $xfs"
echo "nss used $smartcard_nss"
echo "libusb $libusb"
echo "usb net redir $usb_redir"
-echo "GLX support $glx"
+echo "OpenGL support $opengl"
echo "libiscsi support $libiscsi"
echo "libnfs support $libnfs"
echo "build guest agent $guest_agent"
@@ -4756,9 +4751,9 @@ if test "$usb_redir" = "yes" ; then
echo "CONFIG_USB_REDIR=y" >> $config_host_mak
fi
-if test "$glx" = "yes" ; then
- echo "CONFIG_GLX=y" >> $config_host_mak
- echo "GLX_LIBS=$glx_libs" >> $config_host_mak
+if test "$opengl" = "yes" ; then
+ echo "CONFIG_OPENGL=y" >> $config_host_mak
+ echo "OPENGL_LIBS=$opengl_libs" >> $config_host_mak
fi
if test "$lzo" = "yes" ; then
diff --git a/default-configs/lm32-softmmu.mak b/default-configs/lm32-softmmu.mak
index 7df58c8..4889348 100644
--- a/default-configs/lm32-softmmu.mak
+++ b/default-configs/lm32-softmmu.mak
@@ -2,7 +2,7 @@
CONFIG_LM32=y
CONFIG_MILKYMIST=y
-CONFIG_MILKYMIST_TMU2=$(CONFIG_GLX)
+CONFIG_MILKYMIST_TMU2=$(CONFIG_OPENGL)
CONFIG_FRAMEBUFFER=y
CONFIG_PTIMER=y
CONFIG_PFLASH_CFI01=y
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index 7ed76a9..e18ea57 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -20,7 +20,7 @@ common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
common-obj-y += milkymist-tmu2.o
-libs_softmmu += $(GLX_LIBS)
+libs_softmmu += $(OPENGL_LIBS)
endif
obj-$(CONFIG_OMAP) += omap_dss.o
diff --git a/hw/lm32/milkymist-hw.h b/hw/lm32/milkymist-hw.h
index 5317ce6..8d20cac 100644
--- a/hw/lm32/milkymist-hw.h
+++ b/hw/lm32/milkymist-hw.h
@@ -86,7 +86,7 @@ static inline DeviceState *milkymist_pfpu_create(hwaddr base,
return dev;
}
-#ifdef CONFIG_GLX
+#ifdef CONFIG_OPENGL
#include <X11/Xlib.h>
#include <GL/glx.h>
static const int glx_fbconfig_attr[] = {
@@ -100,7 +100,7 @@ static const int glx_fbconfig_attr[] = {
static inline DeviceState *milkymist_tmu2_create(hwaddr base,
qemu_irq irq)
{
-#ifdef CONFIG_GLX
+#ifdef CONFIG_OPENGL
DeviceState *dev;
Display *d;
GLXFBConfig *configs;
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 11040b4..7c3c718 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -114,6 +114,7 @@ extern int graphic_width;
extern int graphic_height;
extern int graphic_depth;
extern DisplayType display_type;
+extern int display_opengl;
extern const char *keyboard_layout;
extern int win2k_install_hack;
extern int alt_grab;
diff --git a/vl.c b/vl.c
index 86bdce0..4a5352b 100644
--- a/vl.c
+++ b/vl.c
@@ -130,6 +130,7 @@ static int data_dir_idx;
const char *bios_name = NULL;
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
DisplayType display_type = DT_DEFAULT;
+int display_opengl;
static int display_remote;
const char* keyboard_layout = NULL;
ram_addr_t ram_size;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PULL 4/5] Allow the use of X11 from a non standard location.
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
` (2 preceding siblings ...)
2015-03-03 9:58 ` [Qemu-devel] [PULL 3/5] configure: opengl overhaul Gerd Hoffmann
@ 2015-03-03 9:58 ` Gerd Hoffmann
2015-03-03 9:58 ` [Qemu-devel] [PULL 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp Gerd Hoffmann
2015-03-08 9:03 ` [Qemu-devel] [PULL 0/5] sdl patch queue Peter Maydell
5 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-03 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Jeremy White, Gerd Hoffmann
From: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
[ kraxel: solve opengl patch conflicts ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
configure | 24 +++++++++++++++++++-----
hw/display/Makefile.objs | 1 +
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index ecd7893..a071bbb 100755
--- a/configure
+++ b/configure
@@ -2085,6 +2085,15 @@ if test "$sparse" != "no" ; then
fi
##########################################
+# X11 probe
+x11_cflags=
+x11_libs=-lX11
+if $pkg_config --exists "x11"; then
+ x11_cflags=`$pkg_config --cflags x11`
+ x11_libs=`$pkg_config --libs x11`
+fi
+
+##########################################
# GTK probe
if test "$gtkabi" = ""; then
@@ -2111,7 +2120,8 @@ if test "$gtk" != "no"; then
gtk_cflags=`$pkg_config --cflags $gtkpackage`
gtk_libs=`$pkg_config --libs $gtkpackage`
if $pkg_config --exists "$gtkx11package >= $gtkversion"; then
- gtk_libs="$gtk_libs -lX11"
+ gtk_cflags="$gtk_cflags $x11_cflags"
+ gtk_libs="$gtk_libs $x11_libs"
fi
libs_softmmu="$gtk_libs $libs_softmmu"
gtk="yes"
@@ -2236,8 +2246,9 @@ if test "$sdl" = "yes" ; then
#endif
int main(void) { return 0; }
EOF
- if compile_prog "$sdl_cflags" "$sdl_libs" ; then
- sdl_libs="$sdl_libs -lX11"
+ if compile_prog "$sdl_cflags $x11_cflags" "$sdl_libs $x11_libs" ; then
+ sdl_cflags="$sdl_cflags $x11_cflags"
+ sdl_libs="$sdl_libs $x11_libs"
fi
libs_softmmu="$sdl_libs $libs_softmmu"
fi
@@ -3110,13 +3121,15 @@ libs_softmmu="$libs_softmmu $fdt_libs"
# opengl probe (for sdl2, milkymist-tmu2)
if test "$opengl" != "no" ; then
opengl_pkgs="gl"
- if $pkg_config $opengl_pkgs; then
- opengl_libs="$($pkg_config --libs $opengl_pkgs) -lX11"
+ if $pkg_config $opengl_pkgs x11; then
+ opengl_cflags="$($pkg_config --libs $opengl_pkgs) $x11_cflags"
+ opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
opengl=yes
else
if test "$opengl" = "yes" ; then
feature_not_found "opengl" "Install GL devel (e.g. MESA)"
fi
+ opengl_cflags=""
opengl_libs=""
opengl=no
fi
@@ -4753,6 +4766,7 @@ 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
fi
diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
index e18ea57..e73cb7d 100644
--- a/hw/display/Makefile.objs
+++ b/hw/display/Makefile.objs
@@ -20,6 +20,7 @@ common-obj-$(CONFIG_ZAURUS) += tc6393xb.o
ifeq ($(CONFIG_MILKYMIST_TMU2),y)
common-obj-y += milkymist-tmu2.o
+milkymist-tmu2.o-cflags := $(OPENGL_CFLAGS)
libs_softmmu += $(OPENGL_LIBS)
endif
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Qemu-devel] [PULL 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
` (3 preceding siblings ...)
2015-03-03 9:58 ` [Qemu-devel] [PULL 4/5] Allow the use of X11 from a non standard location Gerd Hoffmann
@ 2015-03-03 9:58 ` Gerd Hoffmann
2015-03-08 9:03 ` [Qemu-devel] [PULL 0/5] sdl patch queue Peter Maydell
5 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-03 9:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
---
include/ui/qemu-pixman.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/ui/qemu-pixman.h b/include/ui/qemu-pixman.h
index 3dee576..5d7a9ac 100644
--- a/include/ui/qemu-pixman.h
+++ b/include/ui/qemu-pixman.h
@@ -27,8 +27,24 @@
#ifdef HOST_WORDS_BIGENDIAN
# define PIXMAN_BE_r8g8b8 PIXMAN_r8g8b8
+# define PIXMAN_BE_x8r8g8b8 PIXMAN_x8r8g8b8
+# define PIXMAN_BE_a8r8g8b8 PIXMAN_a8r8g8b8
+# define PIXMAN_BE_b8g8r8x8 PIXMAN_b8g8r8x8
+# define PIXMAN_BE_b8g8r8a8 PIXMAN_b8g8r8a8
+# define PIXMAN_BE_r8g8b8x8 PIXMAN_r8g8b8x8
+# define PIXMAN_BE_r8g8b8a8 PIXMAN_r8g8b8a8
+# define PIXMAN_BE_x8b8g8r8 PIXMAN_x8b8g8r8
+# define PIXMAN_BE_a8b8g8r8 PIXMAN_a8b8g8r8
#else
# define PIXMAN_BE_r8g8b8 PIXMAN_b8g8r8
+# define PIXMAN_BE_x8r8g8b8 PIXMAN_b8g8r8x8
+# define PIXMAN_BE_a8r8g8b8 PIXMAN_b8g8r8a8
+# define PIXMAN_BE_b8g8r8x8 PIXMAN_x8r8g8b8
+# define PIXMAN_BE_b8g8r8a8 PIXMAN_a8r8g8b8
+# define PIXMAN_BE_r8g8b8x8 PIXMAN_x8b8g8r8
+# define PIXMAN_BE_r8g8b8a8 PIXMAN_a8b8g8r8
+# define PIXMAN_BE_x8b8g8r8 PIXMAN_r8g8b8x8
+# define PIXMAN_BE_a8b8g8r8 PIXMAN_r8g8b8a8
#endif
/* -------------------------------------------------------------------- */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] sdl patch queue.
2015-03-03 9:58 [Qemu-devel] [PULL 0/5] sdl patch queue Gerd Hoffmann
` (4 preceding siblings ...)
2015-03-03 9:58 ` [Qemu-devel] [PULL 5/5] pixman: add a bunch of PIXMAN_BE_* defines for 32bpp Gerd Hoffmann
@ 2015-03-08 9:03 ` Peter Maydell
2015-03-10 9:19 ` Gerd Hoffmann
5 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2015-03-08 9:03 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 3 March 2015 at 18:58, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Misc stuff in the basket: sdl bugfixes, some preparing patches for the
> upcoming opengl support in sdl2, x11 build improvement.
>
> please pull,
> Gerd
>
> The following changes since commit 0856579cac2f1dacecd847cfcd89680d26ff78f5:
>
> Revert "Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging" (2015-03-03 00:29:17 +0000)
>
> are available in the git repository at:
>
> git://git.kraxel.org/qemu tags/pull-sdl-20150303-1
>
> for you to fetch changes up to 32a2e5d184ffcc083288638a1b6fc6a05db22817:
>
> pixman: add a bunch of PIXMAN_BE_* defines for 32bpp (2015-03-03 10:53:00 +0100)
>
> ----------------------------------------------------------------
> misc ui patches, mostly sdl related.
>
> ----------------------------------------------------------------
Fails to build on OSX, I'm afraid:
In file included from /Users/pm215/src/qemu/hw/lm32/milkymist.c:30:
/Users/pm215/src/qemu/hw/lm32/milkymist-hw.h:90:10: fatal error:
'X11/Xlib.h' file not found
#include <X11/Xlib.h>
^
1 error generated.
x86/Linux clang also fails at link time:
e104462:trusty:qemu-for-merges$ make -C build/clang V=1
make: Entering directory `/home/petmay01/linaro/qemu-for-merges/build/clang'
clang -I/home/petmay01/linaro/qemu-for-merges/tcg
-I/home/petmay01/linaro/qemu-for-merges/tcg/i386
-I/home/petmay01/linaro/qemu-for-merges/linux-headers
-I/home/petmay01/linaro/qemu-for-merges/build/clang/linux-headers -I.
-I/home/petmay01/linaro/qemu-for-merges
-I/home/petmay01/linaro/qemu-for-merges/include
-I/home/petmay01/linaro/qemu-for-merges/hw/display -Ihw/display
-I/usr/include/pixman-1 -fPIE -DPIE -m64 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fno-common -fsanitize=undefined -Werror
-Wno-string-plus-int -Wno-initializer-overrides -Wendif-labels
-Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security
-Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition
-Wtype-limits -fstack-protector-all -I/usr/include/p11-kit-1
-I/usr/include/p11-kit-1 -I/usr/include/libpng12
-I/usr/include/spice-server -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/spice-1 -I/usr/include/libusb-1.0
-I/home/petmay01/linaro/qemu-for-merges/tests -MMD -MP -MT
hw/display/milkymist-tmu2.o -MF hw/display/milkymist-tmu2.d -O2
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -lGL -c -o
hw/display/milkymist-tmu2.o
/home/petmay01/linaro/qemu-for-merges/hw/display/milkymist-tmu2.c
clang: error: -lGL: 'linker' input unused
Looks like it doesn't like you providing a linker option when
you're not asking it to do a link...
-- PMM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] sdl patch queue.
2015-03-08 9:03 ` [Qemu-devel] [PULL 0/5] sdl patch queue Peter Maydell
@ 2015-03-10 9:19 ` Gerd Hoffmann
2015-03-10 9:54 ` Peter Maydell
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 9:19 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
Hi,
> hw/display/milkymist-tmu2.o -MF hw/display/milkymist-tmu2.d -O2
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -lGL -c -o
> hw/display/milkymist-tmu2.o
> /home/petmay01/linaro/qemu-for-merges/hw/display/milkymist-tmu2.c
> clang: error: -lGL: 'linker' input unused
Hmm, can't see where this is coming from. Possibly it is old, just
triggering now because the new opengl test now succeeds on macosx.
Can you attach the config-mak.h for this please?
thanks,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] sdl patch queue.
2015-03-10 9:19 ` Gerd Hoffmann
@ 2015-03-10 9:54 ` Peter Maydell
2015-03-10 10:26 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2015-03-10 9:54 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
On 10 March 2015 at 09:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
>> hw/display/milkymist-tmu2.o -MF hw/display/milkymist-tmu2.d -O2
>> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0
>> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -lGL -c -o
>> hw/display/milkymist-tmu2.o
>> /home/petmay01/linaro/qemu-for-merges/hw/display/milkymist-tmu2.c
>> clang: error: -lGL: 'linker' input unused
>
> Hmm, can't see where this is coming from. Possibly it is old, just
> triggering now because the new opengl test now succeeds on macosx.
No, this is x86/Linux clang, not OSX.
> Can you attach the config-mak.h for this please?
Attached.
This bit in configure looks bogus:
opengl_cflags="$($pkg_config --libs $opengl_pkgs) $x11_cflags"
opengl_libs="$($pkg_config --libs $opengl_pkgs) $x11_libs"
...surely we should be adding the opengl cflags to opengl_cflags,
not putting the --libs switches in there as well as in opengl_libs?
This seems to be a new thing in commit b5e830d8aa6 in your pull.
-- PMM
[-- Attachment #2: config-host.mak --]
[-- Type: text/x-makefile, Size: 7821 bytes --]
# Automatically generated by configure - do not modify
all:
prefix=/usr/local
bindir=${prefix}/bin
libdir=${prefix}/lib
libexecdir=${prefix}/libexec
includedir=${prefix}/include
mandir=${prefix}/share/man
sysconfdir=${prefix}/etc
qemu_confdir=${prefix}/etc/qemu
qemu_datadir=${prefix}/share/qemu
qemu_docdir=${prefix}/share/doc/qemu
qemu_moddir=${prefix}/lib/qemu
qemu_localstatedir=${prefix}/var
qemu_helperdir=${prefix}/libexec
extra_cflags=-m64 -fsanitize=undefined -Werror
extra_ldflags=
qemu_localedir=${prefix}/share/locale
libs_softmmu=-lpixman-1 -lutil -lbluetooth -lncurses -lbrlapi -lvdeplug -luuid -lpng12 -ljpeg -lsasl2 -lgnutls -lgnutls -lSDL -lX11 -lvte -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lfontconfig -lfreetype -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -lX11 -lXext -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lX11 -lxenstore -lxenctrl -lxenguest -llzo2 -lsnappy -lrdmacm -libverbs -lfdt -lspice-server -lusb-1.0 -lusbredirparser
ARCH=x86_64
STRIP=strip
CONFIG_POSIX=y
CONFIG_LINUX=y
CONFIG_SLIRP=y
CONFIG_SMBD_COMMAND="/usr/sbin/smbd"
CONFIG_VDE=y
CONFIG_L2TPV3=y
CONFIG_LIBCAP=y
CONFIG_AUDIO_DRIVERS=oss
CONFIG_OSS=y
CONFIG_BDRV_RW_WHITELIST=
CONFIG_BDRV_RO_WHITELIST=
CONFIG_VNC=y
CONFIG_VNC_TLS=y
CONFIG_VNC_SASL=y
CONFIG_VNC_JPEG=y
CONFIG_VNC_PNG=y
CONFIG_VNC_WS=y
VNC_WS_CFLAGS=
CONFIG_FNMATCH=y
CONFIG_UUID=y
CONFIG_XFS=y
VERSION=2.2.50
PKGVERSION=
SRC_PATH=/home/petmay01/linaro/qemu-for-merges
TARGET_DIRS= aarch64-softmmu alpha-softmmu arm-softmmu cris-softmmu i386-softmmu lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mips64-softmmu mips64el-softmmu mipsel-softmmu moxie-softmmu or32-softmmu ppc-softmmu ppc64-softmmu ppcemb-softmmu s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu tricore-softmmu unicore32-softmmu x86_64-softmmu xtensa-softmmu xtensaeb-softmmu aarch64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user i386-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mips64-linux-user mips64el-linux-user mipsel-linux-user mipsn32-linux-user mipsn32el-linux-user or32-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user ppc64le-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc32plus-linux-user sparc64-linux-user unicore32-linux-user x86_64-linux-user
BUILD_DOCS=yes
CONFIG_SDL=y
CONFIG_SDLABI=1.2
SDL_CFLAGS=-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL
CONFIG_CURSES=y
CONFIG_UTIMENSAT=y
CONFIG_PIPE2=y
CONFIG_ACCEPT4=y
CONFIG_SPLICE=y
CONFIG_EVENTFD=y
CONFIG_FALLOCATE=y
CONFIG_FALLOCATE_PUNCH_HOLE=y
CONFIG_POSIX_FALLOCATE=y
CONFIG_SYNC_FILE_RANGE=y
CONFIG_FIEMAP=y
CONFIG_DUP3=y
CONFIG_PPOLL=y
CONFIG_PRCTL_PR_SET_TIMERSLACK=y
CONFIG_EPOLL=y
CONFIG_EPOLL_CREATE1=y
CONFIG_EPOLL_PWAIT=y
CONFIG_SENDFILE=y
CONFIG_TIMERFD=y
CONFIG_SETNS=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY1=y
CONFIG_BYTESWAP_H=y
CONFIG_CURL=m
CURL_CFLAGS=
CURL_LIBS=-lcurl
CONFIG_BRLAPI=y
CONFIG_BLUEZ=y
BLUEZ_CFLAGS=
GLIB_CFLAGS=-pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
CONFIG_GTK=y
CONFIG_GTKABI=2.0
GTK_CFLAGS=-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz
CONFIG_VTE=y
VTE_CFLAGS=-pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz -I/usr/include/vte-0.0
CONFIG_XEN_BACKEND=y
CONFIG_XEN_CTRL_INTERFACE_VERSION=420
CONFIG_LINUX_AIO=y
CONFIG_ATTR=y
CONFIG_VIRTFS=y
CONFIG_VHOST_SCSI=y
CONFIG_VHOST_NET_USED=y
INSTALL_BLOBS=yes
CONFIG_IOVEC=y
CONFIG_PREADV=y
CONFIG_FDT=y
CONFIG_SIGNALFD=y
CONFIG_FDATASYNC=y
CONFIG_MADVISE=y
CONFIG_POSIX_MADVISE=y
CONFIG_SIGEV_THREAD_ID=y
CONFIG_SPICE=y
CONFIG_SMARTCARD_NSS=y
NSS_LIBS=-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 -pthread -lgthread-2.0 -lglib-2.0
NSS_CFLAGS=-I/usr/include/nss -I/usr/include/nspr -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
CONFIG_USB_LIBUSB=y
CONFIG_USB_REDIR=y
CONFIG_OPENGL=y
OPENGL_CFLAGS=-lGL
OPENGL_LIBS=-lGL -lX11
CONFIG_LZO=y
CONFIG_SNAPPY=y
CONFIG_QOM_CAST_DEBUG=y
CONFIG_RBD=m
RBD_CFLAGS=
RBD_LIBS=-lrbd -lrados
CONFIG_COROUTINE_BACKEND=ucontext
CONFIG_COROUTINE_POOL=1
CONFIG_OPEN_BY_HANDLE=y
CONFIG_LINUX_MAGIC_H=y
CONFIG_VALGRIND_H=y
CONFIG_HAS_ENVIRON=y
CONFIG_CPUID_H=y
CONFIG_GETAUXVAL=y
CONFIG_QUORUM=y
CONFIG_VHDX=y
HOST_USB=libusb legacy
CONFIG_TPM=$(CONFIG_SOFTMMU)
CONFIG_TPM_PASSTHROUGH=y
TRACE_BACKENDS=nop
CONFIG_TRACE_NOP=y
CONFIG_TRACE_FILE=trace
CONFIG_RDMA=y
CONFIG_THREAD_SETNAME_BYTHREAD=y
CONFIG_PTHREAD_SETNAME_NP=y
TOOLS=qemu-ga$(EXESUF) qemu-nbd$(EXESUF) qemu-img$(EXESUF) qemu-io$(EXESUF) fsdev/virtfs-proxy-helper$(EXESUF)
ROMS=optionrom
MAKE=make
INSTALL=install
INSTALL_DIR=install -d -m 0755
INSTALL_DATA=install -c -m 0644
INSTALL_PROG=$(LIBTOOL) --mode=install install -c -m 0755
INSTALL_LIB=$(LIBTOOL) --mode=install install -c -m 0644
PYTHON=python -B
CC=clang
CC_I386=$(CC) -m32
HOST_CC=cc
CXX=clang++
OBJCC=clang
AR=ar
ARFLAGS=rv
AS=as
CPP=clang -E
OBJCOPY=objcopy
LD=ld
NM=nm
WINDRES=windres
LIBTOOL=libtool
CFLAGS=-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g
CFLAGS_NOPIE=
QEMU_CFLAGS=-I/usr/include/pixman-1 -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fsanitize=undefined -Werror -Wno-string-plus-int -Wno-initializer-overrides -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-all -I/usr/include/p11-kit-1 -I/usr/include/p11-kit-1 -I/usr/include/libpng12 -I/usr/include/spice-server -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/libusb-1.0
QEMU_INCLUDES=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/i386 -I$(SRC_PATH)/linux-headers -I/home/petmay01/linaro/qemu-for-merges/build/clang/linux-headers -I. -I$(SRC_PATH) -I$(SRC_PATH)/include
AUTOCONF_HOST :=
LDFLAGS=-Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
LDFLAGS_NOPIE=
LIBTOOLFLAGS= -Wc,-fstack-protector-all
LIBS+=-pthread -lgthread-2.0 -lglib-2.0 -lz
LIBS_TOOLS+=-lcap-ng -lvdeplug -luuid -lgnutls -lgnutls -lgnutls -lSDL -lX11 -lvte -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lfontconfig -lfreetype -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -lX11 -lXext -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lX11 -lxenstore -lxenctrl -lxenguest -llzo2 -lsnappy -lrdmacm -libverbs
EXESUF=
DSOSUF=.so
LDFLAGS_SHARED=-shared
LIBS_QGA+=-pthread -lgthread-2.0 -lglib-2.0
POD2MAN=pod2man --utf8
TRANSLATE_OPT_CFLAGS=
CONFIG_RDMA=y
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] sdl patch queue.
2015-03-10 9:54 ` Peter Maydell
@ 2015-03-10 10:26 ` Gerd Hoffmann
0 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2015-03-10 10:26 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
On Di, 2015-03-10 at 09:54 +0000, Peter Maydell wrote:
> On 10 March 2015 at 09:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > Hi,
> >
> >> hw/display/milkymist-tmu2.o -MF hw/display/milkymist-tmu2.d -O2
> >> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0
> >> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -lGL -c -o
> >> hw/display/milkymist-tmu2.o
> >> /home/petmay01/linaro/qemu-for-merges/hw/display/milkymist-tmu2.c
> >> clang: error: -lGL: 'linker' input unused
> >
> > Hmm, can't see where this is coming from. Possibly it is old, just
> > triggering now because the new opengl test now succeeds on macosx.
>
> No, this is x86/Linux clang, not OSX.
Hmm, funny my clang didn't complain.
> > Can you attach the config-mak.h for this please?
>
> Attached.
>
> This bit in configure looks bogus:
>
> opengl_cflags="$($pkg_config --libs $opengl_pkgs) $x11_cflags"
Indeed. Should be --cflags. Fixed, updated pull here:
git://git.kraxel.org/qemu tags/pull-sdl-20150310-1
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread