Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/Makefile
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ | ||||
${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json | ||||
post-patch-SOURCES-off: | post-patch-SOURCES-off: | ||||
# Mimic tools in config.toml with just src excluded | # Mimic tools in config.toml with just src excluded | ||||
@${REINPLACE_CMD} -e 's/config.tools.*"src".*/false;/' \ | @${REINPLACE_CMD} -e 's/config.tools.*"src".*/false;/' \ | ||||
${WRKSRC}/src/bootstrap/install.rs | ${WRKSRC}/src/bootstrap/install.rs | ||||
do-configure: | do-configure: | ||||
# Sanity check that the running kernel was built with the necessary | |||||
# syscall compat option. | |||||
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200000 | |||||
@${PRINTF} '#include <sys/syscall.h>\n#include <errno.h>\n#include <unistd.h>\n\ | |||||
int main(void) { return syscall(SYS_freebsd11_mknod, "", 0, 0) < 0 && errno == ENOSYS; }' | \ | |||||
jbeich: Why are you testing `mknod` (a rarely used syscall) insted of `fstat`?
| |||||
Done Inline ActionsIt was the first SYS_freebsd11_* one in sys/syscall.h and I just picked it. The only goal here is to check if the kernel has COMPAT_FREEBSD11 syscalls. I do not understand why it matters what syscall we test for? tobik: It was the first SYS_freebsd11_* one in sys/syscall.h and I just picked it. The only goal here… | |||||
${CC} -o ${WRKSRC}/compat11_canary -xc - && ${WRKSRC}/compat11_canary || (\ | |||||
${ECHO_MSG} "=> Sanity check failed: kernel is missing COMPAT_FREEBSD11"; \ | |||||
${ECHO_MSG} "=> Aborting build"; \ | |||||
${FALSE}) | |||||
.endif | |||||
@${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml | @${ECHO_CMD} '[build]' > ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml | @${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml | ||||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |
Why are you testing mknod (a rarely used syscall) insted of fstat?