diff options
Diffstat (limited to 'lang/rust/Makefile')
-rw-r--r-- | lang/rust/Makefile | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 568ec5e938a1..eb4f70f4b583 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,5 +1,5 @@ PORTNAME= rust -PORTVERSION?= 1.77.0 +PORTVERSION?= 1.78.0 PORTREVISION?= 0 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ @@ -67,8 +67,8 @@ WASM_VARS= _COMPONENTS+="rust-analysis-${_PACKAGE_VERS}-wasm32-unknown-unknown _RUST_TARGETS+=wasm32-unknown-unknown # See WRKSRC/src/stage0.json for the date and version values -BOOTSTRAPS_DATE?= 2024-02-08 -RUST_BOOTSTRAP_VERSION?= 1.76.0 +BOOTSTRAPS_DATE?= 2024-03-21 +RUST_BOOTSTRAP_VERSION?= 1.77.0 CARGO_VENDOR_DIR?= ${WRKSRC}/vendor @@ -101,17 +101,17 @@ IGNORE= is only for FreeBSD .if ${ARCH} == powerpc LIB_DEPENDS+= libatomic.so:lang/gcc${GCC_DEFAULT} MAKE_ENV+= RUSTFLAGS="-L/usr/local/lib/gcc${GCC_DEFAULT}" -.else -MAKE_ENV+= RUST_BACKTRACE=1 -.endif - # rls doesn't build on rust nightly # rls needs 64-bit atomics: it doesn't build on powerpc -.if !defined(NIGHTLY_DATE) && ${ARCH} != powerpc +.elif !defined(NIGHTLY_DATE) _RUST_TOOLS+= rls _COMPONENTS+= rls-${_PACKAGE_VERS}-${_RUST_TARGET} .endif +.if ${ARCH} != powerpc64le +MAKE_ENV+= RUST_BACKTRACE=1 +.endif + # per https://rust-lang.github.io/rustup/concepts/components.html # rustc-dev is only usefull on nightly .if defined(NIGHTLY_DATE) @@ -153,7 +153,9 @@ do-configure: @cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \ ${SH} install.sh --prefix=${WRKDIR}/bootstrap --verbose .endfor +.if !defined(NIGHTLY_DATE) @${ECHO_CMD} 'changelog-seen=2' > ${WRKSRC}/config.toml +.endif @${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'build-dir="${WRKDIR}/_build"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'build-stage=2' >> ${WRKSRC}/config.toml @@ -187,6 +189,7 @@ do-configure: .if ${PORT_OPTIONS:MLTO} @${ECHO_CMD} 'lto="thin"' >> ${WRKSRC}/config.toml .endif + @${ECHO_CMD} 'remap-debuginfo=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml .if ${PORT_OPTIONS:MLTO} @${ECHO_CMD} 'thin-lto=true' >> ${WRKSRC}/config.toml @@ -201,12 +204,10 @@ do-configure: # Rust doesn't call the system compiler with the full version of the target. # This makes powerpc miscompile due to the secure-plt ABI change. # Additionally, force using ld.bfd to work around a linking problem in rustc_mir - @${PRINTF} '#!/bin/sh\nexec ${CC} "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/cc-wrapper + @${PRINTF} '#!/bin/sh\nexec ${CC} "$$@" --target=powerpc-unknown-freebsd13.2' > ${WRKDIR}/cc-wrapper @${CHMOD} +x ${WRKDIR}/cc-wrapper - @${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/cxx-wrapper + @${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.2' > ${WRKDIR}/cxx-wrapper @${CHMOD} +x ${WRKDIR}/cxx-wrapper - @${PRINTF} '#!/bin/sh\nexec ${CC} -fuse-ld=bfd "$$@" --target=powerpc-unknown-freebsd13.0' > ${WRKDIR}/ld-wrapper - @${CHMOD} +x ${WRKDIR}/ld-wrapper .endif .for _target in ${_RUST_TARGETS} @${ECHO_CMD} '[target.${_target}]' >> ${WRKSRC}/config.toml @@ -218,11 +219,7 @@ do-configure: @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml .endif -.if ${ARCH} == powerpc - @${ECHO_CMD} 'linker="${WRKDIR}/ld-wrapper"' >> ${WRKSRC}/config.toml -.else @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml -.endif .if ${PORT_OPTIONS:MPORT_LLVM} @${ECHO_CMD} 'llvm-config="${LOCALBASE}/bin/${LLVM_CONFIG}"' >> ${WRKSRC}/config.toml .endif |