Date: Sat, 19 Sep 2020 13:01:35 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r548981 - in head/Mk: . Uses Message-ID: <202009191301.08JD1a5c087273@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Sat Sep 19 13:01:35 2020 New Revision: 548981 URL: https://svnweb.freebsd.org/changeset/ports/548981 Log: Use correct target-cpu for power* CPU's Using CPUTYPE?=power9 causes warnings and emits unoptimized code. Rust supports pwr* instead of power*, e.g.: pwr3 pwr4 pwr5 pwr5x pwr6 pwr6x pwr7 pwr8 pwr9 Modified: head/Mk/Uses/cargo.mk head/Mk/bsd.gecko.mk Modified: head/Mk/Uses/cargo.mk ============================================================================== --- head/Mk/Uses/cargo.mk Sat Sep 19 13:01:00 2020 (r548980) +++ head/Mk/Uses/cargo.mk Sat Sep 19 13:01:35 2020 (r548981) @@ -74,6 +74,8 @@ CARGO_ENV+= \ # 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=/} +.elif ${ARCH} == powerpc64 +RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif Modified: head/Mk/bsd.gecko.mk ============================================================================== --- head/Mk/bsd.gecko.mk Sat Sep 19 13:01:00 2020 (r548980) +++ head/Mk/bsd.gecko.mk Sat Sep 19 13:01:35 2020 (r548981) @@ -107,6 +107,8 @@ MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/appli # 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=/} +.elif ${ARCH} == powerpc64 +RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009191301.08JD1a5c087273>