mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 03:48:45 +00:00
We explicitely set the Postion Independant Executlable (PIE) options in the extra CFLAGS and LDFLAGS that are passed to the QEMU configure script for all archs. This means that these options are used pretty much everywhere, including when building the sample plugins under the test directory. These cannot be linked with -pie and break the build, as experienced recently on ARM (see PR #2732). This only broke on ARM because other archs are configured with --disable-tcg : this disables plugins which are built by default otherwise. The --enable-pie option is all that is needed. The QEMU build system knows which binaries should be created as PIE, e.g. the important bits like QEMU and virtiofsd, and which ones should not, e.g. the sample plugins that aren't used in production. Rely on --enable-pie only, for all archs. This allows to drop the workaround that was put in place in PR #2732. Fixes: #2757 Signed-off-by: Greg Kurz <groug@kaod.org>
Packaging scripts
This directory contains useful packaging scripts.
configure-hypervisor.sh
This script generates the official set of QEMU-based hypervisor build configuration options. All repositories that need to build a hypervisor from source MUST use this script to ensure the hypervisor is built in a known way since using a different set of options can impact many areas including performance, memory footprint and security.
Example usage:
$ configure-hypervisor.sh qemu