655e2a778d
Say QEMU is configured with bindir = "/usr/bin" and a firmware path that starts with "/usr/share/qemu". Ever since QEMU 5.2, QEMU's install has been relocatable: if you move qemu-system-x86_64 from /usr/bin to /home/username/bin, it will start looking for firmware in /home/username/share/qemu. Previously, you would get a non-relocatable install where the moved QEMU will keep looking for firmware in /usr/share/qemu. Windows almost always wants relocatable installs, and in fact that is why QEMU 5.2 introduced relocatability in the first place. However, newfangled distribution mechanisms such as AppImage (https://docs.appimage.org/reference/best-practices.html), and possibly NixOS, also dislike using at runtime the absolute paths that were established at build time. On POSIX systems you almost never care; if you do, your usecase dictates which one is desirable, so there's no single answer. Obviously relocatability works fine most of the time, because not many people have complained about QEMU's switch to relocatable install, and that's why until now there was no way to disable relocatability. But a non-relocatable, non-modular binary can help if you want to do experiments with old firmware and new QEMU or vice versa (because you can just upgrade/downgrade the firmware package, and use rpm2cpio or similar to extract the QEMU binaries outside /usr), so allow both. This patch allows one to build a non-relocatable install using a new option to configure. Why? Because it's not too hard, and because it helps the user double check the relocatability of their install. Note that the same code that handles relocation also lets you run QEMU from the build tree and pick e.g. firmware files from the source tree transparently. Therefore that part remains active with this patch, even if you configure with --disable-relocatable. Suggested-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
ci | ||
coccinelle | ||
codeconverter | ||
coverage | ||
coverity-scan | ||
kvm | ||
modules | ||
oss-fuzz | ||
performance | ||
qapi | ||
qemu-guest-agent | ||
qemugdb | ||
qmp | ||
simplebench | ||
tracetool | ||
analyse-9p-simpletrace.py | ||
analyse-locks-simpletrace.py | ||
analyze-inclusions | ||
analyze-migration.py | ||
archive-source.sh | ||
block-coroutine-wrapper.py | ||
check_sparse.py | ||
checkpatch.pl | ||
clean-header-guards.pl | ||
clean-includes | ||
cleanup-trace-events.pl | ||
cocci-macro-file.h | ||
cpu-x86-uarch-abi.py | ||
decodetree.py | ||
device-crash-test | ||
disas-objdump.pl | ||
dump-guest-memory.py | ||
entitlement.sh | ||
extract-vsssdk-headers | ||
feature_to_c.py | ||
fix-multiline-comments.sh | ||
gensyscalls.sh | ||
get_maintainer.pl | ||
git-submodule.sh | ||
git.orderfile | ||
hxtool | ||
kernel-doc | ||
make-config-poison.sh | ||
make-release | ||
meson-buildoptions.py | ||
meson-buildoptions.sh | ||
meson.build | ||
minikconf.py | ||
modinfo-collect.py | ||
modinfo-generate.py | ||
mtest2make.py | ||
nsis.py | ||
probe-gdb-support.py | ||
python_qmp_updater.py | ||
qapi-gen.py | ||
qemu-binfmt-conf.sh | ||
qemu-gdb.py | ||
qemu-stamp.py | ||
qemu-trace-stap | ||
qemu-version.sh | ||
qom-cast-macro-clean-cocci-gen.py | ||
refresh-pxe-roms.sh | ||
render_block_graph.py | ||
replay-dump.py | ||
shaderinclude.py | ||
signrom.py | ||
simpletrace.py | ||
symlink-install-tree.py | ||
tracetool.py | ||
u2f-setup-gen.py | ||
undefsym.py | ||
update-linux-headers.sh | ||
update-mips-syscall-args.sh | ||
update-syscalltbl.sh | ||
userfaultfd-wrlat.py | ||
vmstate-static-checker.py | ||
xen-detect.c | ||
xml-preprocess-test.py | ||
xml-preprocess.py |