safe_stack=""
use_containers="yes"
gdb_bin=$(command -v "gdb-multiarch" || command -v "gdb")
+glib_has_gslice="no"
if test -e "$source_path/.git"
then
fi
done
+# Check whether glib has gslice, which we have to avoid for correctness.
+# TODO: remove this check and the corresponding workaround (qtree) when
+# the minimum supported glib is >= $glib_dropped_gslice_version.
+glib_dropped_gslice_version=2.75.3
+for i in $glib_modules; do
+ if ! $pkg_config --atleast-version=$glib_dropped_gslice_version $i; then
+ glib_has_gslice="yes"
+ break
+ fi
+done
+
# This workaround is required due to a bug in pkg-config file for glib as it
# doesn't define GLIB_STATIC_COMPILATION for pkg-config --static
echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak
echo "GLIB_LIBS=$glib_libs" >> $config_host_mak
+if test "$glib_has_gslice" = "yes" ; then
+ echo "HAVE_GLIB_WITH_SLICE_ALLOCATOR=y" >> $config_host_mak
+fi
echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak
echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak
echo "EXESUF=$EXESUF" >> $config_host_mak
Maintainer: Gui Chen <gui.chen@intel.com>
Homepage: http://wiki.qemu.org/Index.html
Standards-Version: 3.7.0
-Build-Depends: debhelper (>= 4.0.0), dpatch, pkg-config, libglib2.0-dev, python3:any, ninja-build, meson
+Build-Depends: debhelper (>= 4.0.0), pkg-config, libglib2.0-dev, python3:any, ninja-build, meson
Package: qemu-arm-static
Architecture: i386 amd64
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-include /usr/share/dpatch/dpatch.make
unexport LDFLAGS
build: build-stamp
-build-stamp: patch-stamp
+build-stamp:
dh_testdir
./configure \
--prefix=/usr \
--disable-xkbcommon
dh_auto_build
-clean: unpatch
+clean:
dh_testdir
dh_testroot
rm -f build-stamp
#include "qemu/osdep.h"
-#if GLIB_CHECK_VERSION(2,75,3)
-// USE GTree
-#else
-#define HAVE_GLIB_WITH_SLICE_ALLOCATOR
-#endif
-
#ifdef HAVE_GLIB_WITH_SLICE_ALLOCATOR
typedef struct _QTree QTree;
add_project_arguments(config_host['GLIB_CFLAGS'].split(),
native: false, language: ['c', 'cpp', 'objc'])
glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split())
+
+# pass down whether Glib has the slice allocator
+if config_host.has_key('HAVE_GLIB_WITH_SLICE_ALLOCATOR')
+ config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', true)
+endif
+
gio = not_found
if 'CONFIG_GIO' in config_host
gio = declare_dependency(compile_args: config_host['GIO_CFLAGS'].split(),
util_ss.add(when: 'CONFIG_WIN32', if_true: files('oslib-win32.c'))
util_ss.add(when: 'CONFIG_WIN32', if_true: files('qemu-thread-win32.c'))
util_ss.add(when: 'CONFIG_WIN32', if_true: winmm)
-util_ss.add(files('qtree.c'))
+util_ss.add(when: 'HAVE_GLIB_WITH_SLICE_ALLOCATOR', if_true: files('qtree.c'))
util_ss.add(files('envlist.c', 'path.c', 'module.c'))
util_ss.add(files('host-utils.c'))
util_ss.add(files('bitmap.c', 'bitops.c'))