On Tue, 2010-07-20 at 00:53 -0400, Charles Wilson wrote: > But at SOME point, SOME part of what you've built on $host is supposed > to be used, eventually, by somebody, on $target, right? > > Where should THAT live? > > If I'm on linux and have a devel environment, I can always compile with > --prefix=/home/me/my-builds even if I don't have root. But...with this > cross.cygchain, I can't do that from my cross-host; I'm trapped in the > thou-shalt-have-root prison and to USE anything I build, I *must* build > with --prefix=/usr -- and then I can't use it on the $target without > root privilege. > > rpm-build doesn't restrict you that way; sure, it *defaults* to /usr, > but you CAN override (yes, there are issues on the 'rpm --install' side > wrt. root, but there are also workarounds for that). I'm not sure about > ebuild, but I *think* you can override it, too. > > Why shouldn't cygport allow that?
Thinking about this further, I think the problem is that we're talking about two entirely different use cases: 1) cross-compiling a package to install into the sysroot, to be used solely on Cygwin for cross-compile other software, which would follow Cygwin packaging guidelines and use the system-default prefix; 2) cross-compiling software for use on another system (along the lines of canadian-cross.cygclass), which would follow the *host*'s packaging guidelines, or that of the user (at least wrt prefix). These are two completely different scenarios and in order to cover both of them w/o confusion, I think we should handle them separately, particularly if (as I suspect) we are forced to prepend $CROSS_SYSROOT to $prefix for case (1). So how about this: leave cross.cygclass to handle case (1), since that was what it was originally designed for, and make a new cygclass for case (2), sort of like a generalized canadian-cross.cygclass (which would be removed). The API would look something like: <NAMESPACE>_HOST="i686-pc-linux-gnu" <NAMESPACE>_PREFIX="/usr/local" # defaults to /mingw or /usr inherit <namespace> [...] The only question is what to use for <namespace>? Yaakov
