From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8Ymh-0000II-3k for qemu-devel@nongnu.org; Mon, 03 Sep 2012 11:42:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8Ymg-0006Wg-1j for qemu-devel@nongnu.org; Mon, 03 Sep 2012 11:41:55 -0400 Message-ID: <5044CFBC.9050800@suse.de> Date: Mon, 03 Sep 2012 17:41:48 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1346591386-22698-1-git-send-email-yann.morin.1998@free.fr> In-Reply-To: <1346591386-22698-1-git-send-email-yann.morin.1998@free.fr> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/2 v3] Fix static linking for cURL and SDL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Yann E. MORIN" , Stefan Hajnoczi Cc: qemu-trivial@nongnu.org, Peter Maydell , Riku Voipio , qemu-devel@nongnu.org Hello, Am 02.09.2012 15:09, schrieb Yann E. MORIN: > Currently, configure checks for cURL and SDL with either pkg-config (th= e > default), or with {curl,sdl}-config (as a fallback). >=20 > But pkg-config and {curl,sdl}-config do not have the same set of option= s: > - 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 >=20 > To add to the complexity, pkg-config is called through the querry_pkg_c= onfig > 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. >=20 > To fix this: > - introduce a new variable QEMU_XXX_CONFIG_LIBS_FLAGS that mirrors th= e > 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 take= n > 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg