All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements)
@ 2011-04-28 17:08 Stefan Weil
  2011-04-28 17:39 ` Anthony Liguori
  2011-04-28 18:21 ` [Qemu-devel] [PATCH v2] " Stefan Weil
  0 siblings, 2 replies; 13+ messages in thread
From: Stefan Weil @ 2011-04-28 17:08 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Anthony Liguori, Venkateswararao Jujjuri, Aneesh Kumar K.V, Stefan Weil

From: Stefan Weil <Stefan.Weil@Kath-Kirche-Ladenburg.de>

Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
without fixing the include paths.

Signed-off-by: Stefan Weil <Stefan.Weil@Kath-Kirche-Ladenburg.de>
---
 hw/9pfs/virtio-9p-debug.c      |    5 +++--
 hw/9pfs/virtio-9p-local.c      |    3 ++-
 hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
 hw/9pfs/virtio-9p-xattr-user.c |    2 +-
 hw/9pfs/virtio-9p-xattr.c      |    2 +-
 hw/9pfs/virtio-9p.c            |    4 ++--
 6 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
index 6b18842..4636ad5 100644
--- a/hw/9pfs/virtio-9p-debug.c
+++ b/hw/9pfs/virtio-9p-debug.c
@@ -10,8 +10,9 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
-#include "pc.h"
+
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "virtio-9p.h"
 #include "virtio-9p-debug.h"
 
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index 0a015de..3effc39 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -10,7 +10,8 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
+
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "virtio-9p-xattr.h"
 #include <arpa/inet.h>
diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
index 575abe8..c0ae9d6 100644
--- a/hw/9pfs/virtio-9p-posix-acl.c
+++ b/hw/9pfs/virtio-9p-posix-acl.c
@@ -13,7 +13,7 @@
 
 #include <sys/types.h>
 #include <attr/xattr.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr-user.c b/hw/9pfs/virtio-9p-xattr-user.c
index bba13ce..c56039c 100644
--- a/hw/9pfs/virtio-9p-xattr-user.c
+++ b/hw/9pfs/virtio-9p-xattr-user.c
@@ -12,7 +12,7 @@
  */
 
 #include <sys/types.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 03c3d3f..f08ce6e 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -11,7 +11,7 @@
  *
  */
 
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index b5fc52b..ac5a1d0 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "virtio.h"
-#include "pc.h"
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "qemu_socket.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
-- 
1.5.6.5

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

* Re: [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements)
  2011-04-28 17:08 [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements) Stefan Weil
@ 2011-04-28 17:39 ` Anthony Liguori
  2011-04-28 17:44   ` Stefan Weil
  2011-04-28 18:21 ` [Qemu-devel] [PATCH v2] " Stefan Weil
  1 sibling, 1 reply; 13+ messages in thread
From: Anthony Liguori @ 2011-04-28 17:39 UTC (permalink / raw)
  To: Stefan Weil
  Cc: Anthony Liguori, Stefan Weil, Venkateswararao Jujjuri,
	QEMU Developers, Aneesh Kumar K.V

On 04/28/2011 12:08 PM, Stefan Weil wrote:
> From: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>
> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
> without fixing the include paths.
>
> Signed-off-by: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>


This is not correct.   I think we learned in IRC that the problem is 
Stefan is using CFLAGS=-g which overrides the CFLAGS append added by 
this patch.

Regards,

Anthony Liguori

> ---
>   hw/9pfs/virtio-9p-debug.c      |    5 +++--
>   hw/9pfs/virtio-9p-local.c      |    3 ++-
>   hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
>   hw/9pfs/virtio-9p-xattr-user.c |    2 +-
>   hw/9pfs/virtio-9p-xattr.c      |    2 +-
>   hw/9pfs/virtio-9p.c            |    4 ++--
>   6 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
> index 6b18842..4636ad5 100644
> --- a/hw/9pfs/virtio-9p-debug.c
> +++ b/hw/9pfs/virtio-9p-debug.c
> @@ -10,8 +10,9 @@
>    * the COPYING file in the top-level directory.
>    *
>    */
> -#include "virtio.h"
> -#include "pc.h"
> +
> +#include "hw/virtio.h"
> +#include "hw/pc.h"




>   #include "virtio-9p.h"
>   #include "virtio-9p-debug.h"
>
> diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
> index 0a015de..3effc39 100644
> --- a/hw/9pfs/virtio-9p-local.c
> +++ b/hw/9pfs/virtio-9p-local.c
> @@ -10,7 +10,8 @@
>    * the COPYING file in the top-level directory.
>    *
>    */
> -#include "virtio.h"
> +
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "virtio-9p-xattr.h"
>   #include<arpa/inet.h>
> diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
> index 575abe8..c0ae9d6 100644
> --- a/hw/9pfs/virtio-9p-posix-acl.c
> +++ b/hw/9pfs/virtio-9p-posix-acl.c
> @@ -13,7 +13,7 @@
>
>   #include<sys/types.h>
>   #include<attr/xattr.h>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p-xattr-user.c b/hw/9pfs/virtio-9p-xattr-user.c
> index bba13ce..c56039c 100644
> --- a/hw/9pfs/virtio-9p-xattr-user.c
> +++ b/hw/9pfs/virtio-9p-xattr-user.c
> @@ -12,7 +12,7 @@
>    */
>
>   #include<sys/types.h>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
> index 03c3d3f..f08ce6e 100644
> --- a/hw/9pfs/virtio-9p-xattr.c
> +++ b/hw/9pfs/virtio-9p-xattr.c
> @@ -11,7 +11,7 @@
>    *
>    */
>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index b5fc52b..ac5a1d0 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -11,8 +11,8 @@
>    *
>    */
>
> -#include "virtio.h"
> -#include "pc.h"
> +#include "hw/virtio.h"
> +#include "hw/pc.h"
>   #include "qemu_socket.h"
>   #include "virtio-9p.h"
>   #include "fsdev/qemu-fsdev.h"

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

* Re: [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements)
  2011-04-28 17:39 ` Anthony Liguori
