qemu: Fix aarch64 build

Building static binaries for aarch64 requires disabling PIE
We get an GOT overflow and the OS libraries are only build with fpic
and not with fPIC which enables unlimited sized GOT tables.

Signed-off-by: Zvonko Kaiser <zkaiser@nvidia.com>
This commit is contained in:
Zvonko Kaiser 2024-12-18 01:10:59 +00:00
parent 39bf10875b
commit 07d2b00863

View File

@ -411,6 +411,13 @@ generate_qemu_options() {
qemu_options+=(size:--disable-libdaxctl) qemu_options+=(size:--disable-libdaxctl)
qemu_options+=(size:--disable-oss) qemu_options+=(size:--disable-oss)
# Building static binaries for aarch64 requires disabling PIE
# We get an GOT overflow and the OS libraries are only build with fpic
# and not with fPIC which enables unlimited sized GOT tables.
if [ "${static}" == "true" ] && [ "${arch}" == "aarch64" ]; then
qemu_options+=(arch:"--disable-pie")
fi
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Enabled options # Enabled options