Skip to contentSkip to conversation

modules: two fixes

PATCH New Gerd Hoffmann 1 participant 3 messages Mar 8, 2018

lore
Share & tools
lore
#0 lore raw

cover modules: two fixes

Gerd Hoffmann (2):
modules: use gmodule-export
modules: workaround buggy glib builds

 configure | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/2 modules: use gmodule-export

As we want qemu symbols be exported to modules we should use the gmodule-export-2.0 pkg-config instead of gmodule-2.0.

Cc Marc-André Lureau <[email protected]>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index 6f3921c02a..eb612532aa 100755
@@ -3352,7 +3352,7 @@ else
 fi
 glib_modules=gthread-2.0
 if test "$modules" = yes; then
-    glib_modules="$glib_modules gmodule-2.0"
+    glib_modules="$glib_modules gmodule-export-2.0"
 fi
 
 # This workaround is required due to a bug in pkg-config file for glib as it
Signature · 1 line
2.9.3
#2 lore raw

PATCH 2/2 modules: workaround buggy glib builds

In reply to Gerd Hoffmann

https://bugzilla.gnome.org/show_bug.cgi?id=794123

Cc Marc-André Lureau <[email protected]>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)
configure +4 -0
index eb612532aa..34e4bb419e 100755
@@ -3366,6 +3366,10 @@ for i in $glib_modules; do
     if $pkg_config --atleast-version=$glib_req_ver $i; then
         glib_cflags=$($pkg_config --cflags $i)
         glib_libs=$($pkg_config --libs $i)
+        if test "$i" = "gmodule-export-2.0"; then
+            # make sure we link with --export-dynamic
+            glib_libs="-Wl,--export-dynamic ${glib_libs//-Wl,--export-dynamic/}"
+        fi
         QEMU_CFLAGS="$glib_cflags $QEMU_CFLAGS"
         LIBS="$glib_libs $LIBS"
         libs_qga="$glib_libs $libs_qga"
Signature · 1 line
2.9.3