qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 18/30] configure: explicitly set cflags for --disable-pie


From: Alex Bennée
Subject: [PATCH v2 18/30] configure: explicitly set cflags for --disable-pie
Date: Wed, 14 Sep 2022 16:59:38 +0100

This is working around current limitation of Meson's handling of
--disable-pie.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure b/configure
index 575dde1c1f..6c169b23b5 100755
--- a/configure
+++ b/configure
@@ -1394,6 +1394,12 @@ else
   pie="no"
 fi
 
+# Meson currently only handles pie as a boolean for now so if we have
+# explicitly disabled PIE we need to extend our cflags because it wont.
+if test "$pie" = "no"; then
+    QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
+fi
+
 # Detect support for PT_GNU_RELRO + DT_BIND_NOW.
 # The combination is known as "full relro", because .got.plt is read-only too.
 if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then
-- 
2.34.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]