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. > > A. >
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. Also, this function is not meant for cross compilation. I have been working on building sys-freebsd/boot0 on Linux, which is one place where this is useful. Once it builds properly, I plan to patch it so that it can boot Linux and then have a discussion to decide how these changes will be merged into the main tree (i.e. as sys-freebsd/boot0-r1 or as sys-boot/boot0-linux). Being able to get the appropriate MACHINE_ARCH/MACHINE_CPUARCH values is part of that. It seemed useful enough that I felt it belonged in the eclass.
signature.asc
Description: OpenPGP digital signature