[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first |
Date: |
Wed, 4 Sep 2019 21:30:00 +0100 |
For whatever reason this doesn't trigger normally but because
compile_prog uses QEMU_CFLAGS we end up trying to build a -pie
--no-pie build which confuses compilers on some non-x86 hosts.
Signed-off-by: Alex Bennée <address@hidden>
---
configure | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 7860bbc3121..30aad233d17 100755
--- a/configure
+++ b/configure
@@ -2021,6 +2021,12 @@ static THREAD int tls_var;
int main(void) { return tls_var; }
EOF
+ # check we support --no-pie first...
+ if compile_prog "-Werror -fno-pie" "-no-pie"; then
+ CFLAGS_NOPIE="-fno-pie"
+ LDFLAGS_NOPIE="-nopie"
+ fi
+
if compile_prog "-fPIE -DPIE" "-pie"; then
QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS"
LDFLAGS="-pie $LDFLAGS"
@@ -2036,11 +2042,6 @@ EOF
pie="no"
fi
fi
-
- if compile_prog "-Werror -fno-pie" "-nopie"; then
- CFLAGS_NOPIE="-fno-pie"
- LDFLAGS_NOPIE="-nopie"
- fi
fi
##########################################
--
2.20.1
- [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script, (continued)
- [Qemu-devel] [PATCH v1 06/42] tests/tcg: move configuration to a sub-shell script, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 10/42] tests/docker: add Buster to DOCKER_PARTIAL_IMAGES, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 04/42] tests/tcg: use EXTRA_CFLAGS everywhere, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 30/42] .travis.yml: Enable multiple caching features, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 05/42] tests/tcg: cleanup Makefile inclusions, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 14/42] tests/docker: move our HPPA cross compile to Buster, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 07/42] tests/tcg: add .gitignore for in source builds, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 29/42] configure: check if --no-pie is supported first,
Alex Bennée <=
- [Qemu-devel] [PATCH v1 08/42] tests/docker: move DEF_TARGET_LIST setting to common.rc, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 11/42] tests/docker: move our arm64 cross compile to Buster, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 15/42] tests/docker: move our m68k cross compile to Buster, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 09/42] tests/docker: set DEF_TARGET_LIST for some containers, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 13/42] tests/docker: move our Alpha cross compile to Buster, Alex Bennée, 2019/09/04
- [Qemu-devel] [PATCH v1 19/42] tests/docker: move our riscv64 cross compile to Buster, Alex Bennée, 2019/09/04