[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/5] configure: only link capstone to emulation targe
From: |
Daniel P . Berrangé |
Subject: |
[Qemu-devel] [PULL 3/5] configure: only link capstone to emulation targets |
Date: |
Fri, 19 Jul 2019 14:25:47 +0100 |
Only the emulators link to code that uses capstone, so adding it to the
global LIBs places undesirable dependancies on other binaries, in
particular the tools.
There is no variable that covers both user emulation and machine
emulation, so add a new "$libs_cpu" for this purpose.
In particular this removes the 8 MB capstone dep from the things
qemu-img links against, allowing for a more minimal installation
in scenarios that don't want system emulators installed.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
---
Makefile.target | 1 +
configure | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 85216cace8..933b27453a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -120,6 +120,7 @@ obj-$(CONFIG_TCG) += fpu/softfloat.o
obj-y += target/$(TARGET_BASE_ARCH)/
obj-y += disas.o
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
+LIBS := $(libs_cpu) $(LIBS)
#########################################################
# Linux user emulator target
diff --git a/configure b/configure
index eb635c3b9a..99c64be6b7 100755
--- a/configure
+++ b/configure
@@ -294,6 +294,7 @@ audio_drv_list=""
block_drv_rw_whitelist=""
block_drv_ro_whitelist=""
host_cc="cc"
+libs_cpu=""
libs_softmmu=""
libs_tools=""
audio_pt_int=""
@@ -5042,12 +5043,12 @@ case "$capstone" in
else
LIBCAPSTONE=libcapstone.a
fi
- LIBS="-L\$(BUILD_DIR)/capstone -lcapstone $LIBS"
+ libs_cpu="-L\$(BUILD_DIR)/capstone -lcapstone $libs_cpu"
;;
system)
QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags capstone)"
- LIBS="$($pkg_config --libs capstone) $LIBS"
+ libs_cpu="$($pkg_config --libs capstone) $libs_cpu"
;;
no)
@@ -6537,6 +6538,7 @@ echo "qemu_helperdir=$libexecdir" >> $config_host_mak
echo "qemu_localedir=$qemu_localedir" >> $config_host_mak
echo "qemu_icondir=$qemu_icondir" >> $config_host_mak
echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak
+echo "libs_cpu=$libs_cpu" >> $config_host_mak
echo "libs_softmmu=$libs_softmmu" >> $config_host_mak
echo "GIT=$git" >> $config_host_mak
echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak
--
2.21.0
- [Qemu-devel] [PULL 0/5] Misc next patches, Daniel P . Berrangé, 2019/07/19
- [Qemu-devel] [PULL 1/5] crypto: switch to modern nettle AES APIs, Daniel P . Berrangé, 2019/07/19
- [Qemu-devel] [PULL 2/5] crypto: fix function signatures for nettle 2.7 vs 3, Daniel P . Berrangé, 2019/07/19
- [Qemu-devel] [PULL 3/5] configure: only link capstone to emulation targets,
Daniel P . Berrangé <=
- [Qemu-devel] [PULL 4/5] doc: document that the monitor console is a privileged control interface, Daniel P . Berrangé, 2019/07/19
- [Qemu-devel] [PULL 5/5] crypto: Fix LGPL information in the file headers, Daniel P . Berrangé, 2019/07/19
- Re: [Qemu-devel] [PULL 0/5] Misc next patches, Peter Maydell, 2019/07/19