aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2020-01-14 02:36:04 +0800
committerTobias Kortkamp <tobik@FreeBSD.org>2020-01-14 02:36:04 +0800
commit83096313becd19c3d90b196894f93ce9011466cb (patch)
tree16aeaf8fb3016e2e160135988ef45c32d3464a16 /Mk/Uses
parentdd02c37293a07f6ce6609317eb0d4baf33f91a50 (diff)
downloadfreebsd-ports-gnome-83096313becd19c3d90b196894f93ce9011466cb.tar.gz
freebsd-ports-gnome-83096313becd19c3d90b196894f93ce9011466cb.tar.zst
freebsd-ports-gnome-83096313becd19c3d90b196894f93ce9011466cb.zip
lang/rust: Add COMPAT_FREEBSD11 canary
This attempts to provide a nicer error message for the subset of users who build their own kernels without COMPAT_FREEBSD11 and then attempt to build lang/rust. The Rust ecosystem currently uses pre-ino64 syscalls, so building lang/rust without COMPAT_FREEBSD11 is not going to work. The error message for this is non-obvious and there is a new bug for this at least every 1-2 months. Hopefully this will improve the situation a little. Cargo and Gecko ports are similarly affected, so add the pre-build check to them too. Reviewed by: jbeich, mikael.urankar@gmail.com Tested by: madpilot (negative case) Approved by: gecko (jbeich) Differential Revision: https://reviews.freebsd.org/D23100
Diffstat (limited to 'Mk/Uses')
-rw-r--r--Mk/Uses/cargo.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index d61e98147f57..fa19d348f8f8 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -247,6 +247,9 @@ _USES_configure+= 250:cargo-configure
# configure hook. Place a config file for overriding crates-io index
# by local source directory.
cargo-configure:
+# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64
+ @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \
+ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh
@${MKDIR} ${WRKDIR}/.cargo
@${ECHO_CMD} "[source.cargo]" > ${WRKDIR}/.cargo/config
@${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config