[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 05/26] configure: fix the --enable-static --disable-pie case
From: |
Alex Bennée |
Subject: |
[PATCH v3 05/26] configure: fix the --enable-static --disable-pie case |
Date: |
Thu, 20 Oct 2022 12:51:48 +0100 |
The previous tweak was incomplete as it missed a leg.
Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configure | 5 +++--
1 file 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
--
2.34.1
- Re: [PATCH v3 03/26] tests/docker: Add flex/bison to `debian-all-test`, (continued)
- [PATCH v3 14/26] hw/usb: dev-mtp: Use g_mkdir(), Alex Bennée, 2022/10/20
- [PATCH v3 12/26] block/vvfat: Unify the mkdir() call, Alex Bennée, 2022/10/20
- [PATCH v3 18/26] tests/avocado: set -machine none for userfwd and vnc tests, Alex Bennée, 2022/10/20
- [PATCH v3 01/26] tests/docker: update fedora-win[32|64]-cross with lcitool, Alex Bennée, 2022/10/20
- [PATCH v3 05/26] configure: fix the --enable-static --disable-pie case,
Alex Bennée <=
- [PATCH v3 22/26] tests/tcg: re-enable threadcount for sh4, Alex Bennée, 2022/10/20
- [PATCH v3 17/26] MAINTAINERS: fix-up for check-tcg Makefile changes, Alex Bennée, 2022/10/20
- [PATCH v3 26/26] tests/tcg: include CONFIG_PLUGIN in config-host.mak, Alex Bennée, 2022/10/20
- [PATCH v3 25/26] target/s390x: fake instruction loading when handling 'ex', Alex Bennée, 2022/10/20