Index: Mk/Uses/cargo.mk =================================================================== --- Mk/Uses/cargo.mk +++ Mk/Uses/cargo.mk @@ -44,17 +44,21 @@ # slow grep runs for every CARGO_CRATE_EXT access. CARGO_CRATE_EXT= ${defined(_CARGO_CRATE_EXT_CACHE):?${_CARGO_CRATE_EXT_CACHE}:${:!if ${GREP} -q '\(${CARGO_DIST_SUBDIR}/.*\.tar\.gz\)' "${DISTINFO_FILE}" 2>/dev/null; then ${ECHO_CMD} .tar.gz; else ${ECHO_CMD} .crate; fi!:_=_CARGO_CRATE_EXT_CACHE}} .endif -.for _crate in ${CARGO_CRATES} +# enumerate crates for unqiue and sane distfile group names +_CARGO_CRATES:= ${CARGO_CRATES:range:@i@$i ${CARGO_CRATES:[$i]}@} +# split up crates into (index, crate, name, version) 4-tuples +_CARGO_CRATES:= ${_CARGO_CRATES:C/^([-_a-zA-Z0-9]+)-([0-9].*)/\0 \1 \2/} +.for _index _crate _name _version in ${_CARGO_CRATES} # Resolving CRATESIO alias is very inefficient with many MASTER_SITES, consume MASTER_SITE_CRATESIO directly -MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_crate:C/^([-_a-zA-Z0-9]+)-[0-9].*/\1/}/${_crate:C/^[-_a-zA-Z0-9]+-([0-9].*)/\1/},:S,$,:cargo_${_crate:C/[^a-zA-Z0-9_]//g},} -DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:cargo_${_crate:C/[^a-zA-Z0-9_]//g} +MASTER_SITES+= ${MASTER_SITE_CRATESIO:S,%SUBDIR%,${_name}/${_version},:S,$,:_cargo_${_index},} +DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:_cargo_${_index} .endfor # Build dependencies. CARGO_BUILDDEP?= yes .if ${CARGO_BUILDDEP:tl} == "yes" -BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} +BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.52.0:lang/${RUST_DEFAULT} .endif # Location of cargo binary (default to lang/rust's Cargo binary) @@ -91,6 +95,7 @@ .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 USE_GCC?= yes +STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip .endif # Helper to shorten cargo calls. @@ -139,45 +144,31 @@ CARGO_INSTALL_ARGS+= --debug .endif -.if ${CARGO_CRATES:Mcmake-[0-9]*} +.if ${_CARGO_CRATES:Mcmake} BUILD_DEPENDS+= cmake:devel/cmake .endif -.if ${CARGO_CRATES:Mgettext-sys-[0-9]*} +.if ${_CARGO_CRATES:Mgettext-sys} CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \ GETTEXT_INCLUDE_DIR=${LOCALBASE}/include \ GETTEXT_LIB_DIR=${LOCALBASE}/lib .endif -.if ${CARGO_CRATES:Mjemalloc-sys-[0-9]*} +.if ${_CARGO_CRATES:Mjemalloc-sys} BUILD_DEPENDS+= gmake:devel/gmake .endif -.for libc in ${CARGO_CRATES:Mlibc-[0-9]*} -# FreeBSD 12.0 changed ABI: r318736 and r320043 -# https://github.com/rust-lang/libc/commit/78f93220d70e -# https://github.com/rust-lang/libc/commit/969ad2b73cdc -_libc_VER= ${libc:C/.*-//} -. if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 38) -DEV_ERROR+= "CARGO_CRATES=${libc} may be unstable on FreeBSD 12.0. Consider updating to the latest version \(higher than 0.2.37\)." -. endif -. if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 49) -DEV_ERROR+= "CARGO_CRATES=${libc} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)." -. endif -.undef _libc_VER -.endfor - -.if ${CARGO_CRATES:Mlibgit2-sys-[0-9]*} +.if ${_CARGO_CRATES:Mlibgit2-sys} # Use the system's libgit2 instead of building the bundled version CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1 .endif -.if ${CARGO_CRATES:Mlibssh2-sys-[0-9]*} +.if ${_CARGO_CRATES:Mlibssh2-sys} # Use the system's libssh2 instead of building the bundled version CARGO_ENV+= LIBSSH2_SYS_USE_PKG_CONFIG=1 .endif -.if ${CARGO_CRATES:Monig_sys-[0-9]*} +.if ${_CARGO_CRATES:Monig_sys} # onig_sys always prefers the system library but will try to link # statically with it. Since devel/oniguruma doesn't provide a static # library it'll link to libonig.so instead. Strictly speaking setting @@ -186,32 +177,43 @@ CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 .endif -.if ${CARGO_CRATES:Mopenssl-0.[0-9].*} -# FreeBSD 12.0 updated base OpenSSL in r339270: -# https://github.com/sfackler/rust-openssl/commit/276577553501 -. if !exists(${PATCHDIR}/patch-openssl-1.1.1) # skip if backported -_openssl_VER= ${CARGO_CRATES:Mopenssl-0.[0-9].*:C/.*-//} -. if ${_openssl_VER:R:R} == 0 && (${_openssl_VER:R:E} < 10 || ${_openssl_VER:R:E} == 10 && ${_openssl_VER:E} < 4) -DEV_WARNING+= "CARGO_CRATES=openssl-0.10.3 or older do not support OpenSSL 1.1.1. Consider updating to the latest version." -. endif -. endif -.undef _openssl_VER -.endif - -.if ${CARGO_CRATES:Mopenssl-src-[0-9]*} +.if ${_CARGO_CRATES:Mopenssl-src} DEV_WARNING+= "Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=${CARGO_CRATES:Mopenssl-src-[0-9]*} (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately." .endif -.if ${CARGO_CRATES:Mopenssl-sys-[0-9]*} +.if ${_CARGO_CRATES:Mopenssl-sys} # Make sure that openssl-sys can find the correct version of OpenSSL CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \ OPENSSL_INCLUDE_DIR=${OPENSSLINC} .endif -.if ${CARGO_CRATES:Mpkg-config-[0-9]*} +.if ${_CARGO_CRATES:Mpkg-config} .include "${USESDIR}/pkgconfig.mk" .endif +.for _index _crate _name _version in ${_CARGO_CRATES} +# Split up semantic version and try to sanitize it by removing +# pre-release identifier (-) or build metadata (+) +. if ${_version:S/./ /:S/./ /:C/[-+].*//:_:[#]} == 3 +. for _major _minor _patch in $_ +# FreeBSD 12.0 changed ABI: r318736 and r320043 +# https://github.com/rust-lang/libc/commit/78f93220d70e +# https://github.com/rust-lang/libc/commit/969ad2b73cdc +. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 38)) +DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on FreeBSD 12.0. Consider updating to the latest version \(higher than 0.2.37\)." +. endif +. if ${_name} == libc && ${_major} == 0 && (${_minor} < 2 || (${_minor} == 2 && ${_patch} < 49)) +DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)." +. endif +# FreeBSD 12.0 updated base OpenSSL in r339270: +# https://github.com/sfackler/rust-openssl/commit/276577553501 +. if ${_name} == openssl && !exists(${PATCHDIR}/patch-openssl-1.1.1) && ${_major} == 0 && (${_minor} < 10 || (${_minor} == 10 && ${_patch} < 4)) +DEV_WARNING+= "CARGO_CRATES=${_crate} does not support OpenSSL 1.1.1. Consider updating to the latest version \(higher than 0.10.3\)." +. endif +. endfor +. endif +.endfor + _USES_extract+= 600:cargo-extract cargo-extract: # target for preparing crates directory. It will put all crates in Index: Mk/bsd.gecko.mk =================================================================== --- Mk/bsd.gecko.mk +++ Mk/bsd.gecko.mk @@ -76,7 +76,7 @@ BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ rust-cbindgen>=0.16.0:devel/rust-cbindgen \ - ${RUST_DEFAULT}>=1.51.0:lang/${RUST_DEFAULT} \ + ${RUST_DEFAULT}>=1.52.0:lang/${RUST_DEFAULT} \ node:www/node LIB_DEPENDS+= libdrm.so:graphics/libdrm MOZ_EXPORT+= ${CONFIGURE_ENV} \ Index: lang/rust-bootstrap/Makefile =================================================================== --- lang/rust-bootstrap/Makefile +++ 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.51.0 +PORTVERSION= 1.52.0 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:rust \ LOCAL/mikael:armbase \ @@ -24,6 +24,7 @@ LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT +IGNORE= ignore for exp-run ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= untested on other archs @@ -31,7 +32,8 @@ gmake:devel/gmake \ rust>=${PORTVERSION}:lang/rust -FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 powerpc64le +FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 \ + powerpc64le powerpc FLAVOR?= ${FLAVORS:[1]} aarch64_PKGNAMEPREFIX= aarch64- @@ -40,6 +42,7 @@ armv6_PKGNAMEPREFIX= armv6- armv7_PKGNAMEPREFIX= armv7- i386_PKGNAMEPREFIX= i386- +powerpc_PKGNAMEPREFIX= powerpc- powerpc64_elfv1_PKGNAMEPREFIX= powerpc64-elfv1- powerpc64_elfv1_BUILD_DEPENDS= powerpc64-gcc9>0:devel/freebsd-gcc9@powerpc64 powerpc64_elfv2_PKGNAMEPREFIX= powerpc64-elfv2- @@ -66,6 +69,7 @@ _RUST_FBSD_DIST_armv6= FreeBSD-${_RUST_FBSD_VER}-arm-armv6${EXTRACT_SUFX}:armbase _RUST_FBSD_DIST_armv7= FreeBSD-${_RUST_FBSD_VER}-arm-armv7${EXTRACT_SUFX}:armbase _RUST_FBSD_DIST_i386= FreeBSD-${_RUST_FBSD_VER}-i386${EXTRACT_SUFX}:base +_RUST_FBSD_DIST_powerpc= FreeBSD-${_RUST_FBSD_VER}-powerpc${EXTRACT_SUFX}:base _RUST_FBSD_DIST_powerpc64_elfv1= FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv1${EXTRACT_SUFX}:base \ FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv1-gcc9-9.3.0${EXTRACT_SUFX}:powerpc64_gcc _RUST_FBSD_DIST_powerpc64_elfv2= FreeBSD-${_RUST_FBSD_VER}-powerpc64-elfv2-v1300123${EXTRACT_SUFX}:base @@ -73,12 +77,14 @@ _RUST_FBSD_VER= ${_RUST_FBSD_VER_${FLAVOR}:U11.4-RELEASE} _RUST_FBSD_VER_aarch64= 12.2-RELEASE _RUST_FBSD_VER_armv7= 12.2-RELEASE +_RUST_FBSD_VER_powerpc= 13.0-RELEASE _RUST_FBSD_VER_powerpc64_elfv1= 12.2-RELEASE _RUST_FBSD_VER_powerpc64_elfv2= 13.0-CURRENT _RUST_FBSD_VER_powerpc64le= 13.0-CURRENT _RUST_FBSD_SUBDIR_aarch64= releases/arm64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_amd64= releases/amd64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_i386= releases/i386/${_RUST_FBSD_VER}/base.txz?dummy= +_RUST_FBSD_SUBDIR_powerpc= releases/powerpc/powerpc/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64_elfv1= releases/powerpc/powerpc64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64_elfv2= snapshots/powerpc/powerpc64/${_RUST_FBSD_VER}/base.txz?dummy= _RUST_FBSD_SUBDIR_powerpc64le= snapshots/powerpc/powerpc64le/${_RUST_FBSD_VER}/base.txz?dummy= @@ -86,6 +92,7 @@ _CARGO_VENDOR_DIR= ${WRKSRC}/vendor _RUST_ARCH_amd64= x86_64 _RUST_ARCH_i386= i686 +_RUST_ARCH_powerpc= powerpc _RUST_ARCH_powerpc64_elfv1= powerpc64 _RUST_ARCH_powerpc64_elfv2= powerpc64 _RUST_ARCH_powerpc64le= powerpc64le @@ -97,12 +104,14 @@ _RUST_LLVM_TARGET_armv6= ARM _RUST_LLVM_TARGET_armv7= ARM _RUST_LLVM_TARGET_i386= X86 +_RUST_LLVM_TARGET_powerpc= PowerPC _RUST_LLVM_TARGET_powerpc64_elfv1= PowerPC _RUST_LLVM_TARGET_powerpc64_elfv2= PowerPC _RUST_LLVM_TARGET_powerpc64le= PowerPC _RUST_LLVM_TRIPLE= ${_RUST_LLVM_TRIPLE_${FLAVOR}:U${_RUST_TARGET}} _RUST_LLVM_TRIPLE_armv6= armv6-gnueabihf-freebsd _RUST_LLVM_TRIPLE_armv7= armv7-gnueabihf-freebsd +_RUST_LLVM_TRIPLE_powerpc= powerpc-unknown-freebsd13.0 # secure-plt .include Index: lang/rust-bootstrap/distinfo =================================================================== --- lang/rust-bootstrap/distinfo +++ lang/rust-bootstrap/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1616754064 -SHA256 (rust/rustc-1.51.0-src.tar.xz) = 92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1 -SIZE (rust/rustc-1.51.0-src.tar.xz) = 109596164 +TIMESTAMP = 1620106541 +SHA256 (rust/rustc-1.52.0-src.tar.xz) = 2393e923087f3f8f98190eb0743f1b4a8956a35274ae5d3c0fae6e43238c6af8 +SIZE (rust/rustc-1.52.0-src.tar.xz) = 115114564 SHA256 (FreeBSD-12.2-RELEASE-arm64.tar.xz) = 3f82224fbcc6b2a2e1a1358cec5f32c0a08b5c5e6796e1a998369eb624a11cf3 SIZE (FreeBSD-12.2-RELEASE-arm64.tar.xz) = 158493712 SHA256 (FreeBSD-11.4-RELEASE-amd64.tar.xz) = 3bac8257bdd5e5b071f7b80cc591ebecd01b9314ca7839a2903096cbf82169f9 @@ -11,6 +11,8 @@ SIZE (FreeBSD-12.2-RELEASE-arm-armv7.tar.xz) = 70116512 SHA256 (FreeBSD-11.4-RELEASE-i386.tar.xz) = ae602552ff4c26f31b304e4a1ffc066db826e75d07ba9a4bf33649e9549bf27b SIZE (FreeBSD-11.4-RELEASE-i386.tar.xz) = 110296208 +SHA256 (FreeBSD-13.0-RELEASE-powerpc.tar.xz) = 8d980deacf7db15775445d00ce49b56a2a8eb519994052a92d2c6a40985910ab +SIZE (FreeBSD-13.0-RELEASE-powerpc.tar.xz) = 146274724 SHA256 (FreeBSD-12.2-RELEASE-powerpc64-elfv1.tar.xz) = 762ec55a9bd40dc93231e24f2df53c58d90b7cef63892b2740a59f9e8f40898e SIZE (FreeBSD-12.2-RELEASE-powerpc64-elfv1.tar.xz) = 109121900 SHA256 (FreeBSD-12.2-RELEASE-powerpc64-elfv1-gcc9-9.3.0.tar.xz) = b1bd46b347e0ef55e8868537aaefe323622adf6fa081bef9ca5f24fc711d40ea Index: lang/rust-nightly/Makefile =================================================================== --- lang/rust-nightly/Makefile +++ lang/rust-nightly/Makefile @@ -7,6 +7,7 @@ PKGNAMESUFFIX= -nightly DISTNAME= rustc-nightly-src +IGNORE= ignore for exp-run ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= upstream does not provide bootstraps for other architectures Index: lang/rust/Makefile =================================================================== --- lang/rust/Makefile +++ lang/rust/Makefile @@ -1,7 +1,7 @@ # Created by: Jyun-Yan You PORTNAME= rust -PORTVERSION?= 1.51.0 +PORTVERSION?= 1.52.0 PORTREVISION?= 0 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ @@ -24,8 +24,12 @@ LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT +BROKEN_powerpc= fails to link IGNORE_FreeBSD_11_powerpc64= is missing a bootstrap for FreeBSD 11.x powerpc64 -ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le +IGNORE_FreeBSD_11_powerpc= is missing a bootstrap for FreeBSD 11.x powerpc +IGNORE_FreeBSD_12_powerpc= is missing a bootstrap for FreeBSD 12.x powerpc +ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le \ + powerpc ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler BUILD_DEPENDS= cmake:devel/cmake @@ -57,8 +61,8 @@ WASM_VARS_OFF= _RUST_BUILD_WASM=false # See WRKSRC/src/stage0.txt for the date and version values. -BOOTSTRAPS_DATE?= 2021-02-11 -RUST_BOOTSTRAP_VERSION?= 1.50.0 +BOOTSTRAPS_DATE?= 2021-03-25 +RUST_BOOTSTRAP_VERSION?= 1.51.0 BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} @@ -87,6 +91,7 @@ # but we can build with a newer or older compiler as provided by USE_GCC=yes BUILD_DEPENDS+= gcc9:lang/gcc9 USE_GCC= yes +STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip .endif # remove when 11.4 is EOL Index: lang/rust/distinfo =================================================================== --- lang/rust/distinfo +++ lang/rust/distinfo @@ -1,51 +1,57 @@ -TIMESTAMP = 1616749421 -SHA256 (rust/rustc-1.51.0-src.tar.xz) = 92c68a91fca33cbafb83442cde722d010cc387dc1ee8a2680e2fb33a575821a1 -SIZE (rust/rustc-1.51.0-src.tar.xz) = 109596164 -SHA256 (rust/2021-02-11/rustc-1.50.0-aarch64-unknown-freebsd.tar.xz) = 35861e14be840d59465c3958d7bf56960be362f593f14f440329504d29bdc0e0 -SIZE (rust/2021-02-11/rustc-1.50.0-aarch64-unknown-freebsd.tar.xz) = 45220868 -SHA256 (rust/2021-02-11/rust-std-1.50.0-aarch64-unknown-freebsd.tar.xz) = e9a8237c2f3b8e7cf40608f48d27345a3c1601fa0ddcf8abfb94b879ca1a8bbc -SIZE (rust/2021-02-11/rust-std-1.50.0-aarch64-unknown-freebsd.tar.xz) = 17429788 -SHA256 (rust/2021-02-11/cargo-1.50.0-aarch64-unknown-freebsd.tar.xz) = 4daf13681f990bcf8d0ca28ab410e0a3d0e5b533772f55e7568eea7e61bca89a -SIZE (rust/2021-02-11/cargo-1.50.0-aarch64-unknown-freebsd.tar.xz) = 4287964 -SHA256 (rust/2021-02-11/rustc-1.50.0-x86_64-unknown-freebsd.tar.xz) = c0148c65ab21f7a49f6d393ba140bf53c05e73276383dd7eb2b65048b1ba4a16 -SIZE (rust/2021-02-11/rustc-1.50.0-x86_64-unknown-freebsd.tar.xz) = 47818616 -SHA256 (rust/2021-02-11/rust-std-1.50.0-x86_64-unknown-freebsd.tar.xz) = c9ff9ef502675bf40f8d7a806d967551f8c3402ff54c48aec7afd63291f64009 -SIZE (rust/2021-02-11/rust-std-1.50.0-x86_64-unknown-freebsd.tar.xz) = 21624016 -SHA256 (rust/2021-02-11/cargo-1.50.0-x86_64-unknown-freebsd.tar.xz) = 1a49a9aa5374258499048c163de3f0c736f75d12210f299afdbca2099060926d -SIZE (rust/2021-02-11/cargo-1.50.0-x86_64-unknown-freebsd.tar.xz) = 5073160 -SHA256 (rust/2021-02-11/rustc-1.50.0-armv6-unknown-freebsd.tar.xz) = 628987b6f5cd018a650d1a0b1ec27132cf0a1dd0dd6bffb4387a72466ecb9460 -SIZE (rust/2021-02-11/rustc-1.50.0-armv6-unknown-freebsd.tar.xz) = 46037188 -SHA256 (rust/2021-02-11/rust-std-1.50.0-armv6-unknown-freebsd.tar.xz) = ed722bfe0c3c3267550767afc59d5d93056018cd664d1182dce3b187d00d3b96 -SIZE (rust/2021-02-11/rust-std-1.50.0-armv6-unknown-freebsd.tar.xz) = 17375956 -SHA256 (rust/2021-02-11/cargo-1.50.0-armv6-unknown-freebsd.tar.xz) = 27ce8e045304146879c48792447de0eb09e92c0e9ce27d80f4dc5d96a005adf8 -SIZE (rust/2021-02-11/cargo-1.50.0-armv6-unknown-freebsd.tar.xz) = 4459520 -SHA256 (rust/2021-02-11/rustc-1.50.0-armv7-unknown-freebsd.tar.xz) = 479b2c740e1244863f4450bb800e96832182b80dcfdc6f8c70d0248bac312e4f -SIZE (rust/2021-02-11/rustc-1.50.0-armv7-unknown-freebsd.tar.xz) = 46085828 -SHA256 (rust/2021-02-11/rust-std-1.50.0-armv7-unknown-freebsd.tar.xz) = cce6d3a91ba8f982ca218782be1ea0500add316bd83cbe3ce701ec1f10dcf498 -SIZE (rust/2021-02-11/rust-std-1.50.0-armv7-unknown-freebsd.tar.xz) = 17546932 -SHA256 (rust/2021-02-11/cargo-1.50.0-armv7-unknown-freebsd.tar.xz) = 307586fb4d0d33b861d008472b65f6bae9502b7ef44921881046442a81da32d6 -SIZE (rust/2021-02-11/cargo-1.50.0-armv7-unknown-freebsd.tar.xz) = 4453420 -SHA256 (rust/2021-02-11/rustc-1.50.0-i686-unknown-freebsd.tar.xz) = ad52fa90b986770ed2809aae666b9ebe3062b1b0f470fdaa519bc0633a4eab92 -SIZE (rust/2021-02-11/rustc-1.50.0-i686-unknown-freebsd.tar.xz) = 48989020 -SHA256 (rust/2021-02-11/rust-std-1.50.0-i686-unknown-freebsd.tar.xz) = d59650dea7fed2dbcc03fdc006d691c8fceb18db6ad575801e5b898ffbdf71a0 -SIZE (rust/2021-02-11/rust-std-1.50.0-i686-unknown-freebsd.tar.xz) = 21622960 -SHA256 (rust/2021-02-11/cargo-1.50.0-i686-unknown-freebsd.tar.xz) = 7b07204894a3c5c1f4b39e03c475d8a5ea523a30721af19ba49211c8f46e0cf4 -SIZE (rust/2021-02-11/cargo-1.50.0-i686-unknown-freebsd.tar.xz) = 5145204 -SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = a215d00ffd5e561471ded1ee546c66b3852c83a727f459c3c224eb78cfd67fd5 -SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 55203080 -SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = c80da6b2b3ba447550c311eda47748e1cf6620e095bec5e60c65d24e711f7eb6 -SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 17337608 -SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = b5347cc6d5369a93667249b68d19075971836c536128053abf768ed759bdde48 -SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 4946400 -SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 11a9ec86be232486f2f42f44e28b7be3baa7cc19d137d87a95851529e3e64f61 -SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 48136856 -SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 8c5ad05fcb0cf55c762ad6f85cbe0d67663cba0cdd82cfe1378d6004e4b4abeb -SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 17429708 -SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = bc9ea6b58fa346f1ed04ef21561a8cd81937eb61fa6c7a3272586336d734089e -SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64le-unknown-freebsd.tar.xz) = 4887040 -SHA256 (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = b88a9b5ea755207ad431852e009c1e0d993bffca40c6aaa69f76183876b5c603 -SIZE (rust/2021-02-11/rustc-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 46199556 -SHA256 (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = f55a7b1560aef7cbb44cbbffa6d0baee4598d715fe32865cf3fcae9951b2cd70 -SIZE (rust/2021-02-11/rust-std-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 17233672 -SHA256 (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = f8ea608809f9bd760e9e280d2b183b003727cae682eae16892cc570379e83d13 -SIZE (rust/2021-02-11/cargo-1.50.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4627136 +TIMESTAMP = 1620106398 +SHA256 (rust/rustc-1.52.0-src.tar.xz) = 2393e923087f3f8f98190eb0743f1b4a8956a35274ae5d3c0fae6e43238c6af8 +SIZE (rust/rustc-1.52.0-src.tar.xz) = 115114564 +SHA256 (rust/2021-03-25/rustc-1.51.0-aarch64-unknown-freebsd.tar.xz) = b99e089e21e76c2abbe00a445c2806b087982150fe50ae1e6624a6f7a0b6745c +SIZE (rust/2021-03-25/rustc-1.51.0-aarch64-unknown-freebsd.tar.xz) = 45630240 +SHA256 (rust/2021-03-25/rust-std-1.51.0-aarch64-unknown-freebsd.tar.xz) = fab3f64f429b473a3025b0716ec296a3d366d6e1a3fb1d58e7c5f7a88a216f11 +SIZE (rust/2021-03-25/rust-std-1.51.0-aarch64-unknown-freebsd.tar.xz) = 17938532 +SHA256 (rust/2021-03-25/cargo-1.51.0-aarch64-unknown-freebsd.tar.xz) = e405b04dbc11e87cd03c99208da8a7bd64cccd45728beaa811fe8c84a2619d97 +SIZE (rust/2021-03-25/cargo-1.51.0-aarch64-unknown-freebsd.tar.xz) = 4330412 +SHA256 (rust/2021-03-25/rustc-1.51.0-x86_64-unknown-freebsd.tar.xz) = 2107f1c368339082779e5eab3d808a4543999d40839e1c0da8fd87552e6bcd26 +SIZE (rust/2021-03-25/rustc-1.51.0-x86_64-unknown-freebsd.tar.xz) = 41500384 +SHA256 (rust/2021-03-25/rust-std-1.51.0-x86_64-unknown-freebsd.tar.xz) = a6a32bfa61ad496db773fd0a170f809df4fd0ec8c0e3bf58479ea2fa047c503f +SIZE (rust/2021-03-25/rust-std-1.51.0-x86_64-unknown-freebsd.tar.xz) = 21966524 +SHA256 (rust/2021-03-25/cargo-1.51.0-x86_64-unknown-freebsd.tar.xz) = 46fcc364f37bf36f82db01c4df21e9df48cf01329226f28d4da14c865f9202d8 +SIZE (rust/2021-03-25/cargo-1.51.0-x86_64-unknown-freebsd.tar.xz) = 5114456 +SHA256 (rust/2021-03-25/rustc-1.51.0-armv6-unknown-freebsd.tar.xz) = 18236f9a245f1e0cd50a9c51371363c2c41214298d7fdb5fc601cc25fc62c4fb +SIZE (rust/2021-03-25/rustc-1.51.0-armv6-unknown-freebsd.tar.xz) = 46581244 +SHA256 (rust/2021-03-25/rust-std-1.51.0-armv6-unknown-freebsd.tar.xz) = 9d362b1355d9c3a79f22730164108014621f571608babd969d625828a1480f71 +SIZE (rust/2021-03-25/rust-std-1.51.0-armv6-unknown-freebsd.tar.xz) = 17796144 +SHA256 (rust/2021-03-25/cargo-1.51.0-armv6-unknown-freebsd.tar.xz) = f534de1b4b321a837ee4ea8bd0be9c3e4f896ed2eb2f91d85b4b8dedf07cfb5c +SIZE (rust/2021-03-25/cargo-1.51.0-armv6-unknown-freebsd.tar.xz) = 4519100 +SHA256 (rust/2021-03-25/rustc-1.51.0-armv7-unknown-freebsd.tar.xz) = f44adf926e6e00348fcf44434799f2c468c8630b84301f63b5bf0d26080d0c10 +SIZE (rust/2021-03-25/rustc-1.51.0-armv7-unknown-freebsd.tar.xz) = 46639700 +SHA256 (rust/2021-03-25/rust-std-1.51.0-armv7-unknown-freebsd.tar.xz) = 57f90622006e9a1421e3500191cc3f5cfa1c9293db8ed6ddfef01c5754415775 +SIZE (rust/2021-03-25/rust-std-1.51.0-armv7-unknown-freebsd.tar.xz) = 17999588 +SHA256 (rust/2021-03-25/cargo-1.51.0-armv7-unknown-freebsd.tar.xz) = d5efa930bfe8bf0f7aaf1da54fad1560f58631c5602dcc04179ce6b815d547c0 +SIZE (rust/2021-03-25/cargo-1.51.0-armv7-unknown-freebsd.tar.xz) = 4506736 +SHA256 (rust/2021-03-25/rustc-1.51.0-i686-unknown-freebsd.tar.xz) = f2abf46e5a015565e50f48d89b832b76d3bc1a375d5b6a237b798b181785922c +SIZE (rust/2021-03-25/rustc-1.51.0-i686-unknown-freebsd.tar.xz) = 48953716 +SHA256 (rust/2021-03-25/rust-std-1.51.0-i686-unknown-freebsd.tar.xz) = bae5ecd3bbab8524de82f724e009ce432ff0058eef60063f7a7f89656554c265 +SIZE (rust/2021-03-25/rust-std-1.51.0-i686-unknown-freebsd.tar.xz) = 21965444 +SHA256 (rust/2021-03-25/cargo-1.51.0-i686-unknown-freebsd.tar.xz) = 1e0d6b99c15b018cd07f4aa1ba79e9e7c124d9878fd096ce0b518aa300434ecf +SIZE (rust/2021-03-25/cargo-1.51.0-i686-unknown-freebsd.tar.xz) = 5189996 +SHA256 (rust/2021-03-25/rustc-1.51.0-powerpc-unknown-freebsd.tar.xz) = 89b5155d16f6d3479d46e52c6931ce952331d9efcc0e9e5d995e12fc7f842d37 +SIZE (rust/2021-03-25/rustc-1.51.0-powerpc-unknown-freebsd.tar.xz) = 47793452 +SHA256 (rust/2021-03-25/rust-std-1.51.0-powerpc-unknown-freebsd.tar.xz) = f5cb293be6f62b918718d926fc95bf83ed6480b8dbd54172dcd5fddb0366411e +SIZE (rust/2021-03-25/rust-std-1.51.0-powerpc-unknown-freebsd.tar.xz) = 17510268 +SHA256 (rust/2021-03-25/cargo-1.51.0-powerpc-unknown-freebsd.tar.xz) = a01c7ac046b0039fea8e3d1fa024360bdcaeaf80a92aec913280fdb91e0358ca +SIZE (rust/2021-03-25/cargo-1.51.0-powerpc-unknown-freebsd.tar.xz) = 4948280 +SHA256 (rust/2021-03-25/rustc-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 77e9d3f93daa868582edc3082af75eca10e5343322ae9a64cda93c59a1856fa8 +SIZE (rust/2021-03-25/rustc-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 55795868 +SHA256 (rust/2021-03-25/rust-std-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 24034291852f2a7520caf0cbec9b935806bb8f39a9c07a93a8d6bc6a2bb1ed7e +SIZE (rust/2021-03-25/rust-std-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 17729920 +SHA256 (rust/2021-03-25/cargo-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = e31931bf88bf83848c8eb6aa84e661724db2ee8e43d2681d6e35bcfd036e5c69 +SIZE (rust/2021-03-25/cargo-1.51.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 5002568 +SHA256 (rust/2021-03-25/rustc-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 5f361c94a331f77810d9a2fb60221a8497682947a4309d9857a853bd93ecbc87 +SIZE (rust/2021-03-25/rustc-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 48689860 +SHA256 (rust/2021-03-25/rust-std-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 25f5d93c84b652e7ffd59420945aa7ab9701dc2a0f9a78fb353eb421351069a0 +SIZE (rust/2021-03-25/rust-std-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 17903604 +SHA256 (rust/2021-03-25/cargo-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 8235649059a53f102b6347562b8e055dff3e1a867544ef3c1faaf8b7073386b5 +SIZE (rust/2021-03-25/cargo-1.51.0-powerpc64le-unknown-freebsd.tar.xz) = 4937632 +SHA256 (rust/2021-03-25/rustc-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 145e708d27582fbf5ade6c9a9ebd3c3f70a65bd2e96fc3c806affd6ca08ec54e +SIZE (rust/2021-03-25/rustc-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 46681952 +SHA256 (rust/2021-03-25/rust-std-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 766ad03a8b1f206a8e249005dfd9db68e401e05ddf3a31d244e7f1b30b313bdb +SIZE (rust/2021-03-25/rust-std-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 17645120 +SHA256 (rust/2021-03-25/cargo-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 273743a005d951a6f2836ee5c5d168d7ecf6e45b45cb5facda4eac59ef7f6722 +SIZE (rust/2021-03-25/cargo-1.51.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4679488 Index: lang/rust/files/patch-vendor_cc_src_lib.rs =================================================================== --- lang/rust/files/patch-vendor_cc_src_lib.rs +++ lang/rust/files/patch-vendor_cc_src_lib.rs @@ -8,9 +8,9 @@ https://reviews.llvm.org/D77776 ---- vendor/cc/src/lib.rs.orig 2020-04-14 08:55:10 UTC +--- vendor/cc/src/lib.rs.orig 2021-03-04 20:58:54 UTC +++ vendor/cc/src/lib.rs -@@ -2353,28 +2353,7 @@ impl Tool { +@@ -2659,24 +2659,7 @@ impl Tool { } fn with_features(path: PathBuf, clang_driver: Option<&str>, cuda: bool) -> Self { @@ -18,11 +18,7 @@ - let family = if let Some(fname) = path.file_name().and_then(|p| p.to_str()) { - if fname.contains("clang-cl") { - ToolFamily::Msvc { clang_cl: true } -- } else if fname.contains("cl") -- && !fname.contains("cloudabi") -- && !fname.contains("uclibc") -- && !fname.contains("clang") -- { +- } else if fname.ends_with("cl") || fname == "cl.exe" { - ToolFamily::Msvc { clang_cl: false } - } else if fname.contains("clang") { - match clang_driver { Index: lang/rust/files/powerpc/patch-compiler_rustc__target_src_spec_mod.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-compiler_rustc__target_src_spec_mod.rs @@ -0,0 +1,10 @@ +--- compiler/rustc_target/src/spec/mod.rs.orig 2020-09-30 18:06:16.613040000 -0500 ++++ compiler/rustc_target/src/spec/mod.rs 2021-04-23 18:06:47.040460000 -0500 +@@ -765,6 +765,7 @@ fn $module() { + ("armv6-unknown-freebsd", armv6_unknown_freebsd), + ("armv7-unknown-freebsd", armv7_unknown_freebsd), + ("i686-unknown-freebsd", i686_unknown_freebsd), ++ ("powerpc-unknown-freebsd", powerpc_unknown_freebsd), + ("powerpc64-unknown-freebsd", powerpc64_unknown_freebsd), + ("x86_64-unknown-freebsd", x86_64_unknown_freebsd), + Index: lang/rust/files/powerpc/patch-compiler_rustc__target_src_spec_powerpc__unknown__freebsd.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-compiler_rustc__target_src_spec_powerpc__unknown__freebsd.rs @@ -0,0 +1,27 @@ +--- /dev/null 2021-04-24 17:00:30.889028000 -0500 ++++ compiler/rustc_target/src/spec/powerpc_unknown_freebsd.rs 2021-04-24 17:00:25.903298000 -0500 +@@ -0,0 +1,24 @@ ++use crate::abi::Endian; ++use crate::spec::{CodeModel, LinkerFlavor, RelocModel, Target, TargetOptions}; ++ ++pub fn target() -> Target { ++ let mut base = super::freebsd_base::opts(); ++ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string()); ++ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("--target=powerpc-unknown-freebsd13.0".to_string()); ++ base.max_atomic_width = Some(32); ++ ++ Target { ++ llvm_target: "powerpc-unknown-freebsd13.0".to_string(), ++ pointer_width: 32, ++ data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), ++ arch: "powerpc".to_string(), ++ options: TargetOptions { ++ endian: Endian::Big, ++ code_model: Some(CodeModel::Large), ++ features: "+secure-plt".to_string(), ++ relocation_model: RelocModel::Pic, ++ mcount: "_mcount".to_string(), ++ ..base ++ }, ++ } ++} Index: lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp @@ -0,0 +1,12 @@ +--- src/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp.orig 2021-04-27 07:29:31.811399000 -0500 ++++ src/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp 2021-04-27 07:40:14.185257000 -0500 +@@ -126,7 +126,8 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Dr + const ArgList &Args) { + if (Args.getLastArg(options::OPT_msecure_plt)) + return ppc::ReadGOTPtrMode::SecurePlt; +- if ((Triple.isOSFreeBSD() && Triple.getOSMajorVersion() >= 13) || ++ if ((Triple.isOSFreeBSD() && ++ (Triple.getOSMajorVersion() == 0 || Triple.getOSMajorVersion() >= 13)) || + Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) + return ppc::ReadGOTPtrMode::SecurePlt; + else Index: lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Target_PowerPC_PPCSubtarget.cpp =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Target_PowerPC_PPCSubtarget.cpp @@ -0,0 +1,13 @@ +--- src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp.orig 2021-04-27 07:17:18.744914000 -0500 ++++ src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp 2021-04-27 07:25:23.450714000 -0500 +@@ -151,7 +151,9 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU + if (IsPPC64 && has64BitSupport()) + Use64BitRegs = true; + +- if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) || ++ if ((TargetTriple.isOSFreeBSD() && ++ (TargetTriple.getOSMajorVersion() == 0 || ++ TargetTriple.getOSMajorVersion() >= 13)) || + TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() || + TargetTriple.isMusl()) + SecurePlt = true; Index: lang/rust/files/powerpc/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs @@ -0,0 +1,12 @@ +--- vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig ++++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs +@@ -1568,6 +1568,9 @@ cfg_if! { + } else if #[cfg(target_arch = "arm")] { + mod arm; + pub use self::arm::*; ++ } else if #[cfg(target_arch = "powerpc")] { ++ mod powerpc; ++ pub use self::powerpc::*; + } else if #[cfg(target_arch = "powerpc64")] { + mod powerpc64; + pub use self::powerpc64::*; Index: lang/rust/files/powerpc/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_powerpc.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_powerpc.rs @@ -0,0 +1,50 @@ +--- /dev/null ++++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/powerpc.rs +@@ -0,0 +1,47 @@ ++pub type c_char = u8; ++pub type c_long = i32; ++pub type c_ulong = u32; ++pub type wchar_t = u32; ++pub type time_t = i64; ++pub type suseconds_t = i32; ++pub type register_t = i32; ++ ++s! { ++ pub struct stat { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ pub st_size: ::off_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_blksize: ::blksize_t, ++ pub st_flags: ::fflags_t, ++ pub st_gen: u32, ++ pub st_lspare: i32, ++ pub st_birthtime: ::time_t, ++ pub st_birthtime_nsec: ::c_long, ++ __unused: [u8; 8], ++ } ++} ++ ++// should be pub(crate), but that requires Rust 1.18.0 ++cfg_if! { ++ if #[cfg(libc_const_size_of)] { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; ++ } else { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = 4 - 1; ++ } ++} ++pub const MAP_32BIT: ::c_int = 0x00080000; ++pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 Index: lang/rust/files/powerpc/patch-vendor_openssl__src_src_lib.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-vendor_openssl__src_src_lib.rs @@ -0,0 +1,10 @@ +--- vendor/openssl-src/src/lib.rs.orig 2021-04-23 22:26:56.124321000 -0500 ++++ vendor/openssl-src/src/lib.rs 2021-04-23 22:27:38.643235000 -0500 +@@ -194,6 +194,7 @@ impl Build { + "mips64el-unknown-linux-gnuabi64" => "linux64-mips64", + "mipsel-unknown-linux-gnu" => "linux-mips32", + "mipsel-unknown-linux-musl" => "linux-mips32", ++ "powerpc-unknown-freebsd" => "BSD-generic32", + "powerpc-unknown-linux-gnu" => "linux-ppc", + "powerpc64-unknown-freebsd" => "BSD-generic64", + "powerpc64-unknown-linux-gnu" => "linux-ppc64", Index: lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_mod.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_mod.rs @@ -0,0 +1,10 @@ +--- vendor/rustc-ap-rustc_target/src/spec/mod.rs.orig 2021-04-24 18:21:48.422522000 -0500 ++++ vendor/rustc-ap-rustc_target/src/spec/mod.rs 2021-04-24 18:22:21.105142000 -0500 +@@ -684,6 +684,7 @@ supported_targets! { + ("armv6-unknown-freebsd", armv6_unknown_freebsd), + ("armv7-unknown-freebsd", armv7_unknown_freebsd), + ("i686-unknown-freebsd", i686_unknown_freebsd), ++ ("powerpc-unknown-freebsd", powerpc_unknown_freebsd), + ("powerpc64-unknown-freebsd", powerpc64_unknown_freebsd), + ("x86_64-unknown-freebsd", x86_64_unknown_freebsd), + Index: lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_powerpc__unknown__freebsd.rs =================================================================== --- /dev/null +++ lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_powerpc__unknown__freebsd.rs @@ -0,0 +1,27 @@ +--- /dev/null 2021-04-24 17:00:30.889028000 -0500 ++++ vendor/rustc-ap-rustc_target/src/spec/powerpc_unknown_freebsd.rs 2021-04-24 17:00:25.903298000 -0500 +@@ -0,0 +1,24 @@ ++use crate::abi::Endian; ++use crate::spec::{CodeModel, LinkerFlavor, RelocModel, Target, TargetOptions}; ++ ++pub fn target() -> Target { ++ let mut base = super::freebsd_base::opts(); ++ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string()); ++ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("--target=powerpc-unknown-freebsd13.0".to_string()); ++ base.max_atomic_width = Some(32); ++ ++ Target { ++ llvm_target: "powerpc-unknown-freebsd13.0".to_string(), ++ pointer_width: 32, ++ data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), ++ arch: "powerpc".to_string(), ++ options: TargetOptions { ++ endian: Endian::Big, ++ code_model: Some(CodeModel::Large), ++ features: "+secure-plt".to_string(), ++ relocation_model: RelocModel::Pic, ++ mcount: "_mcount".to_string(), ++ ..base ++ }, ++ } ++} Index: lang/rust/files/powerpc64le/patch-src_llvm-project_clang_lib_Basic_Targets.cpp =================================================================== --- lang/rust/files/powerpc64le/patch-src_llvm-project_clang_lib_Basic_Targets.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/llvm-project/clang/lib/Basic/Targets.cpp.orig 2020-07-07 01:39:17.000000000 -0500 -+++ src/llvm-project/clang/lib/Basic/Targets.cpp 2020-09-30 18:13:54.521751000 -0500 -@@ -352,6 +352,8 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, - switch (os) { - case llvm::Triple::Linux: - return new LinuxTargetInfo(Triple, Opts); -+ case llvm::Triple::FreeBSD: -+ return new FreeBSDTargetInfo(Triple, Opts); - case llvm::Triple::NetBSD: - return new NetBSDTargetInfo(Triple, Opts); - default: Index: lang/rust/update.sh =================================================================== --- /dev/null +++ lang/rust/update.sh @@ -0,0 +1,43 @@ +#!/bin/sh +# Requires: pkg install portfmt +# Run in lang/rust +set -eu + +get_commit() { + awk ' +$1 == "[pkg.rustc]" { pkg_rustc = 1 } +pkg_rustc && $1 == "git_commit_hash" { + print substr($3, 2, 10) + exit +}' +} + +fetch -qo /tmp/channel-rust-stable.toml https://dev-static.rust-lang.org/dist/channel-rust-stable.toml +version=$(=).*(:lang/\\$\\{RUST_DEFAULT\\}),\\1${version}\\2," \ + ../../Mk/Uses/cargo.mk ../../Mk/bsd.gecko.mk + +portedit set-version -i "${version}" . +make makesum +portedit set-version -i "${version}" ../rust-bootstrap +make -C ../rust-bootstrap makesum + +echo "lang/rust: Update to ${version} + +Changes: https://blog.rust-lang.org/FIXME/Rust-${version}.html +PR: FIXME +Exp-run by: antoine +Differential Revision: FIXME" >rust.msg