From: "Andreas Färber" <afaerber@suse.de>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL
Date: Mon, 03 Sep 2012 17:41:48 +0200 [thread overview]
Message-ID: <5044CFBC.9050800@suse.de> (raw)
In-Reply-To: <1346591386-22698-1-git-send-email-yann.morin.1998@free.fr>
Hello,
Am 02.09.2012 15:09, schrieb Yann E. MORIN:
> Currently, configure checks for cURL and SDL with either pkg-config (the
> default), or with {curl,sdl}-config (as a fallback).
>
> But pkg-config and {curl,sdl}-config do not have the same set of options:
> - to check for shared libs, both use the option: --libs
> - to check for static libs:
> - pkg-config uses : --static --libs
> - {curl,sdl}-config use: --static-libs
>
> To add to the complexity, pkg-config is called through the querry_pkg_config
> wrapper, that already passes --static when static linking is required, but
> there is no such wrapper for {curl,sdl}-config, so we miss the occasion to
> pass --static-libs.
>
> To fix this:
> - introduce a new variable QEMU_XXX_CONFIG_LIBS_FLAGS that mirrors the
> behavior of QEMU_PKG_CONFIG_FLAGS; this variable can be used by all
> xxx-config scripts (eg. curl-config, but later sdl-config too).
> Default it to '--libs', which is for shared linking.
> - properly use either --libs for pkg-config (--static is already taken
> care of in the wrapper), or $QEMU_XXX_CONFIG_LIBS_FLAGS for
> {curl,sdl}-config.
While this patch set looks okay technically, I wonder if this is fixing
the wrong problem...
The only use case for QEMU's --static compilation I know is linux-user,
and that doesn't need cURL or SDL AFAIK. Shouldn't we rather sanitize
our configure-time checks to only look for the actually needed stuff
than making sure that unnecessary dependencies are generated nicely?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>,
Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL
Date: Mon, 03 Sep 2012 17:41:48 +0200 [thread overview]
Message-ID: <5044CFBC.9050800@suse.de> (raw)
In-Reply-To: <1346591386-22698-1-git-send-email-yann.morin.1998@free.fr>
Hello,
Am 02.09.2012 15:09, schrieb Yann E. MORIN:
> Currently, configure checks for cURL and SDL with either pkg-config (the
> default), or with {curl,sdl}-config (as a fallback).
>
> But pkg-config and {curl,sdl}-config do not have the same set of options:
> - to check for shared libs, both use the option: --libs
> - to check for static libs:
> - pkg-config uses : --static --libs
> - {curl,sdl}-config use: --static-libs
>
> To add to the complexity, pkg-config is called through the querry_pkg_config
> wrapper, that already passes --static when static linking is required, but
> there is no such wrapper for {curl,sdl}-config, so we miss the occasion to
> pass --static-libs.
>
> To fix this:
> - introduce a new variable QEMU_XXX_CONFIG_LIBS_FLAGS that mirrors the
> behavior of QEMU_PKG_CONFIG_FLAGS; this variable can be used by all
> xxx-config scripts (eg. curl-config, but later sdl-config too).
> Default it to '--libs', which is for shared linking.
> - properly use either --libs for pkg-config (--static is already taken
> care of in the wrapper), or $QEMU_XXX_CONFIG_LIBS_FLAGS for
> {curl,sdl}-config.
While this patch set looks okay technically, I wonder if this is fixing
the wrong problem...
The only use case for QEMU's --static compilation I know is linux-user,
and that doesn't need cURL or SDL AFAIK. Shouldn't we rather sanitize
our configure-time checks to only look for the actually needed stuff
than making sure that unnecessary dependencies are generated nicely?
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-09-03 15:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 13:09 [Qemu-trivial] [PATCH 0/2 v3] Fix static linking for cURL and SDL Yann E. MORIN
2012-09-02 13:09 ` [Qemu-devel] " Yann E. MORIN
2012-09-02 13:09 ` [Qemu-trivial] [PATCH 1/2] configure: fix detection for cURL libs when static linking Yann E. MORIN
2012-09-02 13:09 ` [Qemu-devel] " Yann E. MORIN
2012-09-02 13:09 ` [Qemu-trivial] [PATCH 2/2] configure: fix detection for SDL " Yann E. MORIN
2012-09-02 13:09 ` [Qemu-devel] " Yann E. MORIN
2012-09-03 9:31 ` [Qemu-trivial] [PATCH 0/2 v3] Fix static linking for cURL and SDL Stefan Hajnoczi
2012-09-03 9:31 ` [Qemu-devel] " Stefan Hajnoczi
2012-09-03 15:41 ` Andreas Färber [this message]
2012-09-03 15:41 ` Andreas Färber
2012-09-03 15:44 ` [Qemu-trivial] " Peter Maydell
2012-09-03 15:44 ` Peter Maydell
2012-09-03 16:28 ` [Qemu-trivial] " Yann E. MORIN
2012-09-03 16:28 ` Yann E. MORIN
2012-09-03 16:38 ` [Qemu-trivial] " Peter Maydell
2012-09-03 16:38 ` Peter Maydell
2012-09-03 17:06 ` [Qemu-trivial] " Yann E. MORIN
2012-09-03 17:06 ` Yann E. MORIN
2012-09-05 9:33 ` [Qemu-trivial] " Stefan Hajnoczi
2012-09-05 9:33 ` [Qemu-devel] " Stefan Hajnoczi
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=5044CFBC.9050800@suse.de \
--to=afaerber@suse.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=stefanha@gmail.com \
--cc=yann.morin.1998@free.fr \
/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.