HomeFreeBSD

Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN

Description

Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN

CROSS_TOOLCHAIN is used to build src with a different toolchain than
the bundled one. Ports also has a CROSS_TOOLCHAIN option, but it has
a different meaning. When building ports-mgmt/pkg from ports for the
package-pkg target, unset CROSS_TOOLCHAIN to prevent ports from being
confused.

This fixes 'make CROSS_TOOLCHAIN=llvm19 package-pkg' for the native
target, but cross-building (e.g., targetting powerpc from amd64) is
still broken due to an issue in pkg itself.

MFC after: 3 seconds
Reviewed by: emaste
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52902

(cherry picked from commit b09dd586518aaa0ac24b70ca522f4054165c8031)

Details

Provenance
ivyAuthored on Oct 4 2025, 4:50 PM
Reviewer
emaste
Differential Revision
D52902: Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN
Parents
rG830684a523e4: Makefile: Fix ordering for (update-)packages
Branches
Unknown
Tags
Unknown