svn commit: r548981 - in head/Mk: . Uses

Piotr Kubaj pkubaj at FreeBSD.org
Sat Sep 19 13:01:36 UTC 2020


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


More information about the svn-ports-all mailing list