aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-10-04 00:24:17 +0100
committerLexi Winter <ivy@FreeBSD.org>2025-10-04 00:24:17 +0100
commitae082f1ed35a8d9598f7d0553d165fba471d2212 (patch)
treeb4194568ebb078d149eaed05996821cd26ccf286
parent8d0a90512ee35064697fbeffd0886eba4c82eb8d (diff)
Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAINlf/dev/pkgbase-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'. MFC after: 3 seconds
-rwxr-xr-xrelease/scripts/make-pkg-package.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh
index a1e006bd6964..441987fe037e 100755
--- a/release/scripts/make-pkg-package.sh
+++ b/release/scripts/make-pkg-package.sh
@@ -8,6 +8,10 @@ PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)
unset PKG_VERSION
unset MAKEFLAGS
unset PKGBASE
+# Ports interprets CROSS_TOOLCHAIN differently from src, and having this set
+# breaks the package-pkg build. For now, forcibly unset this and hope ports
+# can find a working compiler.
+unset CROSS_TOOLCHAIN
export WRKDIRPREFIX=/tmp/ports.${TARGET}
export DISTDIR=/tmp/distfiles
export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)