mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 04:18:53 +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>