aboutsummaryrefslogtreecommitdiff
path: root/lang/rust-bootstrap/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/rust-bootstrap/Makefile')
-rw-r--r--lang/rust-bootstrap/Makefile45
1 files changed, 11 insertions, 34 deletions
diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile
index d5d0f3a2c3d2..17f7d487c6f1 100644
--- a/lang/rust-bootstrap/Makefile
+++ b/lang/rust-bootstrap/Makefile
@@ -2,7 +2,7 @@
# to upload them to ~/public_distfiles on freefall in preparation
# for the next lang/rust update.
PORTNAME= rust
-PORTVERSION= 1.56.0
+PORTVERSION= 1.77.0
CATEGORIES= lang
MASTER_SITES= https://static.rust-lang.org/dist/
PKGNAMEPREFIX= ${FLAVOR:S/_/-/g}-
@@ -12,29 +12,26 @@ DIST_SUBDIR= rust
MAINTAINER= rust@FreeBSD.org
COMMENT= Create bootstrap compilers for building lang/rust
+WWW= https://www.rust-lang.org/
LICENSE= APACHE20 MIT
LICENSE_COMB= dual
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE
LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT
-ONLY_FOR_ARCHS= amd64
+ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le
ONLY_FOR_ARCHS_REASON= untested on other architectures
BUILD_DEPENDS= ${FLAVOR:S/_/-/g}-freebsd-sysroot>=a2021.09.14:devel/freebsd-sysroot@${FLAVOR} \
- cmake:devel/cmake \
+ cmake:devel/cmake-core \
gmake:devel/gmake \
rust>=${PORTVERSION}:lang/rust
-FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 \
- powerpc64le powerpc
+FLAVORS= aarch64 amd64 armv7 i386 powerpc powerpc64 powerpc64le riscv64
FLAVOR?= ${FLAVORS:[1]}
-USES= cpe ninja:build perl5 python:3.6+,build tar:xz
+USES= cpe ninja:build perl5 python:build tar:xz
CPE_VENDOR= ${PORTNAME}-lang
-.if ${FLAVOR} == powerpc64_elfv1
-USE_GCC= 9:build
-.endif
# for openssl-src crate
USE_PERL5= build
PATCHDIR= ${.CURDIR}/../rust/files
@@ -49,29 +46,25 @@ NO_ARCH= yes
_CARGO_VENDOR_DIR= ${WRKSRC}/vendor
_RUST_ARCH_amd64= x86_64
_RUST_ARCH_i386= i686
-_RUST_ARCH_powerpc64_elfv1= powerpc64
-_RUST_ARCH_powerpc64_elfv2= powerpc64
+_RUST_ARCH_powerpc64= powerpc64
+_RUST_ARCH_riscv64= riscv64gc
_RUST_HOST= ${_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl}
_RUST_TARGET= ${_RUST_ARCH_${FLAVOR}:U${FLAVOR}}-unknown-${OPSYS:tl}
_RUST_LLVM_TARGET= ${_RUST_LLVM_TARGET_${FLAVOR}}
_RUST_LLVM_TARGET_aarch64= AArch64
_RUST_LLVM_TARGET_amd64= X86
-_RUST_LLVM_TARGET_armv6= ARM
_RUST_LLVM_TARGET_armv7= ARM
_RUST_LLVM_TARGET_i386= X86
-_RUST_LLVM_TARGET_powerpc64_elfv1= PowerPC
-_RUST_LLVM_TARGET_powerpc64_elfv2= PowerPC
+_RUST_LLVM_TARGET_powerpc64= PowerPC
_RUST_LLVM_TARGET_powerpc64le= PowerPC
_RUST_LLVM_TARGET_powerpc= PowerPC
+_RUST_LLVM_TARGET_riscv64= RISCV
.include <bsd.port.pre.mk>
.if ${OPSYS} != FreeBSD
IGNORE= is only for FreeBSD
.endif
-.if ${FLAVOR} == powerpc64le && ${OSVERSION} < 1300116
-IGNORE= will not build on 12.x due to old system
-.endif
.if exists(${PATCHDIR}/${FLAVOR:S/_/-/})
EXTRA_PATCHES+= ${PATCHDIR}/${FLAVOR:S/_/-/}
@@ -81,14 +74,6 @@ post-patch:
# Disable vendor checksums
@${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \
${_CARGO_VENDOR_DIR}/*/.cargo-checksum.json
-.if ${FLAVOR} == powerpc64_elfv1
- @${REINPLACE_CMD} -e 's,"c++","stdc++",g' \
- ${WRKSRC}/compiler/rustc_llvm/build.rs
- @${REINPLACE_CMD} -e 's,%CC%,${CC},g' \
- -e 's,%WRKDIR%,${LOCALBASE}/freebsd-sysroot/powerpc64-elfv1,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
@@ -115,9 +100,6 @@ do-configure:
@${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml
@${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'link-shared=false' >> ${WRKSRC}/config.toml
-.if ${FLAVOR} == powerpc64_elfv1
- @${ECHO_CMD} 'static-libstdcpp=true' >> ${WRKSRC}/config.toml
-.endif
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
@${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml
.else
@@ -148,17 +130,12 @@ do-configure:
do-build:
@cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py dist --jobs=${MAKE_JOBS_NUMBER} \
- cargo src/librustc library/std
+ cargo rustc rust-std
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/rust-bootstrap/${FLAVOR}
${INSTALL_DATA} ${WRKDIR}/_build/dist/*-${_RUST_ARCH_${FLAVOR}:U${FLAVOR}}-unknown-${OPSYS:tl}${EXTRACT_SUFX} \
${STAGEDIR}${PREFIX}/rust-bootstrap/${FLAVOR}
-.if ${FLAVOR:Mpowerpc64_*}
- @cd ${STAGEDIR}${PREFIX}/rust-bootstrap/${FLAVOR} && for f in *${EXTRACT_SUFX}; do \
- ${MV} $$f $${f%%${EXTRACT_SUFX}}-${FLAVOR:S/_/ /:[2]}${EXTRACT_SUFX}; \
- done
-.endif
@cd ${STAGEDIR}${PREFIX} && \
${FIND} rust-bootstrap -type f >> ${TMPPLIST}