Changeset View
Changeset View
Standalone View
Standalone View
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 ${ARCH} == powerpc64 && ${PPC_ABI} == ELFv1 | ||||
pkubaj: PPC_ABI is set only on powerpc64, so there's no need to check for powerpc64 here. | |||||
alfredoUnsubmitted Not Done Inline ActionsActually PPC_ABI is not being defined if platform is !powerpc64 and make will complain it's a "malformed line", so $ARCH check is required. Other solutions could be: .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 or (didn't check this) .if "${PPC_ABI}" == ELFv1 alfredo: Actually PPC_ABI is not being defined if platform is !powerpc64 and make will complain it's a… | |||||
pkubajUnsubmitted Not Done Inline ActionsThen I think the variant below: .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 is the cleanest one (but I'm not in portmgr, so my opinion here actually doesn't matter). pkubaj: Then I think the variant below:
.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
is the cleanest… | |||||
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 223 Lines • Show Last 20 Lines |
PPC_ABI is set only on powerpc64, so there's no need to check for powerpc64 here.