|
|
9ae3a8 |
From 37782b793485e0f45a6e6f0da40d24c04191a13b Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 16 Jul 2014 02:20:28 -0500
|
|
|
9ae3a8 |
Subject: [CHANGE 28/29] block: use per-object cflags and libs
|
|
|
9ae3a8 |
To: rhvirt-patches@redhat.com,
|
|
|
9ae3a8 |
jen@redhat.com
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1405477228-11490-5-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 59918
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 4/4] block: use per-object cflags and libs
|
|
|
9ae3a8 |
Bugzilla: 1017685
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Upstream: 6ebc91e5d0f408371460ab4329dc6de7f93306ac
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
No longer adds flags and libs for them to global variables, instead
|
|
|
9ae3a8 |
create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is
|
|
|
9ae3a8 |
used as per object cflags and libs.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This removes unwanted dependencies from libcacard.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
[Split from Fam's patch to enable modules. - Paolo]
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Manual backport.
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/Makefile.objs | 13 ++++++++++++-
|
|
|
9ae3a8 |
configure | 20 ++++++++------------
|
|
|
9ae3a8 |
2 files changed, 20 insertions(+), 13 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: jen <jen@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/Makefile.objs | 13 ++++++++++++-
|
|
|
9ae3a8 |
configure | 20 ++++++++------------
|
|
|
9ae3a8 |
2 files changed, 20 insertions(+), 13 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/Makefile.objs b/block/Makefile.objs
|
|
|
9ae3a8 |
index 84dd57f..dd01fb3 100644
|
|
|
9ae3a8 |
--- a/block/Makefile.objs
|
|
|
9ae3a8 |
+++ b/block/Makefile.objs
|
|
|
9ae3a8 |
@@ -24,4 +24,15 @@ common-obj-y += commit.o
|
|
|
9ae3a8 |
common-obj-y += mirror.o
|
|
|
9ae3a8 |
endif
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
-$(obj)/curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS)
|
|
|
9ae3a8 |
+iscsi.o-cflags := $(LIBISCSI_CFLAGS)
|
|
|
9ae3a8 |
+iscsi.o-libs := $(LIBISCSI_LIBS)
|
|
|
9ae3a8 |
+curl.o-cflags := $(CURL_CFLAGS)
|
|
|
9ae3a8 |
+curl.o-libs := $(CURL_LIBS)
|
|
|
9ae3a8 |
+rbd.o-cflags := $(RBD_CFLAGS)
|
|
|
9ae3a8 |
+rbd.o-libs := $(RBD_LIBS)
|
|
|
9ae3a8 |
+gluster.o-cflags := $(GLUSTERFS_CFLAGS)
|
|
|
9ae3a8 |
+gluster.o-libs := $(GLUSTERFS_LIBS)
|
|
|
9ae3a8 |
+ssh.o-cflags := $(LIBSSH2_CFLAGS)
|
|
|
9ae3a8 |
+ssh.o-libs := $(LIBSSH2_LIBS)
|
|
|
9ae3a8 |
+qcow.o-libs := -lz
|
|
|
9ae3a8 |
+linux-aio.o-libs := -laio
|
|
|
9ae3a8 |
diff --git a/configure b/configure
|
|
|
9ae3a8 |
index 8c6f4e5..4552e08 100755
|
|
|
9ae3a8 |
--- a/configure
|
|
|
9ae3a8 |
+++ b/configure
|
|
|
9ae3a8 |
@@ -2290,8 +2290,6 @@ EOF
|
|
|
9ae3a8 |
curl_libs=`$curlconfig --libs 2>/dev/null`
|
|
|
9ae3a8 |
if compile_prog "$curl_cflags" "$curl_libs" ; then
|
|
|
9ae3a8 |
curl=yes
|
|
|
9ae3a8 |
- libs_tools="$curl_libs $libs_tools"
|
|
|
9ae3a8 |
- libs_softmmu="$curl_libs $libs_softmmu"
|
|
|
9ae3a8 |
else
|
|
|
9ae3a8 |
if test "$curl" = "yes" ; then
|
|
|
9ae3a8 |
feature_not_found "curl"
|
|
|
9ae3a8 |
@@ -2442,9 +2440,6 @@ if test "$libssh2" != "no" ; then
|
|
|
9ae3a8 |
libssh2_cflags=`$pkg_config libssh2 --cflags`
|
|
|
9ae3a8 |
libssh2_libs=`$pkg_config libssh2 --libs`
|
|
|
9ae3a8 |
libssh2=yes
|
|
|
9ae3a8 |
- libs_tools="$libssh2_libs $libs_tools"
|
|
|
9ae3a8 |
- libs_softmmu="$libssh2_libs $libs_softmmu"
|
|
|
9ae3a8 |
- QEMU_CFLAGS="$QEMU_CFLAGS $libssh2_cflags"
|
|
|
9ae3a8 |
else
|
|
|
9ae3a8 |
if test "$libssh2" = "yes" ; then
|
|
|
9ae3a8 |
error_exit "libssh2 >= $min_libssh2_version required for --enable-libssh2"
|
|
|
9ae3a8 |
@@ -2490,8 +2485,6 @@ int main(void) { io_setup(0, NULL); io_set_eventfd(NULL, 0); eventfd(0, 0); retu
|
|
|
9ae3a8 |
EOF
|
|
|
9ae3a8 |
if compile_prog "" "-laio" ; then
|
|
|
9ae3a8 |
linux_aio=yes
|
|
|
9ae3a8 |
- libs_softmmu="$libs_softmmu -laio"
|
|
|
9ae3a8 |
- libs_tools="$libs_tools -laio"
|
|
|
9ae3a8 |
else
|
|
|
9ae3a8 |
if test "$linux_aio" = "yes" ; then
|
|
|
9ae3a8 |
feature_not_found "linux AIO"
|
|
|
9ae3a8 |
@@ -2644,8 +2637,6 @@ EOF
|
|
|
9ae3a8 |
glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
|
|
|
9ae3a8 |
if compile_prog "" "$glusterfs_libs" ; then
|
|
|
9ae3a8 |
glusterfs=yes
|
|
|
9ae3a8 |
- libs_tools="$glusterfs_libs $libs_tools"
|
|
|
9ae3a8 |
- libs_softmmu="$glusterfs_libs $libs_softmmu"
|
|
|
9ae3a8 |
else
|
|
|
9ae3a8 |
if test "$glusterfs" = "yes" ; then
|
|
|
9ae3a8 |
feature_not_found "GlusterFS backend support"
|
|
|
9ae3a8 |
@@ -3002,11 +2993,9 @@ EOF
|
|
|
9ae3a8 |
libiscsi="yes"
|
|
|
9ae3a8 |
libiscsi_cflags=$($pkg_config --cflags libiscsi 2>/dev/null)
|
|
|
9ae3a8 |
libiscsi_libs=$($pkg_config --libs libiscsi 2>/dev/null)
|
|
|
9ae3a8 |
- CFLAGS="$CFLAGS $libiscsi_cflags"
|
|
|
9ae3a8 |
- LIBS="$LIBS $libiscsi_libs"
|
|
|
9ae3a8 |
elif compile_prog "" "-liscsi" ; then
|
|
|
9ae3a8 |
libiscsi="yes"
|
|
|
9ae3a8 |
- LIBS="$LIBS -liscsi"
|
|
|
9ae3a8 |
+ libiscsi_libs="-liscsi"
|
|
|
9ae3a8 |
else
|
|
|
9ae3a8 |
if test "$libiscsi" = "yes" ; then
|
|
|
9ae3a8 |
feature_not_found "libiscsi"
|
|
|
9ae3a8 |
@@ -3877,6 +3866,7 @@ fi
|
|
|
9ae3a8 |
if test "$curl" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_CURL=y" >> $config_host_mak
|
|
|
9ae3a8 |
echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "CURL_LIBS=$curl_libs" >> $config_host_mak
|
|
|
9ae3a8 |
fi
|
|
|
9ae3a8 |
if test "$brlapi" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_BRLAPI=y" >> $config_host_mak
|
|
|
9ae3a8 |
@@ -3966,6 +3956,8 @@ fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$libiscsi" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_LIBISCSI=y" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "LIBISCSI_CFLAGS=$libiscsi_cflags" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "LIBISCSI_LIBS=$libiscsi_libs" >> $config_host_mak
|
|
|
9ae3a8 |
fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$seccomp" = "yes"; then
|
|
|
9ae3a8 |
@@ -4022,10 +4014,14 @@ fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$glusterfs" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_GLUSTERFS=y" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
|
|
|
9ae3a8 |
fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$libssh2" = "yes" ; then
|
|
|
9ae3a8 |
echo "CONFIG_LIBSSH2=y" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "LIBSSH2_CFLAGS=$libssh2_cflags" >> $config_host_mak
|
|
|
9ae3a8 |
+ echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
|
|
|
9ae3a8 |
fi
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if test "$virtio_blk_data_plane" = "yes" ; then
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.9.3
|
|
|
9ae3a8 |
|