提交 a320730a 编写于 作者: J Jincheng Miao 提交者: Eric Blake

build: fix qemuagenttest build with -O0 in fedora 19.

When building libvirt with -O0 flag in fedora 19, it will fail to
generate qemuagenttest, a link error occurs like:

./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestFree':
libvirt/tests/qemumonitortestutils.c:346: undefined reference to `qemuMonitorClose'
./.libs/libqemumonitortestutils.a(qemumonitortestutils.o): In function `qemuMonitorTestNew':
libvirt/tests/qemumonitortestutils.c:870: undefined reference to `qemuMonitorOpen'
collect2: error: ld returned 1 exit status

Fix it by listing libraries in the correct order to avoid lazy linkage.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 13c57374
......@@ -417,21 +417,21 @@ qemumonitorjsontest_SOURCES = \
testutils.c testutils.h \
testutilsqemu.c testutilsqemu.h \
$(NULL)
qemumonitorjsontest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
qemumonitorjsontest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
qemuagenttest_SOURCES = \
qemuagenttest.c \
testutils.c testutils.h \
testutilsqemu.c testutilsqemu.h \
$(NULL)
qemuagenttest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
qemuagenttest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
qemuhotplugtest_SOURCES = \
qemuhotplugtest.c \
testutils.c testutils.h \
testutilsqemu.c testutilsqemu.h \
$(NULL)
qemuhotplugtest_LDADD = $(qemu_LDADDS) libqemumonitortestutils.la
qemuhotplugtest_LDADD = libqemumonitortestutils.la $(qemu_LDADDS)
domainsnapshotxml2xmltest_SOURCES = \
domainsnapshotxml2xmltest.c testutilsqemu.c testutilsqemu.h \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册