On 20-12-2025 05:11:21 -0500, Ionen Wolkens wrote: > On Sat, Dec 20, 2025 at 10:15:35AM +0100, Fabian Groffen wrote: > > 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). > > Believe meant toolchain variables in the sense of being toolchain > related rather than from the toolchain eclasses. > > That aside, the package manager is not required to set CBUILD, the > PM spec has a "or be unset" in: > > "CHOST, CBUILD and CTARGET, if not set by profiles, must contain either > an appropriate machine tuple (the definition of appropriate is beyond > the scope of this specification) or be unset." > > So typically when we read CBUILD, we use ${CBUILD:-${CHOST}}.
Very good point, thank you. Fabian > > ... and personally think it's ok to use here. > -- > ionen -- Fabian Groffen 80C6 A09A 8D33 302C 1D2C Gentoo on a different level 06A9 3DC1 26BC 457C 8490
signature.asc
Description: PGP signature
