summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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