@ 2011-04-28 17:44   ` Stefan Weil
  2011-04-28 17:46     ` Anthony Liguori
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2011-04-28 17:44 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Anthony Liguori, Stefan Weil, Venkateswararao Jujjuri,
	QEMU Developers, Aneesh Kumar K.V

Am 28.04.2011 19:39, schrieb Anthony Liguori:
> On 04/28/2011 12:08 PM, Stefan Weil wrote:
>> From: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>>
>> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
>> without fixing the include paths.
>>
>> Signed-off-by: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>
>
> This is not correct.   I think we learned in IRC that the problem is 
> Stefan is using CFLAGS=-g which overrides the CFLAGS append added by 
> this patch.
>
> Regards,
>
> Anthony Liguori


QEMU Makefiles use QEMU_CFLAGS - setting CFLAGS in Makefile* is wrong,
because now users can no longer set their own CFLAGS.

The special CFLAGS for virtio should be removed (with my patch applied 
first).
The second best solution would be changing CFLAGS to QEMU_CFLAGS in
Makefile.objs and Makefile.target.

Regards,

Stefan

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

* Re: [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements)
  2011-04-28 17:44   ` Stefan Weil
@ 2011-04-28 17:46     ` Anthony Liguori
  2011-04-28 19:04       ` Blue Swirl
  0 siblings, 1 reply; 13+ messages in thread
From: Anthony Liguori @ 2011-04-28 17:46 UTC (permalink / raw)
  To: Stefan Weil
  Cc: Aneesh Kumar K.V, Anthony Liguori, Venkateswararao Jujjuri,
	QEMU Developers, Stefan Weil

On 04/28/2011 12:44 PM, Stefan Weil wrote:
> Am 28.04.2011 19:39, schrieb Anthony Liguori:
>> On 04/28/2011 12:08 PM, Stefan Weil wrote:
>>> From: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>>>
>>> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
>>> without fixing the include paths.
>>>
>>> Signed-off-by: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>>
>>
>> This is not correct. I think we learned in IRC that the problem is
>> Stefan is using CFLAGS=-g which overrides the CFLAGS append added by
>> this patch.
>>
>> Regards,
>>
>> Anthony Liguori
>
>
> QEMU Makefiles use QEMU_CFLAGS - setting CFLAGS in Makefile* is wrong,
> because now users can no longer set their own CFLAGS.

Use ./configure --extra-cflags="-g"

Regards,

Anthony Liguori


> The special CFLAGS for virtio should be removed (with my patch applied
> first).
> The second best solution would be changing CFLAGS to QEMU_CFLAGS in
> Makefile.objs and Makefile.target.
>
> Regards,
>
> Stefan
>
>

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

* [Qemu-devel] [PATCH v2] virtio-9p: Use relative includes for files in hw
  2011-04-28 17:08 [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements) Stefan Weil
  2011-04-28 17:39 ` Anthony Liguori
