aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-19 06:56:16 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-03 09:42:53 -0500
commita5cb7c5afe717d42ae8845cd4b8805ea17b3f64d (patch)
tree58814855691a9927ff92bc0017d0e6036200cab1 /configure
parentfd250172842b3bbd4213242eb83bd5fa989f7381 (diff)
downloadqemu-a5cb7c5afe717d42ae8845cd4b8805ea17b3f64d.zip
qemu-a5cb7c5afe717d42ae8845cd4b8805ea17b3f64d.tar.gz
qemu-a5cb7c5afe717d42ae8845cd4b8805ea17b3f64d.tar.bz2
meson: use b_staticpic=false for meson >=0.56.0
Meson 0.56.0 correctly builds non-PIC static libraries with -fPIE if b_pie=true. We do not have to pass b_staticpic=true if PIE is requested if Meson is new-enough, which improves performance. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure b/configure
index 2c3c69f..c87c1df 100755
--- a/configure
+++ b/configure
@@ -6961,6 +6961,10 @@ fi
mv $cross config-meson.cross
rm -rf meson-private meson-info meson-logs
+unset staticpic
+if ! version_ge "$($meson --version)" 0.56.0; then
+ staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi)
+fi
NINJA=$ninja $meson setup \
--prefix "$prefix" \
--libdir "$libdir" \
@@ -6980,7 +6984,7 @@ NINJA=$ninja $meson setup \
-Dwerror=$(if test "$werror" = yes; then echo true; else echo false; fi) \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
- -Db_staticpic=$(if test "$pie" = yes; then echo true; else echo false; fi) \
+ ${staticpic:+-Db_staticpic=$staticpic} \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
-Dmalloc=$malloc -Dmalloc_trim=$malloc_trim -Dsparse=$sparse \
-Dkvm=$kvm -Dhax=$hax -Dwhpx=$whpx -Dhvf=$hvf \