OSDN Git Service

configure: explicitly set cflags for --disable-pie
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 14 Sep 2022 15:59:38 +0000 (16:59 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 20 Sep 2022 16:22:04 +0000 (17:22 +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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220914155950.804707-19-alex.bennee@linaro.org>

configure

index 575dde1..0bbf9d2 100755 (executable)
--- a/configure
+++ b/configure
@@ -1382,6 +1382,9 @@ elif test "$pie" = "no"; then
   if compile_prog "-Werror -fno-pie" "-no-pie"; then
     CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS"
     CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS"
+    # 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.
+    QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
   fi
 elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
   CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"