On Tue, May 23, 2023 at 10:18 AM Daniel P. Berrangé <berra...@redhat.com> wrote: > > The issue is that Meson only has "enable PIE" or "leave PIE to the > > compiler default", while QEMU also has "disable PIE"---which is the > > messy one. > > Does QEMU actually need "disable PIE" ? It existed in configure of > course, is there a reason we need to continue to support it in meson ?
We have "disable PIE" support because PIE has a performance cost, though that's mostly for 32-bit x86 processors. Other ISAs have instructions that help (like x86-64's RIP-relative addressing, aarch64's adr/adrp, or RISC-V's auipc) and then position-independent code becomes the natural one anyway. However, I am inclined to keep it also because "--disable-pie uses the compiler default, and who knows what your distro did" is less obvious than "--disable-pie disables PIE". Paolo