* [PATCH] configure: cleanup -fno-pie detection
@ 2022-06-14 14:50 Paolo Bonzini
2022-06-14 16:55 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2022-06-14 14:50 UTC (permalink / raw)
To: qemu-devel
Place it only inside the 'if test "$pie" = "no"' conditional.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index f3dcbd10c3..e2b64334b5 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] configure: cleanup -fno-pie detection
2022-06-14 14:50 [PATCH] configure: cleanup -fno-pie detection Paolo Bonzini
@ 2022-06-14 16:55 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2022-06-14 16:55 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
On 6/14/22 07:50, Paolo Bonzini wrote:
> Place it only inside the 'if test "$pie" = "no"' conditional.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
Worth mentioning 43924d1e53f, which obviated...
> -# 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.
... this comment.
Either "Fixes:" or just in the text, "Since XXX, we no longer require this probe for
building ROMs".
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-14 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-14 14:50 [PATCH] configure: cleanup -fno-pie detection Paolo Bonzini
2022-06-14 16:55 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).