All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Weil <sw@weilnetz.de>, Stefano Garzarella <sgarzare@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Regressions in build process introduced since August
Date: Mon, 23 Nov 2020 16:28:06 +0100	[thread overview]
Message-ID: <9ccb03ba-32ed-be75-4c12-ad68cf00aa88@redhat.com> (raw)
In-Reply-To: <496e409e-533a-74fb-c4f7-8b394452d0be@weilnetz.de>

On 23/11/20 15:40, Stefan Weil wrote:
> The Meson checks obviously don't use those flags.

Indeed they don't.  For 0.56 however something like this should be doable:

diff --git a/meson.build b/meson.build
index 5062407c70..25940f8de7 100644
--- a/meson.build
+++ b/meson.build
@@ -107,6 +107,22 @@ 
add_project_arguments(config_host['QEMU_CXXFLAGS'].split(),
  add_project_link_arguments(config_host['QEMU_LDFLAGS'].split(),
                             native: false, language: ['c', 'cpp', 'objc'])

+include_args = []
+library_dirs = []
+foreach arg : config_host['QEMU_CFLAGS'].split() + 
config_host['QEMU_LDFLAGS'].split()
+  if arg.startswith('-I')
+    include_args += arg
+  endif
+  if arg.startswith('-L')
+    library_dirs = arg.substring(2)
+  endif
+endif
+find_library_args = {
+  'static': enable_static,
+  'header_args': include_args,
+  'dirs': library_dirs
+}
+
  if targetos == 'linux'
    add_project_arguments('-isystem', meson.current_source_dir() / 
'linux-headers',
                          '-isystem', 'linux-headers',
  @@ -656,10 +672,10 @@ if get_option('vnc').enabled()
                     method: 'pkg-config', static: enable_static)
    jpeg = cc.find_library('jpeg', has_headers: ['jpeglib.h'],
                           required: get_option('vnc_jpeg'),
-                         static: enable_static)
+                         kwargs: find_library_args)
    sasl = cc.find_library('sasl2', has_headers: ['sasl/sasl.h'],
                           required: get_option('vnc_sasl'),
-                         static: enable_static)
+                         kwargs: find_library_args)
    if sasl.found()
      sasl = declare_dependency(dependencies: sasl,
                                compile_args: '-DSTRUCT_IOVEC_DEFINED')

Paolo



  reply	other threads:[~2020-11-23 15:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 10:57 Regressions in build process introduced since August Stefan Weil
2020-11-17 17:50 ` Stefano Garzarella
2020-11-17 18:01   ` Paolo Bonzini
2020-11-17 19:57     ` Stefan Weil
2020-11-21 10:25     ` Stefan Weil
2020-11-21 11:09       ` Stefan Weil
2020-11-21 11:25         ` Stefan Weil
2020-11-21 11:31           ` Paolo Bonzini
2020-11-23 13:55         ` Paolo Bonzini
2020-11-23 14:40           ` Stefan Weil
2020-11-23 15:28             ` Paolo Bonzini [this message]
2020-11-23 15:28             ` Daniel P. Berrangé
2020-11-23 15:41               ` Daniel P. Berrangé
2020-11-23 16:20                 ` Paolo Bonzini
2020-11-23 18:17                   ` Stefan Weil
2020-11-18 15:34 ` Daniel P. Berrangé
2020-11-18 19:50   ` Stefan Weil

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=9ccb03ba-32ed-be75-4c12-ad68cf00aa88@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=sw@weilnetz.de \
    /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.