summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorAlex Bennée2022-10-27 20:36:11 +0200
committerAlex Bennée2022-10-31 21:37:58 +0100
commit977cccb8451ecf0fd60388aec95dc9c1ab35afc8 (patch)
tree5b4a6cf4c9004aff2865d028c5fef8758976406e /configure
parentconfigure: don't enable cross compilers unless in target_list (diff)
downloadqemu-977cccb8451ecf0fd60388aec95dc9c1ab35afc8.tar.gz
qemu-977cccb8451ecf0fd60388aec95dc9c1ab35afc8.tar.xz
qemu-977cccb8451ecf0fd60388aec95dc9c1ab35afc8.zip
configure: fix the --enable-static --disable-pie case
The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221027183637.2772968-6-alex.bennee@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index dd6f58dcde..8c2c4c1a04 100755
--- a/configure
+++ b/configure
@@ -1327,6 +1327,8 @@ static THREAD int tls_var;
int main(void) { return tls_var; }
EOF
+# 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 "$static" = "yes"; then
if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then
CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
@@ -1335,13 +1337,12 @@ if test "$static" = "yes"; then
error_exit "-static-pie not available due to missing toolchain support"
else
pie="no"
+ QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS"
fi
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