From: Horms Subject: Re: [PATCH] Fix gdbserver-xen build errors Date: Thu, 31 Aug 2006 15:56:37 +0900 (JST) Message-ID: <20060831065637.A2FBC3405E@koto.vergenet.net> References: Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Travis Betak Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 > 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 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