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@amd.com> --- diff -r a39ad4c78850 tools/debugger/gdb/gdbbuild --- a/tools/debugger/gdb/gdbbuild Wed Aug 30 13:51:12 2006 +0100 +++ b/tools/debugger/gdb/gdbbuild Wed Aug 30 11:33:41 2006 -0500 @@ -18,7 +18,7 @@ if [ "$MAKE" ]; then if [ "$MAKE" ]; then $MAKE elif which gmake ; then - gmake -j4 + gmake -j4 CFLAGS=-D__XEN_TOOLS__ else - make -j4 + make -j4 CFLAGS=-D__XEN_TOOLS__ fi _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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@amd.com> >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@verge.net.au> 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@lists.xensource.com http://lists.xensource.com/xen-devel
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@amd.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Aug-31 18:47 UTC
Re: [Xen-devel] Re: [PATCH] Fix gdbserver-xen build errors
On 31/8/06 7:14 pm, "Travis Betak" <travis.betak@amd.com> wrote:> 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?I just checked in a more general fix, which simply defines the macro in xenctrl.h if it isn''t defined already. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Aug 31, 2006 at 01:14:41PM -0500, Travis Betak wrote:> > 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?I like that idea a lot better. Does it work?> Signed-off-by: Travis Betak <travis.betak@amd.com> > > 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 >-- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Aug 31, 2006 at 07:47:56PM +0100, Keir Fraser wrote:> > > > On 31/8/06 7:14 pm, "Travis Betak" <travis.betak@amd.com> wrote: > > > 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? > > I just checked in a more general fix, which simply defines the macro in > xenctrl.h if it isn''t defined already.Excellent, thanks. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Travis Betak
2006-Sep-01 17:37 UTC
[Xen-devel] Re: [PATCH] Fix gdbserver-xen build errorsA
On Fri, 1 Sep 2006, Horms wrote:> On Thu, Aug 31, 2006 at 01:14:41PM -0500, Travis Betak wrote: >> >> 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? > > I like that idea a lot better. Does it work?Well, it does but, as you saw, Keir checked in what is probably probably the best fix. --travis _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Sep 01, 2006 at 12:37:47PM -0500, Travis Betak wrote:> > On Fri, 1 Sep 2006, Horms wrote: > > >On Thu, Aug 31, 2006 at 01:14:41PM -0500, Travis Betak wrote: > >> > >>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? > > > >I like that idea a lot better. Does it work? > > Well, it does but, as you saw, Keir checked in what is probably probably > the best fix.Yes, I think his idea is better still. -- Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel