[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cU
From: |
Andreas Färber |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 |
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
Re: [Qemu-trivial] [PATCH 0/2 v3] Fix static linking for cURL and SDL, Stefan Hajnoczi, 2012/09/05