configure: cleanup -fno-pie detection
PATCH 1/1 configure: cleanup -fno-pie detection
Place it only inside the 'if test "$pie" = "no"' conditional.
Signed-off-by Paolo Bonzini <[email protected]>
--- configure | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
configure +4 -9
@@ -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"
Signature · 1 line
2.36.1
Quoted 6 lines · Paolo Bonzini
Place it only inside the 'if test "$pie" = "no"' conditional.
Signed-off-by Paolo Bonzini <[email protected]>--- configure | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
Worth mentioning 43924d1e53f, which obviated...
configure static THREAD int tls_var; · line 1350
Quoted 2 lines
configure +0
-2-# 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 <[email protected]>
r~