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: "Horms" <horms@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Fix gdbserver-xen build errors
From: "Travis Betak" <travis.betak@xxxxxxx>
Date: Thu, 31 Aug 2006 13:14:41 -0500 (CDT)
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Travis Betak <travis.betak@xxxxxxx>
Delivery-date: Thu, 31 Aug 2006 11:38:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060831065637.A2FBC3405E@xxxxxxxxxxxxxxxxx>
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>
References: <20060831065637.A2FBC3405E@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On Thu, 31 Aug 2006, Horms wrote:

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:


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.


I guess it was not the correct fix =)

Yeah, I didn't take into account any predefined CFLAGS or MAKE.  So your
patch is much better.

Perhaps a better place to put the define is in the gdbserver-xen sparse
directory's Makefile.in.  That will narrow the scope of the define a
bit.  How does the following look to you? ...or something similar?

Signed-off-by: Travis Betak <travis.betak@xxxxxxx>

diff -r 2017f6e92bf8 
tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
--- a/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in Thu Aug 
31 14:46:28 2006 +0100
+++ b/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in Thu Aug 
31 13:17:18 2006 -0500
@@ -92,13 +92,16 @@ GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS

 WARN_CFLAGS = -Wall

+# Xen specific CFLAGS
+XEN_CFLAGS = -D__XEN_TOOLS__
+
 # CFLAGS is specifically reserved for setting from the command line
 # when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
 CFLAGS = @CFLAGS@

 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
 INTERNAL_CFLAGS =  $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
-       ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
+       ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS} ${XEN_CFLAGS}

 # LDFLAGS is specifically reserved for setting from the command line
 # when running make.
diff -r 2017f6e92bf8 tools/debugger/gdb/gdbbuild
--- a/tools/debugger/gdb/gdbbuild       Thu Aug 31 14:46:28 2006 +0100
+++ b/tools/debugger/gdb/gdbbuild       Thu Aug 31 13:17:18 2006 -0500
@@ -18,7 +18,7 @@ if [ "$MAKE" ]; then
 if [ "$MAKE" ]; then
     $MAKE
 elif which gmake ; then
-    gmake -j4 CFLAGS=-D__XEN_TOOLS__
+    gmake -j4
 else
-    make -j4 CFLAGS=-D__XEN_TOOLS__
+    make -j4
 fi



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

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