buildsys: Move rdma libs to per object
PATCH 1/1 buildsys: Move rdma libs to per object
--- configure | 2 +- migration/Makefile.objs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
configure +1 -1
@@ -2818,7 +2818,6 @@ EOF rdma_libs="-lrdmacm -libverbs" if compile_prog "" "$rdma_libs" ; then rdma="yes" - libs_softmmu="$libs_softmmu $rdma_libs" else if test "$rdma" = "yes" ; then error_exit \
@@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi if test "$have_rtnetlink" = "yes" ; then
migration/Makefile.objs +1 -0
@@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o +rdma.o-libs := $(RDMA_LIBS)
Signature · 1 line
2.13.5
Quoted 1 line · * Fam Zheng ([email protected]) wrote:
Signed-off-by Fam Zheng <[email protected]>
OK, I've not actually got a preference as to whether it's per-object or not - I don't really see any advantage.
But since it doesn't look like it'll break it;
Quoted 37 lines
--- configure | 2 +- migration/Makefile.objs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)configure +1
-1@@ -2818,7 +2818,6 @@ EOF rdma_libs="-lrdmacm -libverbs" if compile_prog "" "$rdma_libs" ; then rdma="yes" - libs_softmmu="$libs_softmmu $rdma_libs" else if test "$rdma" = "yes" ; then error_exit \@@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi if test "$have_rtnetlink" = "yes" ; thenmigration/Makefile.objs +1
-0@@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o +rdma.o-libs := $(RDMA_LIBS)Signature · 1 line
2.13.5
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 1 line · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>
Quoted 37 lines
--- configure | 2 +- migration/Makefile.objs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)configure +1
-1@@ -2818,7 +2818,6 @@ EOF rdma_libs="-lrdmacm -libverbs" if compile_prog "" "$rdma_libs" ; then rdma="yes" - libs_softmmu="$libs_softmmu $rdma_libs" else if test "$rdma" = "yes" ; then error_exit \@@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi if test "$have_rtnetlink" = "yes" ; thenmigration/Makefile.objs +1
-0@@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o +rdma.o-libs := $(RDMA_LIBS)Signature · 1 line
2.13.5
Signature · 1 line
Peter Xu
Quoted 5 lines · Dr. David Alan Gilbert
Quoted 1 line · * Fam Zheng ([email protected]) wrote:
Signed-off-by Fam Zheng <[email protected]>OK, I've not actually got a preference as to whether it's per-object or not - I don't really see any advantage.
Thanks for the review. You're right this probably doesn't make a difference except for a bit more consistency, until we want to make rdma a module (as in --enable-modules) like the ones in block layer. The -libs and -cflags variables were initially added just for that.
While we are talking about it, is there any reason why that will not be a good idea? There are other libraries used by QEMU outside block layer that are overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a candidate too.
Fam
Quoted 12 lines · * Fam Zheng ([email protected]) wrote:
Quoted 5 lines · Dr. David Alan Gilbert
Quoted 1 line · * Fam Zheng ([email protected]) wrote:
Signed-off-by Fam Zheng <[email protected]>OK, I've not actually got a preference as to whether it's per-object or not - I don't really see any advantage.
Thanks for the review. You're right this probably doesn't make a difference except for a bit more consistency, until we want to make rdma a module (as in --enable-modules) like the ones in block layer. The -libs and -cflags variables were initially added just for that.
Quoted 4 lines
While we are talking about it, is there any reason why that will not be a good idea? There are other libraries used by QEMU outside block layer that are overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a candidate too.
I don't think we've ever tried to make the migration code modular; it probably wouldn't be impossible to split it out - it's wired into a few places but it should be doable.
Dave
Quoted 1 line
Fam
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK
Quoted 1 line · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>
Quoted 34 lines
--- configure | 2 +- migration/Makefile.objs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)configure +1
-1@@ -2818,7 +2818,6 @@ EOF rdma_libs="-lrdmacm -libverbs" if compile_prog "" "$rdma_libs" ; then rdma="yes" - libs_softmmu="$libs_softmmu $rdma_libs" else if test "$rdma" = "yes" ; then error_exit \@@ -6035,6 +6034,7 @@ echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak if test "$rdma" = "yes" ; then echo "CONFIG_RDMA=y" >> $config_host_mak + echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak fi if test "$have_rtnetlink" = "yes" ; thenmigration/Makefile.objs +1
-0@@ -11,3 +11,4 @@ common-obj-$(CONFIG_RDMA) += rdma.o common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o +rdma.o-libs := $(RDMA_LIBS)
Quoted 12 lines · Fam Zheng
Quoted 5 lines · Dr. David Alan Gilbert
Quoted 1 line · * Fam Zheng ([email protected]) wrote:
Signed-off-by Fam Zheng <[email protected]>OK, I've not actually got a preference as to whether it's per-object or not - I don't really see any advantage.
Thanks for the review. You're right this probably doesn't make a difference except for a bit more consistency, until we want to make rdma a module (as in --enable-modules) like the ones in block layer. The -libs and -cflags variables were initially added just for that.
Quoted 4 lines
While we are talking about it, is there any reason why that will not be a good idea? There are other libraries used by QEMU outside block layer that are overdue to be converted to modules, like ui (gtk, sdl, etc.), rdma seems to be a candidate too.
Since we have per-module flags, it makes sense to use them whereever it is reasonable todo so. The global flags should only be needed for things which are truely globally used, which is (almost) only glib2.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 1 line · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>
I will include this in a coming pull request. Thanks.
Fam