summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-09-19 13:01:35 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-09-19 13:01:35 +0000
commita9e0b11546a76316c08818f0e21d4496a90cbbc4 (patch)
tree7ee75e5629f1f9a5adae0bf41f2d3f1b596c1731
parentRemove expired ports: (diff)
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
Notes
Notes: svn path=/head/; revision=548981
-rw-r--r--Mk/Uses/cargo.mk2
-rw-r--r--Mk/bsd.gecko.mk2
2 files changed, 4 insertions, 0 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 1de075adcbca..d443cac9c973 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -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
diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk
index a93b76383db3..47e37dcfe0cd 100644
--- a/Mk/bsd.gecko.mk
+++ b/Mk/bsd.gecko.mk
@@ -107,6 +107,8 @@ MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications
# 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