aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/rust-bootstrap/Makefile2
-rw-r--r--lang/rust/Makefile13
2 files changed, 7 insertions, 8 deletions
diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile
index fbab19ccc909..735bd717559b 100644
--- a/lang/rust-bootstrap/Makefile
+++ b/lang/rust-bootstrap/Makefile
@@ -140,11 +140,11 @@ post-patch:
.if ${FLAVOR} == powerpc64_elfv1
@${REINPLACE_CMD} -e 's,"c++","stdc++",g' \
${WRKSRC}/compiler/rustc_llvm/build.rs
-.endif
@${REINPLACE_CMD} -e 's,%CC%,${CC},g' \
-e 's,%WRKDIR%,${WRKDIR},g' \
${WRKSRC}/compiler/rustc_llvm/build.rs \
${WRKSRC}/src/bootstrap/native.rs
+.endif
do-configure:
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 400eb27e9558..63acaac06de2 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -124,11 +124,16 @@ post-patch:
# Disable vendor checksums
@${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \
${CARGO_VENDOR_DIR}/*/.cargo-checksum.json
-.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 && ${LOCALBASE} != /usr/local
+.if defined(PPC_ABI) && ${PPC_ABI} == ELFv1
+ @${REINPLACE_CMD} 's,%CC%,${CC},g' \
+ ${WRKSRC}/compiler/rustc_llvm/build.rs \
+ ${WRKSRC}/src/bootstrap/native.rs
+.if ${LOCALBASE} != /usr/local
@${REINPLACE_CMD} 's,/usr/local/,${LOCALBASE}/,g' \
${WRKSRC}/compiler/rustc_llvm/build.rs \
${WRKSRC}/src/bootstrap/native.rs
.endif
+.endif
do-configure:
# Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64
@@ -210,12 +215,6 @@ do-configure:
# Don't abort if optional tools fail to build
@${ECHO_CMD} 'missing-tools=true' >> ${WRKSRC}/config.toml
.endif
- @${REINPLACE_CMD} 's,%CC%,${CC},g' \
- ${WRKSRC}/src/bootstrap/native.rs
-# this reinplace_cmd is used for ppc64-elfv1, don't remove it
-# even if sed_checked.sh says it's unused
- @${REINPLACE_CMD} 's,%CC%,${CC},g' \
- ${WRKSRC}/compiler/rustc_llvm/build.rs
do-build:
@cd ${WRKSRC} && \