@ 2011-04-28 18:21 ` Stefan Weil
  1 sibling, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2011-04-28 18:21 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Anthony Liguori, Venkateswararao Jujjuri, Aneesh Kumar K.V

Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
without fixing the include paths. It used a modified CFLAGS
to add hw to the include search path, but this breaks builds
where the user wants to set special CFLAGS. Long include paths
also increase compilation time.

Therefore this patch removes the special CFLAGS for virtio
and fixes the include statements by using relative include paths.

v2: Remove special CFLAGS.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 Makefile.objs                  |    2 --
 Makefile.target                |    2 --
 hw/9pfs/virtio-9p-debug.c      |    5 +++--
 hw/9pfs/virtio-9p-local.c      |    3 ++-
 hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
 hw/9pfs/virtio-9p-xattr-user.c |    2 +-
 hw/9pfs/virtio-9p-xattr.c      |    2 +-
 hw/9pfs/virtio-9p.c            |    4 ++--
 8 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 0cbff4d..b37b342 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -290,8 +290,6 @@ hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
 9pfs-nested-$(CONFIG_VIRTFS) +=   virtio-9p-xattr-user.o virtio-9p-posix-acl.o
 
 hw-obj-$(CONFIG_REALLY_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
-$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
-
 
 ######################################################################
 # libdis
diff --git a/Makefile.target b/Makefile.target
index 2501c63..76bbdc7 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -401,8 +401,6 @@ hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
 qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
-9pfs/virtio-9p.o: CFLAGS +=  -I$(SRC_PATH)/hw/
-
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
 	rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
index 6b18842..4636ad5 100644
--- a/hw/9pfs/virtio-9p-debug.c
+++ b/hw/9pfs/virtio-9p-debug.c
@@ -10,8 +10,9 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
-#include "pc.h"
+
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "virtio-9p.h"
 #include "virtio-9p-debug.h"
 
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index 0a015de..3effc39 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -10,7 +10,8 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
+
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "virtio-9p-xattr.h"
 #include <arpa/inet.h>
diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
index 575abe8..c0ae9d6 100644
--- a/hw/9pfs/virtio-9p-posix-acl.c
+++ b/hw/9pfs/virtio-9p-posix-acl.c
@@ -13,7 +13,7 @@
 
 #include <sys/types.h>
 #include <attr/xattr.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr-user.c b/hw/9pfs/virtio-9p-xattr-user.c
index bba13ce..c56039c 100644
--- a/hw/9pfs/virtio-9p-xattr-user.c
+++ b/hw/9pfs/virtio-9p-xattr-user.c
@@ -12,7 +12,7 @@
  */
 
 #include <sys/types.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 03c3d3f..f08ce6e 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -11,7 +11,7 @@
  *
  */
 
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index b5fc52b..ac5a1d0 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "virtio.h"
-#include "pc.h"
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "qemu_socket.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
-- 
1.7.2.5

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

* Re: [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements)
  2011-04-28 17:46     ` Anthony Liguori
