On Mon, 02 Jul 2012 14:09:26 -0400 Richard Yao <r...@gentoo.org> wrote:
> On 07/02/2012 02:02 PM, Mike Frysinger wrote: > > On Monday 02 July 2012 13:37:53 Richard Yao wrote: > >> On 07/02/2012 10:54 AM, Alexis Ballier wrote: > >>> hu? yes, as already pointed out, uname is not reliable when > >>> cross-compiling. You should use CHOST, and then you get > >>> tc-arch-kernel. See freebsd-lib ebuild for how it is handled. > >> > >> In that case, it should be 'local arch=$(tc-arch-kernel)'. Using > >> tc-arch-kernel by itself causes problems when building on Linux, > >> because x86 can be passed, which FreeBSD's build system does not > >> understand. > > > > the function specifically handles freebsd in this case. why isn't > > that code sufficient ? > > > >> Also, this function is not meant for cross compilation. > > > > then it doesn't really belong in the tree. native builds are just > > a special case of cross-compiling. > > -mike > > The idea is to use this to assist in building parts of FreeBSD on > Linux for Linux (or on Prefix for whatever platform it runs). Anyway, > I will keep this in ebuilds until it has several ebuilds using it. > Then we can revisit it. > you probably want something like: tc-arch-kernel "${CHOST%%-*}-gentoo-freebsd9.0" then we do not really care about the version suffix in tc-arch functions, so you can also omit it. A.