Page MenuHomeFreeBSD

Set OS versions to target system versions for CROSS_SYSROOT.
ClosedPublic

Authored by jhb on Jun 14 2018, 7:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 10:02 PM
Unknown Object (File)
Mon, Jul 20, 11:48 AM
Unknown Object (File)
Thu, Jun 25, 5:18 PM
Unknown Object (File)
Wed, Jun 24, 7:41 AM
Unknown Object (File)
Jun 23 2026, 12:52 AM
Unknown Object (File)
Jun 21 2026, 8:59 PM
Unknown Object (File)
Jun 20 2026, 9:16 AM
Unknown Object (File)
Apr 30 2026, 2:59 PM
Subscribers

Details

Summary

When cross-building a package via a CROSS_SYSROOT, set OSVERSION,
_OSRELEASE, and OSREL to the target OS version. OSVERSION is derived
from the <sys/param.h> header in the sysroot. _OSRELEASE cannot be
easily derived from a sysroot as it is a property of a kernel, so
instead generate a "fake" _OSRELEASE from the OSVERSION, but use a
"-CROSS" branch name that will hopefully fail in any places that makes
assumptions about branch names.

Test Plan
  • used in a dependent patch for base/binutils that alters the plist based on the target OS version

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable