[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/21] configure: cleanup -fno-pie detection
From: |
Paolo Bonzini |
Subject: |
[PULL 16/21] configure: cleanup -fno-pie detection |
Date: |
Thu, 16 Jun 2022 10:32:04 +0200 |
Place it only inside the 'if test "$pie" = "no"' conditional. Since
commit 43924d1e53 ("pc-bios/optionrom: detect -fno-pie", 2022-05-12),
the PIE options are detected independently by pc-bios/optionrom/Makefile,
and the CFLAGS_NOPIE/LDFLAGS_NOPIE variables are not used anymore.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index d41c7eddff..9fba134746 100755
--- a/configure
+++ b/configure
@@ -1346,13 +1346,6 @@ static THREAD int tls_var;
int main(void) { return tls_var; }
EOF
-# Check we support -fno-pie and -no-pie first; we will need the former for
-# building ROMs, and both for everything if --disable-pie is passed.
-if compile_prog "-Werror -fno-pie" "-no-pie"; then
- CFLAGS_NOPIE="-fno-pie"
- LDFLAGS_NOPIE="-no-pie"
-fi
-
if test "$static" = "yes"; then
if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie";
then
CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
@@ -1365,8 +1358,10 @@ if test "$static" = "yes"; then
pie="no"
fi
elif test "$pie" = "no"; then
- CONFIGURE_CFLAGS="$CFLAGS_NOPIE $CONFIGURE_CFLAGS"
- CONFIGURE_LDFLAGS="$LDFLAGS_NOPIE $CONFIGURE_LDFLAGS"
+ if compile_prog "-Werror -fno-pie" "-no-pie"; then
+ CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS"
+ CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS"
+ fi
elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS"
--
2.36.1
- [PULL 06/21] qmp: add filtering of statistics by provider, (continued)
- [PULL 06/21] qmp: add filtering of statistics by provider, Paolo Bonzini, 2022/06/16
- [PULL 01/21] qmp: Support for querying stats, Paolo Bonzini, 2022/06/16
- [PULL 07/21] hmp: add filtering of statistics by provider, Paolo Bonzini, 2022/06/16
- [PULL 10/21] block: add more commands to preconfig mode, Paolo Bonzini, 2022/06/16
- [PULL 11/21] s390x: simplify virtio_ccw_reset_virtio, Paolo Bonzini, 2022/06/16
- [PULL 12/21] virtio-mmio: stop ioeventfd on legacy reset, Paolo Bonzini, 2022/06/16
- [PULL 13/21] virtio: stop ioeventfd on reset, Paolo Bonzini, 2022/06/16
- [PULL 15/21] configure: update list of preserved environment variables, Paolo Bonzini, 2022/06/16
- [PULL 18/21] build: fix check for -fsanitize-coverage-allowlist, Paolo Bonzini, 2022/06/16
- [PULL 14/21] virtio-mmio: cleanup reset, Paolo Bonzini, 2022/06/16
- [PULL 16/21] configure: cleanup -fno-pie detection,
Paolo Bonzini <=
- [PULL 17/21] tests/vm: allow running tests in an unconfigured source tree, Paolo Bonzini, 2022/06/16
- [PULL 20/21] meson: put cross compiler info in a separate section, Paolo Bonzini, 2022/06/16
- [PULL 21/21] build: include pc-bios/ part in the ROMS variable, Paolo Bonzini, 2022/06/16
- [PULL 19/21] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled, Paolo Bonzini, 2022/06/16
- Re: [PULL 00/21] Statistics, preconfig and cleanup patches for 2022-06-16, Richard Henderson, 2022/06/16