All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH 0/2 v3] Fix static linking for cURL and SDL
@ 2012-09-02 13:09 ` Yann E. MORIN
  0 siblings, 0 replies; 20+ messages in thread
From: Yann E. MORIN @ 2012-09-02 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Yann E. MORIN, Peter Maydell

Hello All!

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.


Changes since v2:
  - remove trailing reference to cURL in the SDL patch (Stefan Hajnoczi)
  - sent to qemu-devel and cc qemu-trivial (Peter Maydell, Stefan)
  - fix type in the name of the new variable

Changes since v1:
  - drop the spice fix, it is not needed (bad env locally)
  - drop the added --static to calls to pkg-config, as it's already in the
    wrapper (Stefan Hajnoczi)

Regards,
Yann E. MORIN.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-09-05  9:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Qemu-trivial] " Andreas Färber
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

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.