Changeset View
Changeset View
Standalone View
Standalone View
lang/rust/Makefile
# Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | # Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= rust | PORTNAME= rust | ||||
PORTVERSION?= 1.44.1 | PORTVERSION?= 1.45.0 | ||||
PORTREVISION?= 1 | PORTREVISION?= 0 | ||||
CATEGORIES= lang | CATEGORIES= lang | ||||
MASTER_SITES= https://static.rust-lang.org/dist/:src \ | MASTER_SITES= https://dev-static.rust-lang.org/dist/:src \ | ||||
LOCAL/tobik/rust:bootstrap \ | LOCAL/tobik/rust:bootstrap \ | ||||
https://static.rust-lang.org/dist/:bootstrap | https://static.rust-lang.org/dist/:bootstrap | ||||
DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src | ||||
DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ | DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ | ||||
${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ | ${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ | ||||
${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ | ${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ | ||||
${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap | ${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap | ||||
DIST_SUBDIR?= rust | DIST_SUBDIR?= rust | ||||
MAINTAINER= rust@FreeBSD.org | MAINTAINER= rust@FreeBSD.org | ||||
COMMENT= Language with a focus on memory safety and concurrency | COMMENT= Language with a focus on memory safety and concurrency | ||||
LICENSE= APACHE20 MIT | LICENSE= APACHE20 MIT | ||||
LICENSE_COMB= dual | LICENSE_COMB= dual | ||||
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE | LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE | ||||
LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT | LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT | ||||
IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 | IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 | ||||
ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 | ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 | ||||
ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler | ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler | ||||
BUILD_DEPENDS= cmake:devel/cmake \ | BUILD_DEPENDS= cmake:devel/cmake \ | ||||
libgit2>=1.0.0:devel/libgit2 | libgit2>=1.0.0:devel/libgit2 \ | ||||
.if defined(NIGHTLY_DATE) | ninja:devel/ninja | ||||
BUILD_DEPENDS+= ninja:devel/ninja | |||||
.endif | |||||
LIB_DEPENDS= libcurl.so:ftp/curl \ | LIB_DEPENDS= libcurl.so:ftp/curl \ | ||||
libgit2.so:devel/libgit2 \ | libgit2.so:devel/libgit2 \ | ||||
libssh2.so:security/libssh2 | libssh2.so:security/libssh2 | ||||
USES= pkgconfig python:3.3+,build ssl tar:xz | USES= pkgconfig python:3.3+,build ssl tar:xz | ||||
MAKE_ENV= LIBGIT2_SYS_USE_PKG_CONFIG=1 \ | MAKE_ENV= LIBGIT2_SYS_USE_PKG_CONFIG=1 \ | ||||
LIBSSH2_SYS_USE_PKG_CONFIG=1 \ | LIBSSH2_SYS_USE_PKG_CONFIG=1 \ | ||||
Show All 14 Lines | |||||
DOCS_VARS= _RUST_BUILD_DOCS=true | DOCS_VARS= _RUST_BUILD_DOCS=true | ||||
DOCS_VARS_OFF= _RUST_BUILD_DOCS=false | DOCS_VARS_OFF= _RUST_BUILD_DOCS=false | ||||
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb | ||||
WASM_VARS= _RUST_BUILD_WASM=true \ | WASM_VARS= _RUST_BUILD_WASM=true \ | ||||
_RUST_TARGETS+=wasm32-unknown-unknown | _RUST_TARGETS+=wasm32-unknown-unknown | ||||
WASM_VARS_OFF= _RUST_BUILD_WASM=false | WASM_VARS_OFF= _RUST_BUILD_WASM=false | ||||
# See WRKSRC/src/stage0.txt for the date and version values. | # See WRKSRC/src/stage0.txt for the date and version values. | ||||
BOOTSTRAPS_DATE?= 2020-05-07 | BOOTSTRAPS_DATE?= 2020-06-18 | ||||
RUST_BOOTSTRAP_VERSION?= 1.43.1 | RUST_BOOTSTRAP_VERSION?= 1.44.1 | ||||
CARGO_BOOTSTRAP_VERSION?= 0.44.0 | CARGO_BOOTSTRAP_VERSION?= 0.45.1 | ||||
BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} | ||||
BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} | ||||
CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | CARGO_VENDOR_DIR?= ${WRKSRC}/vendor | ||||
# Rust's target arch string might be different from *BSD arch strings | # Rust's target arch string might be different from *BSD arch strings | ||||
_RUST_ARCH_amd64= x86_64 | _RUST_ARCH_amd64= x86_64 | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | .endif | ||||
@${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml | @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml | ||||
.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) | .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) | ||||
@${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml | ||||
.else | .else | ||||
@${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml | ||||
.endif | .endif | ||||
.if defined(NIGHTLY_DATE) | |||||
@${ECHO_CMD} 'ninja=true' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'ninja=true' >> ${WRKSRC}/config.toml | ||||
.endif | |||||
.if ${ARCH} == armv6 | .if ${ARCH} == armv6 | ||||
# fails to link with base ld.bfd: rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p39ey-cgu.13.rcgu.o) | # fails to link with base ld.bfd: rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p39ey-cgu.13.rcgu.o) | ||||
@${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=lld "$$@"' > ${WRKDIR}/cc-wrapper | @${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=lld "$$@"' > ${WRKDIR}/cc-wrapper | ||||
@${CHMOD} +x ${WRKDIR}/cc-wrapper | @${CHMOD} +x ${WRKDIR}/cc-wrapper | ||||
.endif | .endif | ||||
.for _target in ${_RUST_TARGETS} | .for _target in ${_RUST_TARGETS} | ||||
@${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml | @${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml | ||||
@${ECHO_CMD} 'ar="${AR}"' >> ${WRKSRC}/config.toml | @${ECHO_CMD} 'ar="${AR}"' >> ${WRKSRC}/config.toml | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |