Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/cargo.mk
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk | # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk | ||||
.if ${ARCH} == amd64 || ${ARCH} == i386 | .if ${ARCH} == amd64 || ${ARCH} == i386 | ||||
RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} | RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} | ||||
.else | .else | ||||
RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} | RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} | ||||
.endif | .endif | ||||
.if ${ARCH} == powerpc64 | .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 | ||||
USE_GCC?= yes | USE_GCC?= yes | ||||
.endif | .endif | ||||
# Helper to shorten cargo calls. | # Helper to shorten cargo calls. | ||||
CARGO_CARGO_RUN= \ | CARGO_CARGO_RUN= \ | ||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \ | ||||
${CARGO_CARGO_BIN} | ${CARGO_CARGO_BIN} | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |