--- - branch: MAIN date: Fri Apr 12 19:53:25 UTC 2024 files: - new: '1.13' old: '1.12' path: pkgsrc/doc/HOWTO-use-crosscompile pathrev: pkgsrc/doc/HOWTO-use-crosscompile@1.13 type: modified - new: '1.440' old: '1.439' path: pkgsrc/mk/bsd.prefs.mk pathrev: pkgsrc/mk/bsd.prefs.mk@1.440 type: modified - new: '1.1' old: '0' path: pkgsrc/mk/tools/cross.NetBSD.mk pathrev: pkgsrc/mk/tools/cross.NetBSD.mk@1.1 type: added - new: '1.65' old: '1.64' path: pkgsrc/mk/tools/defaults.mk pathrev: pkgsrc/mk/tools/defaults.mk@1.65 type: modified - new: '1.75' old: '1.74' path: pkgsrc/mk/tools/tools.NetBSD.mk pathrev: pkgsrc/mk/tools/tools.NetBSD.mk@1.75 type: modified id: 20240412T195325Z.dc6aedd52c2d5ca7afc786cd2d979be2ea2448bb log: "mk: New CROSS_* variable scheme for cross-compilation.\n\nThis change brings in support for cross-OS-compilation.\n\nCaveat: Existing mk.conf files used for cross-compilation no longer\nwork; they must be adapted to the new scheme.\n\nUnder this new scheme, if an mk.conf variable X can be different for\nnative and cross builds like OPSYS, MACHINE_ARCH, LOCALBASE, &c., you\njust define X in mk.conf to set it for native builds, and CROSS_X in\nmk.conf to set it for cross builds.\n\nExample:\n\n \ LOCALBASE=\t\t/home/riastradh/pkgsrc/cross/pkg\n CROSS_LOCALBASE=\t/opt/pkg\n \ CROSS_MACHINE_ARCH=\tpowerpc\n\nFor now, _all_ OS-related variables must be defined in cross-builds;\nnone are filled in automatically. For NetBSD, this means:\n\n CROSS_OPSYS=\t\tNetBSD\n CROSS_OS_VERSION=\t\t10.0\n CROSS_OPSYS_VERSION=\t100000\n \ CROSS_LOWER_OPSYS=\t\tnetbsd\n CROSS_LOWER_OPSYS_VERSUFFIX=# empty\n CROSS_LOWER_OS_VARIANT=\t# empty\n CROSS_LOWER_VARIANT_VERSION=# empty\n CROSS_LOWER_VENDOR=\t\t# empty\n\nThis new scheme may raise make(1) costs by making a lot of variables\nlike OPSYS expand to conditionals rather than fixed strings. It is\ndifficult to make these fixed strings because:\n\n- they can only be committed _after_ mk.conf is loaded, before which\n USE_CROSS_COMPILE isn't yet determined, but\n\n- the conditionals must be applied _before_ the rest of bsd.own.mk\n which uses these variables.\n\nSo we can't just have conditionals in bsd.prefs.mk after loading\nbsd.own.mk -- we would need to put the conditionals in the middle of\nbsd.own.mk between loading mk.conf and everything else.\n\nAs a followup commit, we can consider committing the variables after\nbsd.own.mk as an optimization so that the conditional expansions are\nonly used inside bsd.own.mk and not in any other infrastructure. Or\nwe can consider putting a hook inside bsd.own.mk for committing the\nvariables there too. But let's see how this works out in practice\nfirst.\n" module: pkgsrc subject: 'CVS commit: pkgsrc' unixtime: '1712951605' user: riastradh