[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 05/30] configure: fix the --enable-static --disable-pie case
From: |
Alex Bennée |
Subject: |
[PATCH v4 05/30] configure: fix the --enable-static --disable-pie case |
Date: |
Thu, 27 Oct 2022 19:36:11 +0100 |
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>
---
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
- [PATCH v4 07/30] tests/docker: Add flex/bison to `debian-hexagon-cross`, (continued)
- [PATCH v4 07/30] tests/docker: Add flex/bison to `debian-hexagon-cross`, Alex Bennée, 2022/10/27
- [PATCH v4 04/30] configure: don't enable cross compilers unless in target_list, Alex Bennée, 2022/10/27
- [PATCH v4 03/30] tests/docker: Add flex/bison to `debian-all-test`, Alex Bennée, 2022/10/27
- [PATCH v4 09/30] tests/tcg/nios2: Tweak 10m50-ghrd.ld, Alex Bennée, 2022/10/27
- [PATCH v4 10/30] semihosting/arm-compat-semi: Avoid using hardcoded /tmp, Alex Bennée, 2022/10/27
- [PATCH v4 08/30] tests/tcg: use regular semihosting for nios2-softmmu, Alex Bennée, 2022/10/27
- [PATCH v4 01/30] tests/docker: update fedora-win[32|64]-cross with lcitool, Alex Bennée, 2022/10/27
- [PATCH v4 02/30] tests/docker: update test-mingw to run single build, Alex Bennée, 2022/10/27
- [PATCH v4 14/30] hw/usb: dev-mtp: Use g_mkdir(), Alex Bennée, 2022/10/27
- [PATCH v4 12/30] util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary files, Alex Bennée, 2022/10/27
- [PATCH v4 05/30] configure: fix the --enable-static --disable-pie case,
Alex Bennée <=
- [PATCH v4 11/30] tcg: Avoid using hardcoded /tmp, Alex Bennée, 2022/10/27
- [PATCH v4 21/30] tests/tcg: re-enable linux-test for sh4, Alex Bennée, 2022/10/27
- [PATCH v4 06/30] tests/avocado: extend the timeout for x86_64 tcg tests, Alex Bennée, 2022/10/27
- [PATCH v4 13/30] block/vvfat: Unify the mkdir() call, Alex Bennée, 2022/10/27
- [PATCH v4 22/30] tests/tcg: re-enable threadcount for sh4, Alex Bennée, 2022/10/27
- [PATCH v4 26/30] tests/tcg: include CONFIG_PLUGIN in config-host.mak, Alex Bennée, 2022/10/27
- [PATCH v4 16/30] MAINTAINERS: add features_to_c.sh to gdbstub files, Alex Bennée, 2022/10/27
- [PATCH v4 23/30] target/s390x: don't use ld_code2 to probe next pc, Alex Bennée, 2022/10/27
- [PATCH v4 20/30] tests/avocado: disable sh4 rd2 tests on Gitlab, Alex Bennée, 2022/10/27
- [PATCH v4 15/30] MAINTAINERS: add entries for the key build bits, Alex Bennée, 2022/10/27