All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/3] build: replace librt check function
@ 2012-02-21 19:14 Roger Pau Monne
  2012-02-21 19:14 ` [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga Roger Pau Monne
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21 19:14 UTC (permalink / raw)
  To: xen-devel, qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

Replace clock_gettime with timer_gettime, since at least under
uclibc 0.9.33 the clock_getttime function can be used without linking
against librt (although the manual page states the opposite).

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index f9d5330..68eb3fa 100755
--- a/configure
+++ b/configure
@@ -2513,7 +2513,8 @@ fi
 cat > $TMPC <<EOF
 #include <signal.h>
 #include <time.h>
-int main(void) { return clock_gettime(CLOCK_REALTIME, NULL); }
+int main(void) { timer_t tid; struct itimerspec it; \
+                 return timer_gettime(tid, &it); }
 EOF
 
 if compile_prog "" "" ; then
-- 
1.7.9

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

* [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga
  2012-02-21 19:14 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
@ 2012-02-21 19:14 ` Roger Pau Monne
  2012-02-21 19:14 ` Roger Pau Monne
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21 19:14 UTC (permalink / raw)
  To: xen-devel, qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

librt is needed to link qemu-ga.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 68eb3fa..790d495 100755
--- a/configure
+++ b/configure
@@ -2521,6 +2521,7 @@ if compile_prog "" "" ; then
   :
 elif compile_prog "" "-lrt" ; then
   LIBS="-lrt $LIBS"
+  libs_qga="-lrt $libs_qga"
 fi
 
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
-- 
1.7.9

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

* [PATCH 2/3] build: add librt to libs_qga
  2012-02-21 19:14 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
  2012-02-21 19:14 ` [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga Roger Pau Monne
@ 2012-02-21 19:14 ` Roger Pau Monne
  2012-02-21 19:14 ` [Qemu-devel] [PATCH 3/3] build: check if libm is needed in configure Roger Pau Monne
  2012-02-21 19:14 ` Roger Pau Monne
  3 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21 19:14 UTC (permalink / raw)
  To: xen-devel, qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

librt is needed to link qemu-ga.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 68eb3fa..790d495 100755
--- a/configure
+++ b/configure
@@ -2521,6 +2521,7 @@ if compile_prog "" "" ; then
   :
 elif compile_prog "" "-lrt" ; then
   LIBS="-lrt $LIBS"
+  libs_qga="-lrt $libs_qga"
 fi
 
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
-- 
1.7.9

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

* [Qemu-devel] [PATCH 3/3] build: check if libm is needed in configure
  2012-02-21 19:14 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
  2012-02-21 19:14 ` [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga Roger Pau Monne
  2012-02-21 19:14 ` Roger Pau Monne
@ 2012-02-21 19:14 ` Roger Pau Monne
  2012-02-21 19:14 ` Roger Pau Monne
  3 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21 19:14 UTC (permalink / raw)
  To: xen-devel, qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

Remove the hardcoded use of libm and instead rely on configure to
check for it. It is needed at least for qemu-ga and qemu-system.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 Makefile.target |    4 ----
 configure       |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 68a5641..c230aff 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -42,10 +42,6 @@ PROGS+=$(QEMU_PROGW)
 endif
 STPFILES=
 
-ifndef CONFIG_HAIKU
-LIBS+=-lm
-endif
-
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
diff --git a/configure b/configure
index 790d495..b0cb175 100755
--- a/configure
+++ b/configure
@@ -2524,6 +2524,20 @@ elif compile_prog "" "-lrt" ; then
   libs_qga="-lrt $libs_qga"
 fi
 
+##########################################
+# Do we need libm
+cat > $TMPC <<EOF
+#include <math.h>
+int main(void) { double a, b; return modf(a, &b);}
+EOF
+
+if compile_prog "" "" ; then
+  :
+elif compile_prog "" "-lm" ; then
+  LIBS="-lm $LIBS"
+  libs_qga="-lm $libs_qga"
+fi
+
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
         "$aix" != "yes" -a "$haiku" != "yes" ; then
     libs_softmmu="-lutil $libs_softmmu"
-- 
1.7.9

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

* [PATCH 3/3] build: check if libm is needed in configure
  2012-02-21 19:14 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
                   ` (2 preceding siblings ...)
  2012-02-21 19:14 ` [Qemu-devel] [PATCH 3/3] build: check if libm is needed in configure Roger Pau Monne
@ 2012-02-21 19:14 ` Roger Pau Monne
  3 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21 19:14 UTC (permalink / raw)
  To: xen-devel, qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

Remove the hardcoded use of libm and instead rely on configure to
check for it. It is needed at least for qemu-ga and qemu-system.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 Makefile.target |    4 ----
 configure       |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 68a5641..c230aff 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -42,10 +42,6 @@ PROGS+=$(QEMU_PROGW)
 endif
 STPFILES=
 
-ifndef CONFIG_HAIKU
-LIBS+=-lm
-endif
-
 config-target.h: config-target.h-timestamp
 config-target.h-timestamp: config-target.mak
 
diff --git a/configure b/configure
index 790d495..b0cb175 100755
--- a/configure
+++ b/configure
@@ -2524,6 +2524,20 @@ elif compile_prog "" "-lrt" ; then
   libs_qga="-lrt $libs_qga"
 fi
 
+##########################################
+# Do we need libm
+cat > $TMPC <<EOF
+#include <math.h>
+int main(void) { double a, b; return modf(a, &b);}
+EOF
+
+if compile_prog "" "" ; then
+  :
+elif compile_prog "" "-lm" ; then
+  LIBS="-lm $LIBS"
+  libs_qga="-lm $libs_qga"
+fi
+
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
         "$aix" != "yes" -a "$haiku" != "yes" ; then
     libs_softmmu="-lutil $libs_softmmu"
-- 
1.7.9

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

* [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga
  2012-03-12 15:34 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
@ 2012-03-12 15:34 ` Roger Pau Monne
  0 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-03-12 15:34 UTC (permalink / raw)
  To: qemu-devel, stefano.stabellini; +Cc: Roger Pau Monne

librt is needed to link qemu-ga.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 68eb3fa..790d495 100755
--- a/configure
+++ b/configure
@@ -2521,6 +2521,7 @@ if compile_prog "" "" ; then
   :
 elif compile_prog "" "-lrt" ; then
   LIBS="-lrt $LIBS"
+  libs_qga="-lrt $libs_qga"
 fi
 
 if test "$darwin" != "yes" -a "$mingw32" != "yes" -a "$solaris" != yes -a \
-- 
1.7.9

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

end of thread, other threads:[~2012-03-12 15:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21 19:14 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
2012-02-21 19:14 ` [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga Roger Pau Monne
2012-02-21 19:14 ` Roger Pau Monne
2012-02-21 19:14 ` [Qemu-devel] [PATCH 3/3] build: check if libm is needed in configure Roger Pau Monne
2012-02-21 19:14 ` Roger Pau Monne
2012-03-12 15:34 [Qemu-devel] [PATCH 1/3] build: replace librt check function Roger Pau Monne
2012-03-12 15:34 ` [Qemu-devel] [PATCH 2/3] build: add librt to libs_qga Roger Pau Monne

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.