[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: Pesky '#define current' in mini-os/sched.h



Ferenc Wagner, le Tue 28 Apr 2009 12:12:54 +0200, a écrit :
> Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> writes:
> > Have you, like in the C example of stubdom/Makefile, propagated
> > TARGET_CPPFLAGS, TARGET_CFLAGS, and added a rule like is done for other
> > stubdom images in the "minios" paragraph of stubdom/Makefile?
> 
> No, I had no idea how to start with this, I stole the various flags
> from the output of make c-stubdom and configured ncurses with those.

Errrr, that's an odd way. ncurses is a library, so stole things from a
library, see the cross-zlib part for instance.  No need to look at
c-stubdom (which is only about the main application, not a library).

> > Ferenc Wagner, le Mon 27 Apr 2009 22:29:02 +0200, a écrit :
> >
> >> I couldn't track how it's done for libpci & libz for qemu-stubdom
> >> (ioemu?) yet.
> >
> > It's all in stubdom/Makefile: they get installed within the
> > cross-root-$(GNU_TARGET_ARCH) hierarchy, where the linker finds it
> > thanks to the TARGET_LDFLAGS variable.
> >
> >> This make magic is somewhat convoluted,
> >
> > It's no magic, it's makefiles :)
> 
> Ok, do I have to extend the # Links section as well?

You need to add a cross-ncurses dependency, but the rest is only for
libxc.

> >> So, where should I add it for proper operation?
> >
> > Just the same way as zlib & C stubdom examples.
> 
> I may be blind, but there's no -l linker option in stubdom/Makefile.

Sure, but in qemu/ there is a -lz linker option.  Just the usual way,
that is.

> NCURSES_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libncurses.a
> .PHONY: cross-ncurses
> cross-ncurses: $(NCURSES_STAMPFILE)
> $(NCURSES_STAMPFILE): ncurses-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)
>         ( cd $< && \
>           CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=$(CC) ./configure 
> --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf --with-build-cppflags="" 
> --with-build-cflags="" --with-build-ldflags="" --with-build-libs="" && \
>           $(MAKE) libs && \
>           $(MAKE) install.libs )
> 
> The --with-build-* options do nothing, so two utilities must be compiled by 
> hand.

You need to pass the $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) there.

I'm actually feared by all your terminal additions.  These will probably
never be implemented in mini-os.  They can sure be stubbed, but the
application will probably just not work properly.  Remember that the Xen
console can be attached/detached/reattached from a lot of various kinds
of terminals...

> 9. Actually, deleting #define current get_current() from 
> extras/mini-os/include/mini-os/sched.h
> made libncurses++.a build, but broke make c-stubdom...  According to Keir 
> Fraser, the simplest fix is:
> 
> #ifdef __MINIOS__
> #define current get_current()
> #endif

Use the same fix as in the unstable tree.

Samuel

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.