From patchwork Sun Jan 17 12:04:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lo=C3=AFc_Minier?= X-Patchwork-Id: 43025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D6797B7CE4 for ; Sun, 17 Jan 2010 23:08:41 +1100 (EST) Received: from localhost ([127.0.0.1]:40833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWTtc-0006h2-JQ for incoming@patchwork.ozlabs.org; Sun, 17 Jan 2010 07:06:20 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWTrf-0006PQ-BQ for qemu-devel@nongnu.org; Sun, 17 Jan 2010 07:04:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWTra-0006Mw-Gn for qemu-devel@nongnu.org; Sun, 17 Jan 2010 07:04:18 -0500 Received: from [199.232.76.173] (port=36970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWTra-0006Mr-4z for qemu-devel@nongnu.org; Sun, 17 Jan 2010 07:04:14 -0500 Received: from duck.dooz.org ([194.146.227.125]:52339) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWTrX-0000lB-VD for qemu-devel@nongnu.org; Sun, 17 Jan 2010 07:04:12 -0500 Received: from bee.dooz.org (serris.dooz.org [88.166.229.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by duck.dooz.org (Postfix) with ESMTP id C8F84C809C for ; Sun, 17 Jan 2010 13:04:06 +0100 (CET) Received: by bee.dooz.org (Postfix, from userid 1000) id 53C38111D; Sun, 17 Jan 2010 13:04:02 +0100 (CET) Date: Sun, 17 Jan 2010 13:04:02 +0100 From: =?iso-8859-1?Q?Lo=EFc?= Minier To: qemu-devel@nongnu.org Message-ID: <20100117120402.GC23875@bee.dooz.org> MIME-Version: 1.0 Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: [Qemu-devel] [PATCH] Add -static earlier to LDFLAGS for compile_prog() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi When configure qemu with --static, it might autodetect support for some features by looking at available shared libraries instead of static libraries. e.g. if you have libbluetooth.so, bluez support will be turned on, but the build will fail at link stage. Setting LDFLAGS earlier to include -static will cause the compile_prog() tests to try to link against static libs. This did disable bluetooth support properly on my system where libbluetooth.a isn't available. Tested by building qemu configured with: ./configure --static --target-list=arm-softmmu,i386-softmmu,x86_64-softmmu,arm-linux-user,i386-linux-user,x86_64-linux-user and again without --static. Thanks, From 3df135de4babc35849578cde901ef9ffb04a2ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Sun, 17 Jan 2010 12:43:21 +0100 Subject: [PATCH] Add -static earlier to LDFLAGS for compile_prog() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add -static to LDFLAGS earlier as to run the compile_prog() tests with this flags, this will avoid turning on features for which a shared library is available but not a static one. Signed-off-by: Loïc Minier --- configure | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5631bbb..e094111 100755 --- a/configure +++ b/configure @@ -451,7 +451,9 @@ for opt do ;; --enable-gprof) gprof="yes" ;; - --static) static="yes" + --static) + static="yes" + LDFLAGS="-static $LDFLAGS" ;; --disable-sdl) sdl="no" ;; @@ -1968,7 +1970,6 @@ if test "$solaris" = "yes" ; then fi if test "$static" = "yes" ; then echo "CONFIG_STATIC=y" >> $config_host_mak - LDFLAGS="-static $LDFLAGS" fi if test $profiler = "yes" ; then echo "CONFIG_PROFILER=y" >> $config_host_mak -- 1.6.5