On 19-12-2025 22:06:06 -0500, Mike Gilbert wrote: > On Fri, Dec 19, 2025 at 9:58 PM Mike Gilbert <[email protected]> wrote: > > > > On Fri, Dec 19, 2025 at 3:23 PM Fabian Groffen <[email protected]> wrote: > > > > > > Use the proper methods on Darwin and Solaris hosts to get available > > > memory and available swap in kibibytes. > > > > You should probably check CBUILD instead of CHOST; if we are > > cross-compiling, you care about the system the software is being built > > on, not the system we are targeting.
Ack, makes sense. > Or maybe check uname -s? This eclass really has nothing to do with > the toolchain, so checking toolchain variables seems weird. I thought CHOST and CBUILD are defined by profile/environment, not toolchain eclass or something, right? The package manager defines CBUILD when not set, so it's always there (lib/portage/package/ebuild/config.py). Parsing uname -s output is possible, but is another call to a binary that may or may not exist (you never know what vendors do now) so I prefer chosing the logic based on the profile configuration instead. In the end the rest of what phases do is controlled by that too. Thanks, Fabian -- Fabian Groffen 80C6 A09A 8D33 302C 1D2C Gentoo on a different level 06A9 3DC1 26BC 457C 8490
signature.asc
Description: PGP signature
