All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 07/20] meson: use b_staticpic=false for meson >=0.56.0
Date: Wed,  4 Nov 2020 10:01:40 -0500	[thread overview]
Message-ID: <20201104150153.541326-8-pbonzini@redhat.com> (raw)
In-Reply-To: <20201104150153.541326-1-pbonzini@redhat.com>

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>
---
 configure   | 6 +++++-
 meson.build | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 2c3c69f118..c87c1dfbf3 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 \
diff --git a/meson.build b/meson.build
index 39ac5cf6d8..f5175010df 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
 project('qemu', ['c'], meson_version: '>=0.55.0',
-        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11',
-                          'b_colorout=auto'],
+        default_options: ['warning_level=1', 'c_std=gnu99', 'cpp_std=gnu++11', 'b_colorout=auto'] +
+                         (meson.version().version_compare('>=0.56.0') ? [ 'b_staticpic=false' ] : []),
         version: run_command('head', meson.source_root() / 'VERSION').stdout().strip())
 
 not_found = dependency('', required: false)
-- 
2.26.2




  parent reply	other threads:[~2020-11-04 15:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 15:01 [PULL 00/20] Misc patches for QEMU 5.2-rc1 Paolo Bonzini
2020-11-04 15:01 ` [PULL 01/20] cutils: replace strdup with g_strdup Paolo Bonzini
2020-11-04 15:01 ` [PULL 02/20] docs: expand sourceset documentation Paolo Bonzini
2020-11-04 15:01 ` [PULL 03/20] exec: Remove dead code (CID 1432876) Paolo Bonzini
2020-11-04 15:01 ` [PULL 04/20] scripts/oss-fuzz: rename bin/qemu-fuzz-i386 Paolo Bonzini
2020-11-04 15:01 ` [PULL 05/20] hw/isa/lpc_ich9: Ignore reserved/invalid SCI IRQ Paolo Bonzini
2020-11-04 15:01 ` [PULL 06/20] qtest: add a reproducer for LP#1878642 Paolo Bonzini
2020-11-04 15:01 ` Paolo Bonzini [this message]
2020-11-04 15:01 ` [PULL 08/20] meson: vhost-user-gpu/virtiofsd: use absolute path Paolo Bonzini
2020-11-04 15:01 ` [PULL 09/20] tests/qtest/libqtest.c: Check for setsockopt() failure Paolo Bonzini
2020-11-04 15:01 ` [PULL 10/20] tests/qtest/libqos/ahci.c: Avoid NULL dereference in ahci_exec() Paolo Bonzini
2020-11-04 15:01 ` [PULL 11/20] meson: fix warning for bad sphinx-build Paolo Bonzini
2020-11-04 15:01 ` [PULL 12/20] configure: fix gio_libs reference Paolo Bonzini
2020-11-04 15:01 ` [PULL 13/20] tests/qtest: Fix potential NULL pointer dereference in qos_build_main_args() Paolo Bonzini
2020-11-04 15:01 ` [PULL 14/20] fuzz: fix writing DMA patterns Paolo Bonzini
2020-11-04 15:01 ` [PULL 15/20] fuzz: check the MR in the DMA callback Paolo Bonzini
2020-11-04 15:01 ` [PULL 16/20] fuzz: fuzz offsets within pio/mmio regions Paolo Bonzini
2020-11-04 15:01 ` [PULL 17/20] semihosting: fix order of initialization functions Paolo Bonzini
2020-11-04 15:01 ` [PULL 18/20] qapi, qemu-options: make all parsing visitors parse boolean options the same Paolo Bonzini
2020-11-04 15:01 ` [PULL 19/20] ivshmem-test: do not use short-form boolean option Paolo Bonzini
2020-11-04 15:01 ` [PULL 20/20] qtest: escape device name in device-introspect-test Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104150153.541326-8-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.