WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Fix gdbserver-xen build errors

To: "Travis Betak" <travis.betak@xxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Fix gdbserver-xen build errors
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 15:56:37 +0900 (JST)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Aug 2006 01:40:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <Pine.LNX.4.62.0608301117420.5460@twinkletoes01>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (Linux/2.6.17-2-686 (i686))
On Wed, 30 Aug 2006 11:32:57 -0500 (CDT), Travis Betak wrote:
> 
> This may or may not be the correct place to put this fix but it does fix
> the following build error:
> 
> In file included from ../../../../../libxc/xenctrl.h:16,
>                  from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38:
> ../../../../../libxc/xen/domctl.h:14:2: #error "domctl operations are 
> intended for use by node control tools only"
> In file included from ../../../../../libxc/xenctrl.h:17,
>                from ../../../gdb-6.2.1/gdb/gdbserver/linux-xen-low.c:38:
> ../../../../../libxc/xen/sysctl.h:13:2: #error "sysctl operations are 
> intended for use by node control tools only"
> 
> Signed-off-by: Travis Betak <travis.betak@xxxxxxx>
> 

Hi Travis,

Ouch, that looks like a pretty horrible problem.
Unfortunately I think your fix is broken on two counts.

1) It won't work if MAKE is defined, as $MAKE will be executed
   without CFLAGS doctoring

2) Any existing CFLAGS are clobered.

I'm not sure if the CFLAGS override approach is really the right way to
go, but if it is, the following might work.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>

 tools/debugger/gdb/gdbbuild |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- x/tools/debugger/gdb/gdbbuild
+++ x/tools/debugger/gdb/gdbbuild
@@ -16,9 +16,9 @@ cd gdb-6.2.1-linux-i386-xen
 
 # Use $MAKE if set, else use gmake if present, otherwise use make
 if [ "$MAKE" ]; then
-    $MAKE
+    $MAKE CFLAGS="$CFLAGS -D__XEN_TOOLS__"
 elif which gmake ; then
-    gmake -j4
+    gmake -j4 CFLAGS="$CFLAGS -D__XEN_TOOLS__"
 else
-    make -j4
+    make -j4 CFLAGS="$CFLAGS -D__XEN_TOOLS__"
 fi

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>