Date: Wed, 29 Nov 2017 11:06:11 +0000 (UTC) From: Tobias Kortkamp <tobik@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r455101 - head/Mk/Uses Message-ID: <201711291106.vATB6BkB033644@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tobik Date: Wed Nov 29 11:06:11 2017 New Revision: 455101 URL: https://svnweb.freebsd.org/changeset/ports/455101 Log: Mk/Uses/cargo.mk: Respect CPUTYPE C and C++ code can be built targeting newer CPUs if user defined CPUTYPE in make.conf. Let's opt-in for Rust as well. PR: 223939 Submitted by: jbeich Modified: head/Mk/Uses/cargo.mk Modified: head/Mk/Uses/cargo.mk ============================================================================== --- head/Mk/Uses/cargo.mk Wed Nov 29 10:42:03 2017 (r455100) +++ head/Mk/Uses/cargo.mk Wed Nov 29 11:06:11 2017 (r455101) @@ -72,6 +72,13 @@ CARGO_ENV+= \ RUSTDOC=${LOCALBASE}/bin/rustdoc \ RUSTFLAGS="${RUSTFLAGS}" +# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk +.if ${ARCH} == amd64 || ${ARCH} == i386 +RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} +.else +RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} +.endif + # Helper to shorten cargo calls. CARGO_CARGO_RUN= \ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO_ENV} \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711291106.vATB6BkB033644>