From: Samuel Thibault Subject: Re: Pesky '#define current' in mini-os/sched.h Date: Tue, 28 Apr 2009 20:59:08 +0200 Message-ID: <20090428185908.GG5777@const.famille.thibault.fr> References: <20090427182543.GD5965@const.famille.thibault.fr> <877i163pga.fsf@tac.ki.iif.hu> <20090427185955.GF5965@const.famille.thibault.fr> <873abt51e5.fsf@tac.ki.iif.hu> <20090427200544.GN5965@const.famille.thibault.fr> <87skjt3koh.fsf@tac.ki.iif.hu> <20090427211132.GR5965@const.famille.thibault.fr> <87eivc7jbg.fsf@tac.ki.iif.hu> <20090428181211.GD5777@const.famille.thibault.fr> <87zle062eq.fsf@tac.ki.iif.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <87zle062eq.fsf@tac.ki.iif.hu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ferenc Wagner Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ferenc Wagner, le Tue 28 Apr 2009 20:47:41 +0200, a =E9crit : > Samuel Thibault writes: > > Ferenc Wagner, le Tue 28 Apr 2009 19:57:07 +0200, a =E9crit : > >> newlib-1.16.0/newlib/libc/include/sys/unistd.h defines _PC_VDISABLE. > >> It even has an fpathconf implementation in libc/sys/linux. Is there= a > >> way to get that work or had I better stub this one, too? > > > > Oh, right it's not defined in the linux/ part. > > That one should be fine indeed. >=20 > Do you know offhand why it isn't found? What do you refer to by "it"? _PC_VDISABLE is in the generic part, so that's why ncurses sees it. fpathconf is in the linux/ part, so that's why it's not compiled in. Just take that implementation and it will get compiled in. > >> Now let's try to hardwire the terminal type to xterm or similar... > > > > Note that for that to eventually work you need to give your stubdomai= n > > access to the terminfo database via fsif. >=20 > For now I configured out database access and compiled in some fallbacks= . Ok, that should be fine. In that case, maybe you should rather stub access() as always failing, as it's not supposed to read files. > > Now, I'm wondering about the ncurses requirement: is grub2 really > > using it for the bootloader, not just for the userland tool? >=20 > No, it does not require it for the bootloader. My plan is to port the > grub-emu userland tool instead, and finally patch kexec on that, just > like you did with grub1. Err, I didn't port the userland tool, I ported the bootloader. The userland grub1 tool does not even include code to boot kernels, actually... > >> 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. >=20 > There's no qemu/ in the 3.3.1 tree, as far as I can see. It's a symlink to the ioemu/ tree, yes, I didn't mean a precise directory name, just vaguely evoking ioemu. > >> NCURSES_STAMPFILE=3D$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/lib= ncurses.a > >> .PHONY: cross-ncurses > >> cross-ncurses: $(NCURSES_STAMPFILE) > >> $(NCURSES_STAMPFILE): ncurses-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) > >> ( cd $< && \ > >> CFLAGS=3D"$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" CC=3D$(CC) = ./configure --prefix=3D$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf --with-= build-cppflags=3D"" --with-build-cflags=3D"" --with-build-ldflags=3D"" --= with-build-libs=3D"" && \ > >> $(MAKE) libs && \ > >> $(MAKE) install.libs ) > >>=20 > >> The --with-build-* options do nothing, so two utilities must be comp= iled by hand. > > > > You need to pass the $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) there. >=20 > Sorry, I don't understand. Where? The target flags are the very > thing causing the problem for the build helper programs. In --with-build-*, I guess. What do you hope to build with helper programs? Mini-OS kernels? That would indeed require much more invasive Makefile changes in ncurses. I don't think you need that anyway. Samuel