qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Add -static earlier to LDFLAGS for compile_prog()
@ 2010-01-31 11:23 Loïc Minier
  2010-02-06 21:23 ` Aurelien Jarno
  0 siblings, 1 reply; 3+ messages in thread
From: Loïc Minier @ 2010-01-31 11:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: Loïc Minier

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 <lool@dooz.org>
---
 configure |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 42ef628..ab6bd8e 100755
--- a/configure
+++ b/configure
@@ -488,7 +488,9 @@ for opt do
   ;;
   --enable-gprof) gprof="yes"
   ;;
-  --static) static="yes"
+  --static)
+    static="yes"
+    LDFLAGS="-static $LDFLAGS"
   ;;
   --sysconfdir) sysconfdir="$optarg"
   ;;
@@ -2025,7 +2027,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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH] Add -static earlier to LDFLAGS for compile_prog()
@ 2010-01-17 12:04 Loïc Minier
  0 siblings, 0 replies; 3+ messages in thread
From: Loïc Minier @ 2010-01-17 12:04 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

        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,
-- 
Loïc Minier

[-- Attachment #2: 0001-Add-static-earlier-to-LDFLAGS-for-compile_prog.patch --]
[-- Type: text/x-diff, Size: 1234 bytes --]

>From 3df135de4babc35849578cde901ef9ffb04a2ab3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <lool@dooz.org>
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 <lool@dooz.org>
---
 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


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

end of thread, other threads:[~2010-02-06 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-31 11:23 [Qemu-devel] [PATCH] Add -static earlier to LDFLAGS for compile_prog() Loïc Minier
2010-02-06 21:23 ` Aurelien Jarno
  -- strict thread matches above, loose matches on Subject: below --
2010-01-17 12:04 Loïc Minier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).