qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
@ 2013-04-22  7:42 Alexey Kardashevskiy
  2013-04-22  9:00 ` Peter Maydell
  2013-04-22 18:34 ` Anthony Liguori
  0 siblings, 2 replies; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-22  7:42 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: Alexey Kardashevskiy

The code did use profile_getclock() but did not include
include/qemu/timer.h where this function is defined. The patch fixes this.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

The exact warning and error messages are:

/home/alexey/pcipassthru/qemu-impreza/translate-all.c:150:5: warning: implicit declaration of function 'profile_getclock' [-Wimplicit-function-declaration]
     ti = profile_getclock();
     ^

...

/home/alexey/pcipassthru/qemu-impreza/translate-all.c:150: undefined reference to `profile_getclock'


---
 translate-all.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/translate-all.c b/translate-all.c
index 08dd038..d04a116 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -58,6 +58,7 @@
 
 #include "exec/cputlb.h"
 #include "translate-all.h"
+#include "qemu/timer.h"
 
 //#define DEBUG_TB_INVALIDATE
 //#define DEBUG_FLUSH
-- 
1.7.10.4

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

* Re: [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
  2013-04-22  7:42 [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error Alexey Kardashevskiy
@ 2013-04-22  9:00 ` Peter Maydell
  2013-04-22 10:01   ` Alexey Kardashevskiy
  2013-04-22 18:34 ` Anthony Liguori
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2013-04-22  9:00 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-trivial, qemu-devel

On 22 April 2013 08:42, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> The code did use profile_getclock() but did not include
> include/qemu/timer.h where this function is defined. The patch fixes this.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

NB that this compile failure only happens if you configure
with --enable-profiler.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
  2013-04-22  9:00 ` Peter Maydell
@ 2013-04-22 10:01   ` Alexey Kardashevskiy
  2013-04-22 10:03     ` Peter Maydell
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-22 10:01 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel

On 04/22/2013 07:00 PM, Peter Maydell wrote:
> On 22 April 2013 08:42, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>> The code did use profile_getclock() but did not include
>> include/qemu/timer.h where this function is defined. The patch fixes this.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> NB that this compile failure only happens if you configure
> with --enable-profiler.

I also thought I can enable/disable it via ./configure but in fact I cannot:

alexey@ka1:~/pcipassthru/qemu-impreza$ ./configure --help | grep prof
alexey@ka1:~/pcipassthru/qemu-impreza$


-- 
Alexey

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

* Re: [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
  2013-04-22 10:01   ` Alexey Kardashevskiy
@ 2013-04-22 10:03     ` Peter Maydell
  2013-04-22 10:08       ` Alexey Kardashevskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2013-04-22 10:03 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-trivial, qemu-devel

On 22 April 2013 11:01, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> On 04/22/2013 07:00 PM, Peter Maydell wrote:
>> NB that this compile failure only happens if you configure
>> with --enable-profiler.
>
>
> I also thought I can enable/disable it via ./configure but in fact I cannot:
>
> alexey@ka1:~/pcipassthru/qemu-impreza$ ./configure --help | grep prof
> alexey@ka1:~/pcipassthru/qemu-impreza$

--enable-profiler exists but it is undocumented (ie not mentioned
in the --help text). In fact I have no idea how you tripped over
this missing include if you don't know about --enable-profiler,
since configure's default is to not enable this code.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
  2013-04-22 10:03     ` Peter Maydell
@ 2013-04-22 10:08       ` Alexey Kardashevskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-04-22 10:08 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, qemu-devel

On 04/22/2013 08:03 PM, Peter Maydell wrote:
> On 22 April 2013 11:01, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>> On 04/22/2013 07:00 PM, Peter Maydell wrote:
>>> NB that this compile failure only happens if you configure
>>> with --enable-profiler.
>>
>>
>> I also thought I can enable/disable it via ./configure but in fact I cannot:
>>
>> alexey@ka1:~/pcipassthru/qemu-impreza$ ./configure --help | grep prof
>> alexey@ka1:~/pcipassthru/qemu-impreza$
>
> --enable-profiler exists but it is undocumented (ie not mentioned
> in the --help text). In fact I have no idea how you tripped over
> this missing include if you don't know about --enable-profiler,
> since configure's default is to not enable this code.

Ah. Looked closer to my scripts and found --enable-profiler (leftover from 
something). I was confused by the fact that there is no 
"--disable-profiler", the ./configure script prints an error.


-- 
Alexey

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

* Re: [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error
  2013-04-22  7:42 [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error Alexey Kardashevskiy
  2013-04-22  9:00 ` Peter Maydell
@ 2013-04-22 18:34 ` Anthony Liguori
  1 sibling, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2013-04-22 18:34 UTC (permalink / raw)
  To: Alexey Kardashevskiy, qemu-devel, qemu-trivial

Applied.  Thanks.

Regards,

Anthony Liguori

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

end of thread, other threads:[~2013-04-22 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22  7:42 [Qemu-devel] [PATCH] translate-all: fix compiler warning and linked error Alexey Kardashevskiy
2013-04-22  9:00 ` Peter Maydell
2013-04-22 10:01   ` Alexey Kardashevskiy
2013-04-22 10:03     ` Peter Maydell
2013-04-22 10:08       ` Alexey Kardashevskiy
2013-04-22 18:34 ` Anthony Liguori

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).