SOCIS/2015/CoverageAnalysis: couverture-qemu_patch.diff

File couverture-qemu_patch.diff, 2.2 KB (added by hermann19829, on Jun 26, 2015 at 7:28:11 PM)

Patch for Couverture QEMU.

  • configure

    diff --git a/configure b/configure
    index 5559436..c1bdaa6 100755
    a b if test "$mingw32" = yes; then 
    20462046else
    20472047    glib_req_ver=2.12
    20482048fi
    2049 if $pkg_config --atleast-version=$glib_req_ver gthread-2.0 > /dev/null 2>&1
     2049if $pkg_config --atleast-version=$glib_req_ver glib-2.0 > /dev/null 2>&1
    20502050then
    2051     glib_cflags=`$pkg_config --cflags gthread-2.0 2>/dev/null`
    2052     glib_libs=`$pkg_config --libs gthread-2.0 2>/dev/null`
     2051    glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
     2052    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
    20532053    LIBS="$glib_libs $LIBS"
    2054     libs_qga="$glib_libs $libs_qga"
     2054    libs_qga="$glib_libs $libs_qga -lpthread -lrt"
    20552055else
    20562056    echo "glib-$glib_req_ver required to compile QEMU"
    20572057    exit 1
    elif compile_prog "" "-lrt" ; then 
    25982598  clock_gettime=yes
    25992599fi
    26002600
     2601##########################################
     2602# Do we need timer_gettime + librt
     2603timer_gettime=no
     2604cat > $TMPC <<EOF
     2605#include <time.h>
     2606int main(void) { return timer_gettime(CLOCK_REALTIME, 0, NULL, NULL); }
     2607EOF
     2608
     2609if compile_prog "" "" ; then
     2610  timer_gettime=yes
     2611elif compile_prog "" "-lrt" ; then
     2612  LIBS="-lrt $LIBS"
     2613  timer_gettime=yes
     2614fi
     2615
    26012616if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
    26022617        "$aix" != "yes" -a "$haiku" != "yes" ; then
    26032618    libs_softmmu="-lutil $libs_softmmu"
  • rules.mak

    diff --git a/rules.mak b/rules.mak
    index efef6f2..cd3b5f2 100644
    a b endif 
    3131%.o: %.m
    3232        $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<,"  OBJC  $(TARGET_DIR)$@")
    3333
    34 LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(1)) $(LIBS),"  LINK  $(TARGET_DIR)$@")
     34LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(sort $(1)) $(LIBS) -lpthread -lrt,"  LINK  $(TARGET_DIR)$@")
    3535
    3636%$(EXESUF): %.o
    3737        $(call LINK,$^)
    LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(so 
    3939%.a:
    4040        $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^,"  AR    $(TARGET_DIR)$@")
    4141
     42V=1
    4243quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
    4344
    4445# cc-option