@ 2011-04-28 19:04       ` Blue Swirl
  2011-04-28 20:02         ` [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw Stefan Weil
  0 siblings, 1 reply; 13+ messages in thread
From: Blue Swirl @ 2011-04-28 19:04 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Anthony Liguori, Stefan Weil, QEMU Developers, Aneesh Kumar K.V,
	Venkateswararao Jujjuri

On Thu, Apr 28, 2011 at 8:46 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 04/28/2011 12:44 PM, Stefan Weil wrote:
>>
>> Am 28.04.2011 19:39, schrieb Anthony Liguori:
>>>
>>> On 04/28/2011 12:08 PM, Stefan Weil wrote:
>>>>
>>>> From: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>>>>
>>>> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
>>>> without fixing the include paths.
>>>>
>>>> Signed-off-by: Stefan Weil<Stefan.Weil@Kath-Kirche-Ladenburg.de>
>>>
>>>
>>> This is not correct. I think we learned in IRC that the problem is
>>> Stefan is using CFLAGS=-g which overrides the CFLAGS append added by
>>> this patch.
>>>
>>> Regards,
>>>
>>> Anthony Liguori
>>
>>
>> QEMU Makefiles use QEMU_CFLAGS - setting CFLAGS in Makefile* is wrong,
>> because now users can no longer set their own CFLAGS.
>
> Use ./configure --extra-cflags="-g"

No, we should be able to override CFLAGS, because Juan made great
effort earlier to fix the logic and separate QEMU_CFLAGS and CFLAGS.
Please see a558ee17761c3c9ef22792bd5097880ab92f1bf5.

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

* [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-04-28 19:04       ` Blue Swirl
@ 2011-04-28 20:02         ` Stefan Weil
  2011-04-28 20:49           ` Anthony Liguori
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2011-04-28 20:02 UTC (permalink / raw)
  To: QEMU Developers
  Cc: blauwirbel, Anthony Liguori, Venkateswararao Jujjuri, Aneesh Kumar K.V

Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
without fixing the include paths. It used a modified CFLAGS
to add hw to the include search path, but this breaks builds
where the user wants to set special CFLAGS. Long include paths
also increase compilation time.

Therefore this patch removes the special CFLAGS for virtio
and fixes the include statements by using relative include paths.

v2: Remove special CFLAGS.
v3: Update needed for latest QEMU.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 Makefile.objs                  |    2 --
 Makefile.target                |    2 --
 hw/9pfs/virtio-9p-debug.c      |    5 +++--
 hw/9pfs/virtio-9p-local.c      |    3 ++-
 hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
 hw/9pfs/virtio-9p-xattr-user.c |    2 +-
 hw/9pfs/virtio-9p-xattr.c      |    2 +-
 hw/9pfs/virtio-9p.c            |    4 ++--
 8 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/Makefile.objs b/Makefile.objs
index 9d8851e..df8cc9c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -290,8 +290,6 @@ hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
 9pfs-nested-$(CONFIG_VIRTFS) +=   virtio-9p-xattr-user.o virtio-9p-posix-acl.o
 
 hw-obj-$(CONFIG_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
-$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
-
 
 ######################################################################
 # libdis
diff --git a/Makefile.target b/Makefile.target
index 2501c63..76bbdc7 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -401,8 +401,6 @@ hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
 qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
 	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $(TARGET_DIR)$@")
 
-9pfs/virtio-9p.o: CFLAGS +=  -I$(SRC_PATH)/hw/
-
 clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
 	rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
index 6b18842..4636ad5 100644
--- a/hw/9pfs/virtio-9p-debug.c
+++ b/hw/9pfs/virtio-9p-debug.c
@@ -10,8 +10,9 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
-#include "pc.h"
+
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "virtio-9p.h"
 #include "virtio-9p-debug.h"
 
diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
index 0a015de..3effc39 100644
--- a/hw/9pfs/virtio-9p-local.c
+++ b/hw/9pfs/virtio-9p-local.c
@@ -10,7 +10,8 @@
  * the COPYING file in the top-level directory.
  *
  */
-#include "virtio.h"
+
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "virtio-9p-xattr.h"
 #include <arpa/inet.h>
diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
index 575abe8..c0ae9d6 100644
--- a/hw/9pfs/virtio-9p-posix-acl.c
+++ b/hw/9pfs/virtio-9p-posix-acl.c
@@ -13,7 +13,7 @@
 
 #include <sys/types.h>
 #include <attr/xattr.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr-user.c b/hw/9pfs/virtio-9p-xattr-user.c
index bba13ce..c56039c 100644
--- a/hw/9pfs/virtio-9p-xattr-user.c
+++ b/hw/9pfs/virtio-9p-xattr-user.c
@@ -12,7 +12,7 @@
  */
 
 #include <sys/types.h>
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 03c3d3f..f08ce6e 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -11,7 +11,7 @@
  *
  */
 
-#include "virtio.h"
+#include "hw/virtio.h"
 #include "virtio-9p.h"
 #include "fsdev/file-op-9p.h"
 #include "virtio-9p-xattr.h"
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index b5fc52b..ac5a1d0 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -11,8 +11,8 @@
  *
  */
 
-#include "virtio.h"
-#include "pc.h"
+#include "hw/virtio.h"
+#include "hw/pc.h"
 #include "qemu_socket.h"
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
-- 
1.7.2.5

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-04-28 20:02         ` [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw Stefan Weil
@ 2011-04-28 20:49           ` Anthony Liguori
  2011-04-28 21:44             ` Stefan Weil
  2011-04-29  0:46             ` Peter Maydell
  0 siblings, 2 replies; 13+ messages in thread
From: Anthony Liguori @ 2011-04-28 20:49 UTC (permalink / raw)
  To: Stefan Weil
  Cc: blauwirbel, Anthony Liguori, Venkateswararao Jujjuri,
	QEMU Developers, Aneesh Kumar K.V

On 04/28/2011 03:02 PM, Stefan Weil wrote:
> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
> without fixing the include paths. It used a modified CFLAGS
> to add hw to the include search path, but this breaks builds
> where the user wants to set special CFLAGS. Long include paths
> also increase compilation time.
>
> Therefore this patch removes the special CFLAGS for virtio
> and fixes the include statements by using relative include paths.
>
> v2: Remove special CFLAGS.
> v3: Update needed for latest QEMU.
>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
> ---
>   Makefile.objs                  |    2 --
>   Makefile.target                |    2 --
>   hw/9pfs/virtio-9p-debug.c      |    5 +++--
>   hw/9pfs/virtio-9p-local.c      |    3 ++-
>   hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
>   hw/9pfs/virtio-9p-xattr-user.c |    2 +-
>   hw/9pfs/virtio-9p-xattr.c      |    2 +-
>   hw/9pfs/virtio-9p.c            |    4 ++--
>   8 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/Makefile.objs b/Makefile.objs
> index 9d8851e..df8cc9c 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -290,8 +290,6 @@ hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
>   9pfs-nested-$(CONFIG_VIRTFS) +=   virtio-9p-xattr-user.o virtio-9p-posix-acl.o
>
>   hw-obj-$(CONFIG_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/

Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?

Regards,

Anthony Liguori

> -
>
>   ######################################################################
>   # libdis
> diff --git a/Makefile.target b/Makefile.target
> index 2501c63..76bbdc7 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -401,8 +401,6 @@ hmp-commands.h: $(SRC_PATH)/hmp-commands.hx
>   qmp-commands.h: $(SRC_PATH)/qmp-commands.hx
>   	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h<  $<  >  $@,"  GEN   $(TARGET_DIR)$@")
>
> -9pfs/virtio-9p.o: CFLAGS +=  -I$(SRC_PATH)/hw/
> -
>   clean:
>   	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
>   	rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o
> diff --git a/hw/9pfs/virtio-9p-debug.c b/hw/9pfs/virtio-9p-debug.c
> index 6b18842..4636ad5 100644
> --- a/hw/9pfs/virtio-9p-debug.c
> +++ b/hw/9pfs/virtio-9p-debug.c
> @@ -10,8 +10,9 @@
>    * the COPYING file in the top-level directory.
>    *
>    */
> -#include "virtio.h"
> -#include "pc.h"
> +
> +#include "hw/virtio.h"
> +#include "hw/pc.h"
>   #include "virtio-9p.h"
>   #include "virtio-9p-debug.h"
>
> diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c
> index 0a015de..3effc39 100644
> --- a/hw/9pfs/virtio-9p-local.c
> +++ b/hw/9pfs/virtio-9p-local.c
> @@ -10,7 +10,8 @@
>    * the COPYING file in the top-level directory.
>    *
>    */
> -#include "virtio.h"
> +
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "virtio-9p-xattr.h"
>   #include<arpa/inet.h>
> diff --git a/hw/9pfs/virtio-9p-posix-acl.c b/hw/9pfs/virtio-9p-posix-acl.c
> index 575abe8..c0ae9d6 100644
> --- a/hw/9pfs/virtio-9p-posix-acl.c
> +++ b/hw/9pfs/virtio-9p-posix-acl.c
> @@ -13,7 +13,7 @@
>
>   #include<sys/types.h>
>   #include<attr/xattr.h>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p-xattr-user.c b/hw/9pfs/virtio-9p-xattr-user.c
> index bba13ce..c56039c 100644
> --- a/hw/9pfs/virtio-9p-xattr-user.c
> +++ b/hw/9pfs/virtio-9p-xattr-user.c
> @@ -12,7 +12,7 @@
>    */
>
>   #include<sys/types.h>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
> index 03c3d3f..f08ce6e 100644
> --- a/hw/9pfs/virtio-9p-xattr.c
> +++ b/hw/9pfs/virtio-9p-xattr.c
> @@ -11,7 +11,7 @@
>    *
>    */
>
> -#include "virtio.h"
> +#include "hw/virtio.h"
>   #include "virtio-9p.h"
>   #include "fsdev/file-op-9p.h"
>   #include "virtio-9p-xattr.h"
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index b5fc52b..ac5a1d0 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -11,8 +11,8 @@
>    *
>    */
>
> -#include "virtio.h"
> -#include "pc.h"
> +#include "hw/virtio.h"
> +#include "hw/pc.h"
>   #include "qemu_socket.h"
>   #include "virtio-9p.h"
>   #include "fsdev/qemu-fsdev.h"

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-04-28 20:49           ` Anthony Liguori
@ 2011-04-28 21:44             ` Stefan Weil
  2011-04-29  0:46             ` Peter Maydell
  1 sibling, 0 replies; 13+ messages in thread
From: Stefan Weil @ 2011-04-28 21:44 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Anthony Liguori, QEMU Developers, blauwirbel, Aneesh Kumar K.V,
	Venkateswararao Jujjuri

Am 28.04.2011 22:49, schrieb Anthony Liguori:
> On 04/28/2011 03:02 PM, Stefan Weil wrote:
>> Commit 353ac78d495ef976242abd868f68d78420861c2c moved the files
>> without fixing the include paths. It used a modified CFLAGS
>> to add hw to the include search path, but this breaks builds
>> where the user wants to set special CFLAGS. Long include paths
>> also increase compilation time.
>>
>> Therefore this patch removes the special CFLAGS for virtio
>> and fixes the include statements by using relative include paths.
>>
>> v2: Remove special CFLAGS.
>> v3: Update needed for latest QEMU.
>>
>> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
>> ---
>>   Makefile.objs                  |    2 --
>>   Makefile.target                |    2 --
>>   hw/9pfs/virtio-9p-debug.c      |    5 +++--
>>   hw/9pfs/virtio-9p-local.c      |    3 ++-
>>   hw/9pfs/virtio-9p-posix-acl.c  |    2 +-
>>   hw/9pfs/virtio-9p-xattr-user.c |    2 +-
>>   hw/9pfs/virtio-9p-xattr.c      |    2 +-
>>   hw/9pfs/virtio-9p.c            |    4 ++--
>>   8 files changed, 10 insertions(+), 12 deletions(-)
>>
>> diff --git a/Makefile.objs b/Makefile.objs
>> index 9d8851e..df8cc9c 100644
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -290,8 +290,6 @@ hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
>>   9pfs-nested-$(CONFIG_VIRTFS) +=   virtio-9p-xattr-user.o 
>> virtio-9p-posix-acl.o
>>
>>   hw-obj-$(CONFIG_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
>> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
>
> Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?
>
> Regards,
>
> Anthony Liguori

That would be the second best solution (in my opinion).
Its only advantage would be that it minimises the size of the patch
(which is not a good argument if the result has disadvantages).

Do you think that the lines which I removed in Makefile.* look pretty
and maintainable? I don't think so. The new include statements are
much cleaner. They are also in line with other QEMU code - try

                         git grep '"hw/'

to see it yourself.

Regards,

Stefan Weil

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-04-28 20:49           ` Anthony Liguori
  2011-04-28 21:44             ` Stefan Weil
@ 2011-04-29  0:46             ` Peter Maydell
  2011-05-27 18:27               ` Stefan Weil
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Maydell @ 2011-04-29  0:46 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Anthony Liguori, QEMU Developers, blauwirbel, Aneesh Kumar K.V,
	Venkateswararao Jujjuri

On 28 April 2011 21:49, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 04/28/2011 03:02 PM, Stefan Weil wrote:
>> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
>
> Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?

There aren't any other source files in QEMU which have custom
include paths -- why should 9pfs be a special case?

-- PMM

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-04-29  0:46             ` Peter Maydell
@ 2011-05-27 18:27               ` Stefan Weil
  2011-05-28 16:51                 ` Aneesh Kumar K.V
  0 siblings, 1 reply; 13+ messages in thread
From: Stefan Weil @ 2011-05-27 18:27 UTC (permalink / raw)
  To: Peter Maydell, Anthony Liguori
  Cc: blauwirbel, Venkateswararao Jujjuri, QEMU Developers, Aneesh Kumar K.V

Am 29.04.2011 02:46, schrieb Peter Maydell:
> On 28 April 2011 21:49, Anthony Liguori<anthony@codemonkey.ws>  wrote:
>    
>> On 04/28/2011 03:02 PM, Stefan Weil wrote:
>>      
>>> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
>>>        
>> Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?
>>      
> There aren't any other source files in QEMU which have custom
> include paths -- why should 9pfs be a special case?
>
> -- PMM
>    

Was this an acked-by?
The patch is still uncommitted. Are there any objections?

Stefan W.

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-05-27 18:27               ` Stefan Weil
@ 2011-05-28 16:51                 ` Aneesh Kumar K.V
  2011-05-28 19:12                   ` Venkateswararao Jujjuri
  0 siblings, 1 reply; 13+ messages in thread
From: Aneesh Kumar K.V @ 2011-05-28 16:51 UTC (permalink / raw)
  To: Stefan Weil, Peter Maydell, Anthony Liguori
  Cc: blauwirbel, Venkateswararao Jujjuri, QEMU Developers

On Fri, 27 May 2011 20:27:11 +0200, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 29.04.2011 02:46, schrieb Peter Maydell:
> > On 28 April 2011 21:49, Anthony Liguori<anthony@codemonkey.ws>  wrote:
> >    
> >> On 04/28/2011 03:02 PM, Stefan Weil wrote:
> >>      
> >>> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
> >>>        
> >> Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?
> >>      
> > There aren't any other source files in QEMU which have custom
> > include paths -- why should 9pfs be a special case?
> >
> > -- PMM
> >    
> 
> Was this an acked-by?
> The patch is still uncommitted. Are there any objections?

I have pulled this patch into the tree. I guess the next pull request
from JV should include that.

-aneesh

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

* Re: [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw
  2011-05-28 16:51                 ` Aneesh Kumar K.V
@ 2011-05-28 19:12                   ` Venkateswararao Jujjuri
  0 siblings, 0 replies; 13+ messages in thread
From: Venkateswararao Jujjuri @ 2011-05-28 19:12 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: blauwirbel, QEMU Developers, Peter Maydell

On 05/28/2011 09:51 AM, Aneesh Kumar K.V wrote:
> On Fri, 27 May 2011 20:27:11 +0200, Stefan Weil<weil@mail.berlios.de>  wrote:
>> Am 29.04.2011 02:46, schrieb Peter Maydell:
>>> On 28 April 2011 21:49, Anthony Liguori<anthony@codemonkey.ws>   wrote:
>>>
>>>> On 04/28/2011 03:02 PM, Stefan Weil wrote:
>>>>
>>>>> -$(addprefix 9pfs/, $(9pfs-nested-y)): CFLAGS +=  -I$(SRC_PATH)/hw/
>>>>>
>>>> Wouldn't it be more straight forward to just do QEMU_CFLAGS +=?
>>>>
>>> There aren't any other source files in QEMU which have custom
>>> include paths -- why should 9pfs be a special case?
>>>
>>> -- PMM
>>>
>> Was this an acked-by?
>> The patch is still uncommitted. Are there any objections?
> I have pulled this patch into the tree. I guess the next pull request
> from JV should include that.
Yes, next pull will include this. Thanks.

- JV

> -aneesh

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

end of thread, other threads:[~2011-05-28 19:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-28 17:08 [Qemu-devel] [PATCH] virtio-9p: Fix compilation (wrong include statements) Stefan Weil
2011-04-28 17:39 ` Anthony Liguori
2011-04-28 17:44   ` Stefan Weil
2011-04-28 17:46     ` Anthony Liguori
2011-04-28 19:04       ` Blue Swirl
2011-04-28 20:02         ` [Qemu-devel] [PATCH v3] virtio-9p: Use relative includes for files in hw Stefan Weil
2011-04-28 20:49           ` Anthony Liguori
2011-04-28 21:44             ` Stefan Weil
2011-04-29  0:46             ` Peter Maydell
2011-05-27 18:27               ` Stefan Weil
2011-05-28 16:51                 ` Aneesh Kumar K.V
2011-05-28 19:12                   ` Venkateswararao Jujjuri
2011-04-28 18:21 ` [Qemu-devel] [PATCH v2] " Stefan Weil

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.