From: Ferenc Wagner Subject: Re: POC: ncurses in stubdom Date: Tue, 28 Apr 2009 23:24:24 +0200 Message-ID: <87d4aw5v5j.fsf@tac.ki.iif.hu> References: <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> <87ab607i5o.fsf_-_@tac.ki.iif.hu> <20090428183702.GF5777@const.famille.thibault.fr> <87prew5z8o.fsf@tac.ki.iif.hu> <20090428201303.GK5777@const.famille.thibault.fr> <87hc085wx0.fsf@tac.ki.iif.hu> <20090428205634.GL5777@const.famille.thibault.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090428205634.GL5777@const.famille.thibault.fr> (Samuel Thibault's message of "Tue, 28 Apr 2009 22:56:34 +0200") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Samuel Thibault writes: > Ferenc Wagner, le Tue 28 Apr 2009 22:46:19 +0200, a =C3=A9crit : >> Samuel Thibault writes: >>> Ferenc Wagner, le Tue 28 Apr 2009 21:56:07 +0200, a =C3=A9crit : >>> >>>> But then trying the operation itself provides the exact same >>>> diagnostics. This is what I mean by "pointless". >>> >>> Ok, but applications could still be upset to see access() work and not >>> open(), or vice-versa. >>=20 >> Sure, but then they are buggy. > > So be they. We unfortunately can't change all of them just by will. I tried to imply there shouldn't be that many of them. Maybe none... Well, at least not too many which could be usefully run in a stubdom. >>>> #if defined(HAVE_POSIX_MEMALIGN) >>>> if (posix_memalign (&p, align, size) !=3D 0) >>>> p =3D 0; >>>> #elif defined(HAVE_MEMALIGN) >>>> p =3D memalign (align, size); >>> >>> Errr, so grub2 doesn't unconditionally use posix_memalign. How did >>> grub2 detect HAVE_POSIX_MEMALIGN? >>=20 >> By autoconf: >> AC_CHECK_FUNCS(posix_memalign memalign asprintf) > > Mmmmm, and I guess it's linking against the host OS, not the stubdom OS, > grmbl. Ugh, that can be. One can't pass LDFLAGS to configure, as then: checking whether the C compiler works... configure: error: cannot run C com= piled programs. Cross compilation should be made more explicit somehow. >>> Oh right, sorry. The final link is not done there but by the minios >>> paragraph of stubdom/Makefile. You can either set APP_LDLIBS to >>> -lncurses there, to override the empty default of mini-os/Makefile, or >>> add -lncurses to APP_LDLIBS in the ifeq($libc),y) section along others. >>=20 >> This is what I did in the POC. > > Err, in your patch it wasn't in the ifeq section but the empty > declaration. Yes, I read the above as allowing that. But I'll move it. --=20 Thanks, Feri.