diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index df905304eaf9..ef9c3d821567 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -1,391 +1,391 @@ # This file contains logic to ease porting of Rust packages or # binaries using the `cargo` command. # # Feature: cargo # Usage: USES=cargo # Valid ARGS: none # # MAINTAINER: rust@FreeBSD.org .if !defined(_INCLUDE_USES_CARGO_MK) _INCLUDE_USES_CARGO_MK= yes .if !empty(cargo_ARGS) IGNORE+= USES=cargo takes no arguments .endif .sinclude "${MASTERDIR}/Makefile.crates" # List of static dependencies. The format is cratename-version. # CARGO_CRATES will be downloaded from MASTER_SITE_CRATESIO. CARGO_CRATES?= # List of features to build (space separated list). # Use special token --no-default-features to disable default # features by passing it to cargo build/install/test. CARGO_FEATURES?= # Name of the local directory for vendoring crates. CARGO_VENDOR_DIR?= ${WRKSRC}/cargo-crates # Default path for cargo manifest. CARGO_CARGOTOML?= ${WRKSRC}/Cargo.toml CARGO_CARGOLOCK?= ${WRKSRC}/Cargo.lock # Save crates inside ${DISTDIR}/rust/crates by default. CARGO_DIST_SUBDIR?= rust/crates # Generate list of DISTFILES. # Prefer canonical file extension .crate going forward .if make(makesum) CARGO_CRATE_EXT= .crate .else # If there is a rust/crates/*.tar.gz in distinfo keep using the old # extension. We need to delay eval until the last moment for # DISTINFO_FILE. We cache the command output to avoid multiple # 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 _CARGO_CRATES:= ${CARGO_CRATES:N*@git+*} _CARGO_GIT_SOURCES:= ${CARGO_CRATES:M*@git+*} # enumerate crates for unqiue and sane distfile group names _CARGO_CRATES:= ${empty(_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%,${_name}/${_version},:S,$,:_cargo_${_index},} DISTFILES+= ${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}:_cargo_${_index} # Provide pointer to the crate's extraction dir WRKSRC_crate_${_name}= ${CARGO_VENDOR_DIR}/${_crate} # ... also with version suffix in case of multiple versions of the # same crate WRKSRC_crate_${_crate}= ${CARGO_VENDOR_DIR}/${_crate} .endfor _CARGO_AWK= ${AWK} -vCP="${CP}" -vFIND="${FIND}" -vGREP="${GREP}" \ -vCARGO_VENDOR_DIR="${CARGO_VENDOR_DIR}" \ -vGIT_SOURCES="${_CARGO_GIT_SOURCES}" \ -vWRKDIR="${WRKDIR}" -vWRKSRC="${WRKSRC}" \ -f${SCRIPTSDIR}/split-url.awk \ -f${SCRIPTSDIR}/cargo-crates-git-common.awk -f .if !empty(_CARGO_GIT_SOURCES) . for _index _site _filename _wrksrc _crates in ${:!${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-fetch.awk /dev/null!} MASTER_SITES+= ${_site}:_cargo_git${_index} DISTFILES+= ${_filename}:_cargo_git${_index} . for _crate in ${_crates:S/,/ /g} # Make sure the build dependencies checks below can work for git sourced crates too _CARGO_CRATES+= @git ${_crate} ${_crate} @git # Provide pointer to the crate's extraction dir # # This might not point to the actual crate's sources since a # single git source can contain multiple crates. We cannot collect # subdir information until after the full extraction is done and we # cannot set make variables at that point. This is better than # nothing. WRKSRC_crate_${_crate}= ${WRKDIR}/${_wrksrc} . endfor . endfor .endif # Build dependencies. CARGO_BUILDDEP?= yes .if ${CARGO_BUILDDEP:tl} == "yes" -BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.58.1:lang/${RUST_DEFAULT} +BUILD_DEPENDS+= ${RUST_DEFAULT}>=1.59.0:lang/${RUST_DEFAULT} .endif # Location of toolchain (default to lang/rust's toolchain) CARGO?= ${LOCALBASE}/bin/cargo RUSTC?= ${LOCALBASE}/bin/rustc RUSTDOC?= ${LOCALBASE}/bin/rustdoc # Location of the cargo output directory. CARGO_TARGET_DIR?= ${WRKDIR}/target # Default target platform (affects some RUSTFLAGS if passed) CARGO_BUILD_TARGET?= ${_CARGO_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _CARGO_RUST_ARCH_amd64= x86_64 _CARGO_RUST_ARCH_i386= i686 _CARGO_RUST_ARCH_riscv64= riscv64gc # Environment for cargo # - CARGO_HOME: local cache of the registry index # - CARGO_BUILD_JOBS: configure number of jobs to run # - CARGO_TARGET_DIR: location of where to place all generated artifacts # - RUST_BACKTRACE: produce backtraces when something in the build panics # - RUSTC: path of rustc binary (default to lang/rust) # - RUSTDOC: path of rustdoc binary (default to lang/rust) # - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs CARGO_ENV+= \ CARGO_HOME=${WRKDIR}/cargo-home \ CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \ CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ CARGO_TARGET_${CARGO_BUILD_TARGET:S/-/_/g:tu}_LINKER="${CC}" \ RUST_BACKTRACE=1 \ RUSTC=${RUSTC} \ RUSTDOC=${RUSTDOC} \ RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:C/.+/-C link-arg=&/}" # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} .elif ${ARCH:Mpowerpc64*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif .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. _CARGO_RUN= ${SETENV} ${MAKE_ENV} ${CARGO_ENV} ${CARGO} CARGO_CARGO_RUN= cd ${WRKSRC}; ${SETENV} CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE=1 ${_CARGO_RUN} # User arguments for cargo targets. CARGO_BUILD_ARGS?= CARGO_INSTALL_ARGS?= CARGO_INSTALL_PATH?= . CARGO_TEST_ARGS?= CARGO_UPDATE_ARGS?= # Use module targets ? CARGO_BUILD?= yes CARGO_CONFIGURE?= yes CARGO_INSTALL?= yes CARGO_TEST?= yes # rustc stashes intermediary files in TMPDIR (default /tmp) which # might cause issues for users that for some reason space limit # their /tmp. WRKDIR should have plenty of space. # Allow users and ports to still overwrite it. .if ${TMPDIR:U/tmp} == /tmp TMPDIR= ${WRKDIR} .endif # Manage crate features. .if !empty(CARGO_FEATURES:M--no-default-features) CARGO_BUILD_ARGS+= --no-default-features CARGO_INSTALL_ARGS+= --no-default-features CARGO_TEST_ARGS+= --no-default-features .endif .if !empty(CARGO_FEATURES:N--no-default-features) CARGO_BUILD_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_INSTALL_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' CARGO_TEST_ARGS+= --features='${CARGO_FEATURES:N--no-default-features}' .endif .if !defined(WITH_DEBUG) CARGO_BUILD_ARGS+= --release CARGO_TEST_ARGS+= --release .else CARGO_INSTALL_ARGS+= --debug .endif .if ${_CARGO_CRATES:Mcmake} BUILD_DEPENDS+= cmake:devel/cmake .endif .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} BUILD_DEPENDS+= gmake:devel/gmake .endif .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} # 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} # 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 # RUSTONIG_SYSTEM_LIBONIG is not necessary, but will force onig_sys to # always use the system's libonig as returned by `pkg-config oniguruma`. CARGO_ENV+= RUSTONIG_SYSTEM_LIBONIG=1 .endif .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} # 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} .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 # the local crates directory. @${ECHO_MSG} "===> Moving crates to ${CARGO_VENDOR_DIR}" @${MKDIR} ${CARGO_VENDOR_DIR} .for _index _crate _name _version in ${_CARGO_CRATES} . if ${_index} != @git @${MV} ${WRKDIR}/${_crate} ${CARGO_VENDOR_DIR}/${_crate} @${PRINTF} '{"package":"%s","files":{}}' \ $$(${SHA256} -q ${DISTDIR}/${CARGO_DIST_SUBDIR}/${_crate}${CARGO_CRATE_EXT}) \ > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json @if [ -r ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig ]; then \ ${MV} ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig \ ${CARGO_VENDOR_DIR}/${_crate}/Cargo.toml.orig-cargo; \ fi . endif .endfor .if ${CARGO_CONFIGURE:tl} == "yes" _USES_configure+= 250:cargo-configure # configure hook. Place a config file for overriding crates-io index # by local source directory. cargo-configure: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh @${ECHO_MSG} "===> Cargo config:" @${MKDIR} ${WRKDIR}/.cargo @: > ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.cargo]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "directory = '${CARGO_VENDOR_DIR}'" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "[source.crates-io]" >> ${WRKDIR}/.cargo/config.toml @${ECHO_CMD} "replace-with = 'cargo'" >> ${WRKDIR}/.cargo/config.toml .if !empty(_CARGO_GIT_SOURCES) @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates-git-configure.awk \ /dev/null >> ${WRKDIR}/.cargo/config.toml .endif @${CAT} ${WRKDIR}/.cargo/config.toml @if ! ${GREP} -qF '[profile.release]' ${CARGO_CARGOTOML}; then \ ${ECHO_CMD} "" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "[profile.release]" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "opt-level = 2" >> ${CARGO_CARGOTOML}; \ ${ECHO_CMD} "debug = false" >> ${CARGO_CARGOTOML}; \ fi @${ECHO_MSG} "===> Updating Cargo.lock" @${CARGO_CARGO_RUN} update \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_UPDATE_ARGS} .endif .if !target(do-build) && ${CARGO_BUILD:tl} == "yes" do-build: @${CARGO_CARGO_RUN} build \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_BUILD_ARGS} .endif .if !target(do-install) && ${CARGO_INSTALL:tl} == "yes" do-install: . for path in ${CARGO_INSTALL_PATH} @${CARGO_CARGO_RUN} install \ --no-track \ --path "${path}" \ --root "${STAGEDIR}${PREFIX}" \ --verbose \ --verbose \ ${CARGO_INSTALL_ARGS} . endfor .endif .if !target(do-test) && ${CARGO_TEST:tl} == "yes" do-test: @${CARGO_CARGO_RUN} test \ --manifest-path ${CARGO_CARGOTOML} \ --verbose \ --verbose \ ${CARGO_TEST_ARGS} .endif # # Helper targets for port maintainers # # cargo-crates will output the crates list from Cargo.lock. If there # is no Cargo.lock for some reason, try and generate it first. cargo-crates: cargo-crates-generate-lockfile @${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} # cargo-crates-generate-lockfile will try to generate a Cargo.lock file # if it does not exist. cargo-crates-generate-lockfile: extract @if [ ! -r "${CARGO_CARGOLOCK}" ]; then \ ${ECHO_MSG} "===> ${CARGO_CARGOLOCK} not found. Trying to generate it..."; \ cd ${WRKSRC}; ${_CARGO_RUN} generate-lockfile \ --manifest-path ${CARGO_CARGOTOML} \ --verbose; \ fi # cargo-crates-licenses will try to grab license information from # all downloaded crates. cargo-crates-licenses: configure @${FIND} ${CARGO_VENDOR_DIR} -name 'Cargo.toml' -maxdepth 2 \ -exec ${GREP} -H '^license' {} \; \ | ${SED} \ -e 's@^${CARGO_VENDOR_DIR}/@@' \ -e 's@/Cargo.toml:license.*= *"@|@' \ -e 's@"$$@@g' | sort | /usr/bin/column -t -s '|' # cargo-crates-merge will in-place update CARGO_CRATES in the port # based on the crates list from Cargo.lock. If there is no Cargo.lock # for some reason, try and generate it first. cargo-crates-merge: cargo-crates-generate-lockfile @if ! type portedit > /dev/null 2>&1; then \ ${ECHO_MSG} "===> Please install \"ports-mgmt/portfmt\""; exit 1; \ fi @f="${MASTERDIR}/Makefile"; [ -r "${MASTERDIR}/Makefile.crates" ] && f="${MASTERDIR}/Makefile.crates"; \ ${_CARGO_AWK} ${SCRIPTSDIR}/cargo-crates.awk ${CARGO_CARGOLOCK} | \ portedit merge -i $$f; \ ${ECHO_MSG} "CARGO_CRATES in $$f was updated" .endif diff --git a/Mk/bsd.gecko.mk b/Mk/bsd.gecko.mk index fdc1effe8672..7e084efcf947 100644 --- a/Mk/bsd.gecko.mk +++ b/Mk/bsd.gecko.mk @@ -1,406 +1,406 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # 4 column tabs prevent hair loss and tooth decay! # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users # and porters to support any available gecko backend without needing to build # many conditional tests. ${USE_GECKO} is the list of backends that your port # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. # Users set ${WITH_GECKO} to the list of gecko backends they want on their # system. .if defined(USE_GECKO) .if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of # use primarily to apps from the mozilla project itself (such as Firefox, # Thunderbird, etc.), and probably won't be of use for gecko-based ports # like epiphany, galeon, etc. # # You need to make sure to add USE_GECKO=gecko to for your port can uses # one of these options below. # # Ports can use the following: # # USE_MOZILLA By default, it enables every system dependency # listed in '_ALL_DEPENDS'. If your port doesn't # need one of those then you can use '-' like # 'USE_MOZILLA= -png -vpx' to subtract the # dependencies. Experimental deps use '+' like # 'USE_MOZILLA= +speex +theora'. # # MOZILLA_PLIST_DIRS List of directories to descend into when installing # and creating the plist # # MOZ_OPTIONS configure arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # CONFIGURE_ARGS+=${MOZ_OPTIONS} # # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # MAKE_ARGS+=${MOZ_MK_OPTIONS} # # MOZ_EXPORT Environment variables for the build process (added # to .mozconfig). If NOMOZCONFIG is defined, you # probably want to set MAKE_ENV+=${MOZ_EXPORT} # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} USES+= compiler:c++17-lang cpe gl gmake gnome iconv localbase perl5 pkgconfig \ python:3.6+,build desktop-file-utils CPE_VENDOR?=mozilla USE_GL= gl USE_GNOME= cairo gdkpixbuf2 gtk30 USE_PERL5= build USE_XORG= x11 xcb xcomposite xdamage xext xfixes xrender xt .if ${MOZILLA_VER:R:R} >= 96 USE_XORG+= xrandr xtst .endif HAS_CONFIGURE= yes CONFIGURE_OUTSOURCE= yes LDFLAGS+= -Wl,--as-needed BINARY_ALIAS+= python3=${PYTHON_CMD} BUNDLE_LIBS= yes BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} \ rust-cbindgen>=0.19.0:devel/rust-cbindgen \ - ${RUST_DEFAULT}>=1.58.1:lang/${RUST_DEFAULT} \ + ${RUST_DEFAULT}>=1.59.0:lang/${RUST_DEFAULT} \ node:www/node LIB_DEPENDS+= libdrm.so:graphics/libdrm RUN_DEPENDS+= ${LOCALBASE}/lib/libpci.so:devel/libpci LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim MOZ_EXPORT+= ${CONFIGURE_ENV} \ PERL="${PERL}" \ PYTHON3="${PYTHON_CMD}" \ RUSTFLAGS="${RUSTFLAGS}" MOZ_OPTIONS+= --prefix="${PREFIX}" MOZ_MK_OPTIONS+=MOZ_OBJDIR="${BUILD_WRKSRC}" MOZ_OPTIONS+= --with-libclang-path="${LOCALBASE}/llvm${LLVM_DEFAULT}/lib" .if !exists(/usr/bin/llvm-objdump) MOZ_EXPORT+= LLVM_OBJDUMP="${LOCALBASE}/bin/llvm-objdump${LLVM_DEFAULT}" .endif # Ignore Mk/bsd.default-versions.mk but respect make.conf(5) unless LTO is enabled .if !defined(DEFAULT_VERSIONS) || ! ${DEFAULT_VERSIONS:Mllvm*} || ${PORT_OPTIONS:MLTO} LLVM_DEFAULT= 13 # chase bundled LLVM in lang/rust for LTO LLVM_VERSION= 13.0.1 # keep in sync with devel/wasi-compiler-rt${LLVM_DEFAULT} .endif # Require newer Clang than what's in base system unless user opted out . if ${CC} == cc && ${CXX} == c++ && exists(/usr/lib/libc++.so) BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} CPP= ${LOCALBASE}/bin/clang-cpp${LLVM_DEFAULT} CC= ${LOCALBASE}/bin/clang${LLVM_DEFAULT} CXX= ${LOCALBASE}/bin/clang++${LLVM_DEFAULT} USES:= ${USES:Ncompiler\:*} # XXX avoid warnings . endif MOZSRC?= ${WRKSRC} PLISTF?= ${WRKDIR}/plist_files MOZCONFIG?= ${WRKSRC}/.mozconfig MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 RUSTFLAGS+= ${CFLAGS:M-march=*:S/-march=/-C target-cpu=/} .elif ${ARCH:Mpowerpc64*} RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/:S/power/pwr/} .else RUSTFLAGS+= ${CFLAGS:M-mcpu=*:S/-mcpu=/-C target-cpu=/} .endif # Standard depends _ALL_DEPENDS= av1 event ffi graphite harfbuzz icu jpeg nspr nss png pixman sqlite vpx webp # firefox 95 uses a dav1d snapshot > 0.9.2 .if ${MOZILLA_VER:R:R} < 95 .if exists(${FILESDIR}/patch-bug1559213) av1_LIB_DEPENDS= libaom.so:multimedia/aom libdav1d.so:multimedia/dav1d av1_MOZ_OPTIONS= --with-system-av1 .endif .endif event_LIB_DEPENDS= libevent.so:devel/libevent event_MOZ_OPTIONS= --with-system-libevent ffi_LIB_DEPENDS= libffi.so:devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi .if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz .endif icu_LIB_DEPENDS= libicui18n.so:devel/icu icu_MOZ_OPTIONS= --with-system-icu --with-intl-api -jpeg_BUILD_DEPENDS=yasm:devel/yasm jpeg_USES= jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} nspr_LIB_DEPENDS= libnspr4.so:devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= libnss3.so:security/nss nss_MOZ_OPTIONS= --with-system-nss pixman_LIB_DEPENDS= libpixman-1.so:x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman png_LIB_DEPENDS= libpng.so:graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} .if ${MOZILLA_VER:R:R} >= 97 png_MOZ_OPTIONS= --with-system-png .endif sqlite_LIB_DEPENDS= libsqlite3.so:databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite -vpx_BUILD_DEPENDS= yasm:devel/yasm vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx webp_LIB_DEPENDS= libwebp.so:graphics/webp webp_MOZ_OPTIONS= --with-system-webp .for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} .endfor LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 .for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} .if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} USES+= ${${dep}_USES} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} .else BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS} .endif .endfor # Standard options MOZ_OPTIONS+= \ --enable-update-channel=${PKGNAMESUFFIX:Urelease:S/^-//} \ --disable-updater \ --with-system-zlib # API keys from www/chromium # http://www.chromium.org/developers/how-tos/api-keys # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. MOZ_EXPORT+= MOZ_GOOGLE_LOCATION_SERVICE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 MOZ_EXPORT+= MOZ_GOOGLE_SAFEBROWSING_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize .else MOZ_OPTIONS+= --disable-optimize . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # ld 2.17 barfs on Stylo built with -C opt-level=0 USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin . endif .endif .if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:audio/libcanberra .endif .if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:devel/libnotify LIB_DEPENDS+= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib .else MOZ_OPTIONS+= --disable-dbus .endif .if ${PORT_OPTIONS:MFFMPEG} # dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp RUN_DEPENDS+= ffmpeg>=0.8,1:multimedia/ffmpeg .endif .if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:net/libproxy MOZ_OPTIONS+= --enable-libproxy .else MOZ_OPTIONS+= --disable-libproxy .endif .if ${PORT_OPTIONS:MLTO} MOZ_OPTIONS+= --enable-lto=cross .endif .if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= ${LOCALBASE}/include/alsa/asoundlib.h:audio/alsa-lib MOZ_OPTIONS+= --enable-alsa .endif .if ${PORT_OPTIONS:MJACK} BUILD_DEPENDS+= ${LOCALBASE}/include/jack/jack.h:audio/jack MOZ_OPTIONS+= --enable-jack .endif .if ${PORT_OPTIONS:MPULSEAUDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio MOZ_OPTIONS+= --enable-pulseaudio .else MOZ_OPTIONS+= --disable-pulseaudio .endif .if ${PORT_OPTIONS:MSNDIO} BUILD_DEPENDS+= ${LOCALBASE}/include/sndio.h:audio/sndio post-patch-SNDIO-on: @${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \ -e '/DISABLE_LIBSNDIO_DLOPEN/d' \ ${MOZSRC}/media/libcubeb/src/moz.build .endif .if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 .else MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release . if ${ARCH:Maarch64} || (defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}) MOZ_OPTIONS+= --enable-rust-simd . endif .endif .if ${PORT_OPTIONS:MPROFILE} MOZ_OPTIONS+= --enable-profiling STRIP= .else MOZ_OPTIONS+= --disable-profiling .endif .if ${PORT_OPTIONS:MTEST} USE_XORG+= xscrnsaver MOZ_OPTIONS+= --enable-tests .else MOZ_OPTIONS+= --disable-tests .endif .if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip .else MOZ_OPTIONS+= --enable-strip --enable-install-strip .endif # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be # used in .mozconfig. And client.mk automatically uses -jN where N # is what multiprocessing.cpu_count() returns. .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) MAKE_JOBS_NUMBER= 1 .endif .if defined(MAKE_JOBS_NUMBER) MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER} .endif .if defined(MOZ_MAKE_FLAGS) MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}" .endif .if ${ARCH} == amd64 . if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin . endif .elif ${ARCH:Mpowerpc*} BUILD_DEPENDS+= as:devel/binutils . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" . endif .endif .else # bsd.port.post.mk post-patch: gecko-post-patch gecko-post-patch: @${RM} ${MOZCONFIG} .if !defined(NOMOZCONFIG) .for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} .endfor .endif # .if !defined(NOMOZCONFIG) .if ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \ done .endif .if ${USE_MOZILLA:M-nss} @${ECHO_MSG} "===> Applying NSS patches" @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \ done .endif @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/baseconfig.mk; \ fi @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${MOZSRC}/config/baseconfig.mk @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|mozilla/plugins|browser_plugins|g' \ -e 's|share/mozilla/extensions|lib/xpi|g' \ ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp # Disable vendor checksums like lang/rust @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${MOZSRC}/third_party/rust/*/.cargo-checksum.json pre-configure-script: # Check that the running kernel has COMPAT_FREEBSD11 required by lang/rust post-ino64 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh post-install-script: gecko-create-plist gecko-create-plist: # Create the plist ${RM} ${PLISTF} .for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} .endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} .endif .endif # HERE THERE BE TACOS -- adamw diff --git a/lang/rust-bootstrap/Makefile b/lang/rust-bootstrap/Makefile index a40fc6745b29..4909139bc831 100644 --- a/lang/rust-bootstrap/Makefile +++ b/lang/rust-bootstrap/Makefile @@ -1,170 +1,170 @@ # Once the bootstraps are available on pkg.FreeBSD.org run sync.sh # to upload them to ~/public_distfiles on freefall in preparation # for the next lang/rust update. PORTNAME= rust -PORTVERSION= 1.58.1 +PORTVERSION= 1.59.0 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/ PKGNAMEPREFIX= ${FLAVOR:S/_/-/g}- PKGNAMESUFFIX= -bootstrap DISTNAME= ${PORTNAME}c-${PORTVERSION}-src DIST_SUBDIR= rust MAINTAINER= rust@FreeBSD.org COMMENT= Create bootstrap compilers for building lang/rust LICENSE= APACHE20 MIT LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT ONLY_FOR_ARCHS= amd64 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 \ gmake:devel/gmake \ rust>=${PORTVERSION}:lang/rust FLAVORS= aarch64 amd64 armv6 armv7 i386 powerpc64_elfv1 powerpc64_elfv2 \ powerpc64le powerpc riscv64 FLAVOR?= ${FLAVORS:[1]} USES= cpe ninja:build perl5 python:3.6+,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 # rustc stashes intermediary files in TMPDIR (default /tmp) which # might cause issues for users that for some reason space limit # their /tmp. WRKDIR should have plenty of space. # ?= to allow users to still overwrite it in make.conf. TMPDIR?= ${WRKDIR} # Resulting packages are not specific to amd64 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_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_powerpc64le= PowerPC _RUST_LLVM_TARGET_powerpc= PowerPC _RUST_LLVM_TARGET_riscv64= RISCV .include .if ${OPSYS} != FreeBSD IGNORE= is only for FreeBSD .endif .if (${FLAVOR} == powerpc64le || ${FLAVOR} == riscv64) && ${OSVERSION} < 1300116 IGNORE= will not build on 12.x due to old system .endif .if exists(${PATCHDIR}/${FLAVOR:S/_/-/}) EXTRA_PATCHES+= ${PATCHDIR}/${FLAVOR:S/_/-/} .endif 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 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh @${ECHO_CMD} 'changelog-seen=2' > ${WRKSRC}/config.toml @${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'build-dir="${WRKDIR}/_build"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'extended=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'docs=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo-native-static=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo="${LOCALBASE}/bin/cargo"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'rustc="${LOCALBASE}/bin/rustc"' >> ${WRKSRC}/config.toml .if ${_RUST_HOST} != ${_RUST_TARGET} @${ECHO_CMD} 'host=["${_RUST_HOST}","${_RUST_TARGET}"]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'target=["${_RUST_TARGET}"]' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} '[rust]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'channel="stable"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml .if ${FLAVOR} == riscv64 @${ECHO_CMD} 'debug=true' >> ${WRKSRC}/config.toml .endif @${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 @${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml .endif # https://github.com/rust-lang/rust/pull/72696#issuecomment-641517185 @${ECHO_CMD} 'ldflags="-lz"' >> ${WRKSRC}/config.toml # we need to make sure to always build llvm with host arch support to get a # host compiler that can build the host->target compiler @${ECHO_CMD} 'targets="${_RUST_LLVM_TARGET};${_RUST_LLVM_TARGET_${ARCH}}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[target.${_RUST_TARGET}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cc="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/cc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/c++"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'linker="${LOCALBASE}/freebsd-sysroot/${FLAVOR:S/_/-/g}/bin/cc"' >> ${WRKSRC}/config.toml .for _key _util in ar ${AR} ranlib ${RANLIB} @bin="$$(which ${_util})"; \ ${ECHO_CMD} "${_key}=\"$$bin\"" >> ${WRKSRC}/config.toml .endfor .if ${_RUST_HOST} != ${_RUST_TARGET} @${ECHO_CMD} '[target.${_RUST_HOST}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cc="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${CXX}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'linker="${CC}"' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml do-build: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py dist --jobs=${MAKE_JOBS_NUMBER} \ 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} .include diff --git a/lang/rust-bootstrap/distinfo b/lang/rust-bootstrap/distinfo index 0fe662521281..be2225716a59 100644 --- a/lang/rust-bootstrap/distinfo +++ b/lang/rust-bootstrap/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643710731 -SHA256 (rust/rustc-1.58.1-src.tar.xz) = 2b3643a48e7087053b0268971ec4154350342508922a8acb0707aaf94deb4469 -SIZE (rust/rustc-1.58.1-src.tar.xz) = 124353160 +TIMESTAMP = 1646648374 +SHA256 (rust/rustc-1.59.0-src.tar.xz) = 375996ead731cab2203ec10a66a3c4568ab6997d7e5d3ae597658164fe27be3d +SIZE (rust/rustc-1.59.0-src.tar.xz) = 128942756 diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 41c43ac9bb9d..b6044d2effb4 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,279 +1,279 @@ # Created by: Jyun-Yan You PORTNAME= rust -PORTVERSION?= 1.58.1 +PORTVERSION?= 1.59.0 PORTREVISION?= 0 CATEGORIES= lang MASTER_SITES= https://static.rust-lang.org/dist/:src \ https://dev-static.rust-lang.org/dist/:src \ LOCAL/tobik/rust:bootstrap \ LOCAL/mikael/rust:bootstrap \ https://static.rust-lang.org/dist/:bootstrap DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src DISTFILES?= ${NIGHTLY_DATE:D${NIGHTLY_DATE}/}${DISTNAME}${EXTRACT_SUFX}:src \ ${_RUSTC_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ ${_RUST_STD_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap \ ${_CARGO_BOOTSTRAP}${BOOTSTRAPS_SUFFIX}${EXTRACT_SUFX}:bootstrap DIST_SUBDIR?= rust MAINTAINER= rust@FreeBSD.org COMMENT= Language with a focus on memory safety and concurrency LICENSE= APACHE20 MIT LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT IGNORE_FreeBSD_12_powerpc= is missing a bootstrap for FreeBSD 12.x powerpc ONLY_FOR_ARCHS?= aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le \ powerpc riscv64 ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler BUILD_DEPENDS= cmake:devel/cmake LIB_DEPENDS= libcurl.so:ftp/curl USES= cpe ninja:build pkgconfig python:3.6+,build ssl tar:xz CPE_VENDOR= rust-lang MAKE_ENV= DESTDIR=${STAGEDIR} \ LIBGIT2_NO_PKG_CONFIG=1 \ OPENSSL_DIR="${OPENSSLBASE}" \ RUST_BACKTRACE=1 TEST_ENV= ${MAKE_ENV} \ ALLOW_NONZERO_RLIMIT_CORE=1 CONFLICTS_INSTALL?= rust-nightly # rustc stashes intermediary files in TMPDIR (default /tmp) which # might cause issues for users that for some reason space limit # their /tmp. WRKDIR should have plenty of space. # ?= to allow users to still overwrite it in make.conf. TMPDIR?= ${WRKDIR} OPTIONS_DEFINE= DOCS GDB SOURCES WASM OPTIONS_DEFAULT= SOURCES WASM OPTIONS_EXCLUDE_armv6= DOCS GDB_DESC= Install ports gdb (necessary for debugging rust programs) SOURCES_DESC= Install source files WASM_DESC= Build the WebAssembly target (wasm32-unknown-unknown) DOCS_VARS= _RUST_BUILD_DOCS=true DOCS_VARS_OFF= _RUST_BUILD_DOCS=false GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb SOURCES_VARS= _RUST_TOOLS+=src WASM_VARS= _RUST_BUILD_WASM=true \ _RUST_TARGETS+=wasm32-unknown-unknown WASM_VARS_OFF= _RUST_BUILD_WASM=false # See WRKSRC/src/stage0.json for the date and version values -BOOTSTRAPS_DATE?= 2021-12-02 -RUST_BOOTSTRAP_VERSION?= 1.57.0 +BOOTSTRAPS_DATE?= 2022-01-20 +RUST_BOOTSTRAP_VERSION?= 1.58.1 BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} CARGO_VENDOR_DIR?= ${WRKSRC}/vendor # Rust's target arch string might be different from *BSD arch strings _RUST_ARCH_amd64= x86_64 _RUST_ARCH_i386= i686 _RUST_ARCH_riscv64= riscv64gc _RUST_TARGET= ${_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl} _RUST_TARGETS= ${_RUST_TARGET} _RUST_TOOLS= analysis cargo clippy rustfmt _RUSTC_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} _RUST_STD_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} _CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${_RUST_TARGET} .include .if ${OPSYS} != FreeBSD IGNORE= is only for FreeBSD .endif .if ${ARCH} == powerpc # bfd to link rustc_driver; lld currently can't BUILD_DEPENDS+= ld.bfd:devel/binutils .else # rls needs 64-bit atomics _RUST_TOOLS+= rls .endif .if exists(${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX}) EXTRA_PATCHES+= ${PATCHDIR}/${ARCH}${BOOTSTRAPS_SUFFIX} .endif # If the kernel does not return sane kern.proc.pathname values # for hardlinks then disable hardlinks in the build to avoid # intermittent "can't find crate for `std`" build failures, # c.f. PR248184 # # XXX: Avoiding OSVERSION since it is derived from userland but # the running kernel might still be newer with sane behavior # anyway... .if exists(${PATCHDIR}/no-hardlinks) _KERN_OSRELDATE!= ${SYSCTL} -n kern.osreldate 2>/dev/null || echo 0 . if ${_KERN_OSRELDATE} >= 1400040 . elif ${_KERN_OSRELDATE} >= 1300521 . else EXTRA_PATCHES+= ${PATCHDIR}/no-hardlinks . endif .endif .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 # The bootstrap is hardcoded to use gcc9 # 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 .ifdef QEMU_EMULATING IGNORE= fails to build with qemu-user-static .endif .if make(makesum) DISTFILES:= ${DISTFILES:M*\:src} \ ${ONLY_FOR_ARCHS:O:@_arch@${:!${MAKE} ARCH=${_arch} PPC_ABI=ELFv1 -V'DISTFILES:N*\:src'!}@} \ ${ONLY_FOR_ARCHS:Mpowerpc64:@_arch@${:!${MAKE} ARCH=${_arch} PPC_ABI=ELFv2 -V'DISTFILES:N*\:src'!}@} .endif post-patch: @${REINPLACE_CMD} 's,gdb,${LOCALBASE}/bin/gdb,' ${WRKSRC}/src/etc/rust-gdb .if defined(NIGHTLY_DATE) @${REINPLACE_CMD} 's/"rustfmt"/"nothx"/' ${WRKSRC}/src/stage0.json .endif # Disable vendor checksums @${REINPLACE_CMD} 's,"files":{[^}]*},"files":{},' \ ${CARGO_VENDOR_DIR}/*/.cargo-checksum.json .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 @${SETENV} CC="${CC}" OPSYS="${OPSYS}" OSVERSION="${OSVERSION}" WRKDIR="${WRKDIR}" \ ${SH} ${SCRIPTSDIR}/rust-compat11-canary.sh .for _component in cargo rust-std rustc @cd ${WRKDIR}/${_component}-*-${OPSYS:tl} && \ ${SH} install.sh --prefix=${WRKDIR}/bootstrap --verbose .endfor @${ECHO_CMD} 'changelog-seen=2' > ${WRKSRC}/config.toml @${ECHO_CMD} '[build]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'build-dir="${WRKDIR}/_build"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'build-stage=2' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'doc-stage=2' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'test-stage=2' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml .if defined(NIGHTLY_DATE) @${ECHO_CMD} 'profiler=true' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} 'target=[${_RUST_TARGETS:@.target.@"${.target.}"@:ts,}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cargo="${WRKDIR}/bootstrap/bin/cargo"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'rustc="${WRKDIR}/bootstrap/bin/rustc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'tools=[${_RUST_TOOLS:@.tool.@"${.tool.}"@:ts,}]' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[install]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'prefix="${PREFIX}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'sysconfdir="${PREFIX}/etc"' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[rust]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'channel="${PKGNAMESUFFIX:Ustable:S/^-//}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'default-linker="${CC}"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml .if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE) @${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml .else @${ECHO_CMD} 'ccache=false' >> ${WRKSRC}/config.toml .endif @${ECHO_CMD} 'ninja=true' >> ${WRKSRC}/config.toml .if ${ARCH} == powerpc # 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 @${CHMOD} +x ${WRKDIR}/cc-wrapper @${PRINTF} '#!/bin/sh\nexec ${CXX} "$$@" --target=powerpc-unknown-freebsd13.0' > ${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 @${ECHO_CMD} 'ar="${AR}"' >> ${WRKSRC}/config.toml .if ${ARCH} == powerpc @${ECHO_CMD} 'cc="${WRKDIR}/cc-wrapper"' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'cxx="${WRKDIR}/cxx-wrapper"' >> ${WRKSRC}/config.toml .else @${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 .endfor @${ECHO_CMD} '[dist]' >> ${WRKSRC}/config.toml @${ECHO_CMD} 'src-tarball=false' >> ${WRKSRC}/config.toml .if defined(NIGHTLY_DATE) # Don't abort if optional tools fail to build @${ECHO_CMD} 'missing-tools=true' >> ${WRKSRC}/config.toml .endif do-build: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py build --jobs=${MAKE_JOBS_NUMBER} do-install: @cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} x.py install --jobs=${MAKE_JOBS_NUMBER} # We autogenerate the plist file. We do that, instead of the # regular pkg-plist, because several libraries have a computed # filename based on the absolute path of the source files. As it # is user-specific, we cannot know their filename in advance. @${RM} -r ${STAGEDIR}${DOCSDIR}/*.old \ ${STAGEDIR}${DOCSDIR}/html/.lock \ ${STAGEDIR}${DOCSDIR}/html/.stamp \ ${STAGEDIR}${PREFIX}/lib/rustlib/install.log \ ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-* \ ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh @${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/lib \ ${STAGEDIR}${PREFIX}/libexec -exec ${FILE} -i {} + | \ ${AWK} -F: '/executable|sharedlib/ { print $$1 }' | ${XARGS} ${STRIP_CMD} @${FIND} ${STAGEDIR}${PREFIX} -not -type d | \ ${SED} -E -e 's,^${STAGEDIR}${PREFIX}/,,' \ -e 's,(share/man/man[1-9]/.*\.[0-9]),\1.gz,' >> ${TMPPLIST} post-install-DOCS-on: # Ignore any left behind empty directories in case some docs fail # to build (failures are ignored due to deny-warnings=false). @${FIND} ${STAGEDIR}${DOCSDIR}/html -empty -type d | \ ${SED} 's,^${STAGEDIR},@comment @dir ,' >> ${TMPPLIST} post-install-SOURCES-on: # Silence stage-qa warnings by sanitizing permissions on sources @${FIND} ${STAGEDIR}${PREFIX}/lib/rustlib/src -type f -exec ${CHMOD} \ ${SHAREMODE} {} + # Note that make test does not work when rust is already installed. do-test: @cd ${WRKSRC} && \ ${SETENV} ${TEST_ENV} ${PYTHON_CMD} x.py test --jobs=${MAKE_JOBS_NUMBER} .include diff --git a/lang/rust/distinfo b/lang/rust/distinfo index 2e6afccaed9d..d2f99eadfe64 100644 --- a/lang/rust/distinfo +++ b/lang/rust/distinfo @@ -1,63 +1,63 @@ -TIMESTAMP = 1643710730 -SHA256 (rust/rustc-1.58.1-src.tar.xz) = 2b3643a48e7087053b0268971ec4154350342508922a8acb0707aaf94deb4469 -SIZE (rust/rustc-1.58.1-src.tar.xz) = 124353160 -SHA256 (rust/2021-12-02/rustc-1.57.0-aarch64-unknown-freebsd.tar.xz) = c157138a0d2179875aa68ce8674a04fb622e3a9f51be48dad29e4080e663ba07 -SIZE (rust/2021-12-02/rustc-1.57.0-aarch64-unknown-freebsd.tar.xz) = 49524084 -SHA256 (rust/2021-12-02/rust-std-1.57.0-aarch64-unknown-freebsd.tar.xz) = 47c414bf12951670fc439b4810ce88443069fc1d7cfbe2c49e005ca164d39a5a -SIZE (rust/2021-12-02/rust-std-1.57.0-aarch64-unknown-freebsd.tar.xz) = 21447236 -SHA256 (rust/2021-12-02/cargo-1.57.0-aarch64-unknown-freebsd.tar.xz) = ef00c5bf73003983dd6bc4b3edf06f8502b26be1c4def4c55e4f65fd95ba5f6c -SIZE (rust/2021-12-02/cargo-1.57.0-aarch64-unknown-freebsd.tar.xz) = 4606180 -SHA256 (rust/2021-12-02/rustc-1.57.0-x86_64-unknown-freebsd.tar.xz) = ef215995462aedd5d06ed9d5a527c0ca536309924d25326b4fcbeb806804b6ca -SIZE (rust/2021-12-02/rustc-1.57.0-x86_64-unknown-freebsd.tar.xz) = 44829204 -SHA256 (rust/2021-12-02/rust-std-1.57.0-x86_64-unknown-freebsd.tar.xz) = fde2cd6ede33b0a61e5d7b8aea2e84946aefc6784508821b02cf312691367531 -SIZE (rust/2021-12-02/rust-std-1.57.0-x86_64-unknown-freebsd.tar.xz) = 22048312 -SHA256 (rust/2021-12-02/cargo-1.57.0-x86_64-unknown-freebsd.tar.xz) = fc16b9401eb322bbd34ba990d1d6822ae2cabb31ad2fe56cab069383d9e4e42f -SIZE (rust/2021-12-02/cargo-1.57.0-x86_64-unknown-freebsd.tar.xz) = 5349980 -SHA256 (rust/2021-12-02/rustc-1.57.0-armv6-unknown-freebsd.tar.xz) = 453aa01d61a9ebd181d174fb1d3770a25bb21c6efaf1eb3515b32a7302dbcd2d -SIZE (rust/2021-12-02/rustc-1.57.0-armv6-unknown-freebsd.tar.xz) = 50036940 -SHA256 (rust/2021-12-02/rust-std-1.57.0-armv6-unknown-freebsd.tar.xz) = 440bce823b40abfb1c9a497e4e9798e4955db07d8092c51106a8ae338df94f6d -SIZE (rust/2021-12-02/rust-std-1.57.0-armv6-unknown-freebsd.tar.xz) = 20057828 -SHA256 (rust/2021-12-02/cargo-1.57.0-armv6-unknown-freebsd.tar.xz) = d36b6e47df598e02e3bb3fda78c052d4ca7938eea78bcf8ad12813c1ff86cf74 -SIZE (rust/2021-12-02/cargo-1.57.0-armv6-unknown-freebsd.tar.xz) = 4655820 -SHA256 (rust/2021-12-02/rustc-1.57.0-armv7-unknown-freebsd.tar.xz) = a3f4273f77ba1b92ca98357566df12962f7a6a5fccc21c90058129d091f335c1 -SIZE (rust/2021-12-02/rustc-1.57.0-armv7-unknown-freebsd.tar.xz) = 50251684 -SHA256 (rust/2021-12-02/rust-std-1.57.0-armv7-unknown-freebsd.tar.xz) = 523dec227f60ec75d186a2b91032e10a79d0f49c4919df6b6193fe476efdc37d -SIZE (rust/2021-12-02/rust-std-1.57.0-armv7-unknown-freebsd.tar.xz) = 20911364 -SHA256 (rust/2021-12-02/cargo-1.57.0-armv7-unknown-freebsd.tar.xz) = cd1fff41b3e15b29e2be50dd78aa747c4ad74b2ad3eab2f5756700a438a42b33 -SIZE (rust/2021-12-02/cargo-1.57.0-armv7-unknown-freebsd.tar.xz) = 4640496 -SHA256 (rust/2021-12-02/rustc-1.57.0-i686-unknown-freebsd.tar.xz) = 1db681e4c512a9982b0a237c708ecd74b1d9e50605fa1a7ef719f8998a0d4f53 -SIZE (rust/2021-12-02/rustc-1.57.0-i686-unknown-freebsd.tar.xz) = 54031364 -SHA256 (rust/2021-12-02/rust-std-1.57.0-i686-unknown-freebsd.tar.xz) = e014271ead0910971bffc5fe3bca2c3ee0f27e9e3b4e585284405cc729926fdc -SIZE (rust/2021-12-02/rust-std-1.57.0-i686-unknown-freebsd.tar.xz) = 21912908 -SHA256 (rust/2021-12-02/cargo-1.57.0-i686-unknown-freebsd.tar.xz) = 911b0f8702e1f097a05f2e877205aea1786788836745fb073074a7b7fd5e34ea -SIZE (rust/2021-12-02/cargo-1.57.0-i686-unknown-freebsd.tar.xz) = 5488972 -SHA256 (rust/2021-12-02/rustc-1.57.0-powerpc-unknown-freebsd.tar.xz) = 64788e7941ec3d8061987c316a31f7c1e865229581c0fa9c47375e5ce37f9d31 -SIZE (rust/2021-12-02/rustc-1.57.0-powerpc-unknown-freebsd.tar.xz) = 50523480 -SHA256 (rust/2021-12-02/rust-std-1.57.0-powerpc-unknown-freebsd.tar.xz) = f9b0760a736ff3c4fbf25ca3217abb493a9a09fbfd5c098e897ed8360148ebe5 -SIZE (rust/2021-12-02/rust-std-1.57.0-powerpc-unknown-freebsd.tar.xz) = 19872204 -SHA256 (rust/2021-12-02/cargo-1.57.0-powerpc-unknown-freebsd.tar.xz) = ac1846a53e6dae28bae80568a5e380d839e9c72ecb72a7aca067aa3dbef433f0 -SIZE (rust/2021-12-02/cargo-1.57.0-powerpc-unknown-freebsd.tar.xz) = 5101416 -SHA256 (rust/2021-12-02/rustc-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = f9992775ec99de1db97702df73c19352335407c99a91f0264ab506ded4a439af -SIZE (rust/2021-12-02/rustc-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 59568592 -SHA256 (rust/2021-12-02/rust-std-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 2d2dbdd2fa93f220e12f772c73141ef954d9438ac996a85e8cf51d826cad0a29 -SIZE (rust/2021-12-02/rust-std-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 19940428 -SHA256 (rust/2021-12-02/cargo-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = ffd3c62850fcbcba4364d880ace33899e8aa03638ce72e8a53f9ea92547224dc -SIZE (rust/2021-12-02/cargo-1.57.0-powerpc64-unknown-freebsd-elfv1.tar.xz) = 5153396 -SHA256 (rust/2021-12-02/rustc-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = 8a5ab4a1dea568b3337e931507b2c728eb6de0f7b87e36a98e7b17d566f13a78 -SIZE (rust/2021-12-02/rustc-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = 52114084 -SHA256 (rust/2021-12-02/rust-std-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = 08af0d18ac8cbcd3b125a61d4f01bc0cf9b0efa7d18eb2b16fca9857a57a22b7 -SIZE (rust/2021-12-02/rust-std-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = 20114788 -SHA256 (rust/2021-12-02/cargo-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = a0006f594bd446e01c62868b2db7a40aac23ae694dfbfe9de89edf33f707989b -SIZE (rust/2021-12-02/cargo-1.57.0-powerpc64le-unknown-freebsd.tar.xz) = 5092864 -SHA256 (rust/2021-12-02/rustc-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = 7831ebf7d9b9c579d3e16e1b7b556a793d63a62f36636fba3b63ef2ed13c6872 -SIZE (rust/2021-12-02/rustc-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = 141961976 -SHA256 (rust/2021-12-02/rust-std-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = 3068b2f74537e5efcd293ebae7ce0e16bff92603cbc3ac5201ba3bb8e9ebe4ef -SIZE (rust/2021-12-02/rust-std-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = 27221940 -SHA256 (rust/2021-12-02/cargo-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = c88fb84cd53349fcac5516f79b88f8b23ebdcbac40408719a112ef095068a95d -SIZE (rust/2021-12-02/cargo-1.57.0-riscv64gc-unknown-freebsd.tar.xz) = 24413628 -SHA256 (rust/2021-12-02/rustc-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 3cb08f51df429d0decfd32020ce2a68c92a8fe7dc52b32ab57f61955a91fcf8c -SIZE (rust/2021-12-02/rustc-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 49856512 -SHA256 (rust/2021-12-02/rust-std-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 5ae8f118545c9ecf6c89f8f1358bd08cacd2b37d9ae0dc001c2ec05ce14d5321 -SIZE (rust/2021-12-02/rust-std-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 19848988 -SHA256 (rust/2021-12-02/cargo-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 662772c902e8512ef9a0c2b6e3543de511835c591bb374218d43141ac3f77546 -SIZE (rust/2021-12-02/cargo-1.57.0-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4833052 +TIMESTAMP = 1646648477 +SHA256 (rust/rustc-1.59.0-src.tar.xz) = 375996ead731cab2203ec10a66a3c4568ab6997d7e5d3ae597658164fe27be3d +SIZE (rust/rustc-1.59.0-src.tar.xz) = 128942756 +SHA256 (rust/2022-01-20/rustc-1.58.1-aarch64-unknown-freebsd.tar.xz) = e34a7a90f31326ef0d7a56c4df61205ffad91ecefab192f79a8f50759aa86f64 +SIZE (rust/2022-01-20/rustc-1.58.1-aarch64-unknown-freebsd.tar.xz) = 49629860 +SHA256 (rust/2022-01-20/rust-std-1.58.1-aarch64-unknown-freebsd.tar.xz) = 40a8430d595ec0fa5f2b0889069bb4b74e8550be76445f699422e136e98f13ed +SIZE (rust/2022-01-20/rust-std-1.58.1-aarch64-unknown-freebsd.tar.xz) = 22066068 +SHA256 (rust/2022-01-20/cargo-1.58.1-aarch64-unknown-freebsd.tar.xz) = dbd317208a43f6437cc6d0637e4495b83541595b695156dfd70c41abcb0d9ef8 +SIZE (rust/2022-01-20/cargo-1.58.1-aarch64-unknown-freebsd.tar.xz) = 4563964 +SHA256 (rust/2022-01-20/rustc-1.58.1-x86_64-unknown-freebsd.tar.xz) = 78fc6d5abaae2e7d05c3570c464e3026ea02040e28e5595561a3200f251000f9 +SIZE (rust/2022-01-20/rustc-1.58.1-x86_64-unknown-freebsd.tar.xz) = 44721628 +SHA256 (rust/2022-01-20/rust-std-1.58.1-x86_64-unknown-freebsd.tar.xz) = a2d0b510b421de864ee7cd2b3b803b8f843605fbf19d9daf49dc9b3ccae0a641 +SIZE (rust/2022-01-20/rust-std-1.58.1-x86_64-unknown-freebsd.tar.xz) = 22227776 +SHA256 (rust/2022-01-20/cargo-1.58.1-x86_64-unknown-freebsd.tar.xz) = d958dad7ebcf4c2a6cba8cea7ef1add8c3928715dcfbb73aa7a7a5992f53077f +SIZE (rust/2022-01-20/cargo-1.58.1-x86_64-unknown-freebsd.tar.xz) = 5296884 +SHA256 (rust/2022-01-20/rustc-1.58.1-armv6-unknown-freebsd.tar.xz) = 593ca881e40b907f6b09d346ebfb42dc16c4f450a5ac6c7d2a0381b416456196 +SIZE (rust/2022-01-20/rustc-1.58.1-armv6-unknown-freebsd.tar.xz) = 50451208 +SHA256 (rust/2022-01-20/rust-std-1.58.1-armv6-unknown-freebsd.tar.xz) = fd4009b30db0212b91481597ea2054ea24323bf0e3a755190c1527dc1f78f4de +SIZE (rust/2022-01-20/rust-std-1.58.1-armv6-unknown-freebsd.tar.xz) = 20316724 +SHA256 (rust/2022-01-20/cargo-1.58.1-armv6-unknown-freebsd.tar.xz) = 75016cf2d3ee35f9f74aade08ffaf870286d5a4012b1ea3af69358a9102627c0 +SIZE (rust/2022-01-20/cargo-1.58.1-armv6-unknown-freebsd.tar.xz) = 4600584 +SHA256 (rust/2022-01-20/rustc-1.58.1-armv7-unknown-freebsd.tar.xz) = bc4e1fa2905639d5989127f668bf3a54498bcc80b54848270c0ae246c7dbce19 +SIZE (rust/2022-01-20/rustc-1.58.1-armv7-unknown-freebsd.tar.xz) = 50293136 +SHA256 (rust/2022-01-20/rust-std-1.58.1-armv7-unknown-freebsd.tar.xz) = 9add6afedee77c8e65608c3fefa7d7bb2d7eee22763fd9562ffdf9bbcb8311c3 +SIZE (rust/2022-01-20/rust-std-1.58.1-armv7-unknown-freebsd.tar.xz) = 21240724 +SHA256 (rust/2022-01-20/cargo-1.58.1-armv7-unknown-freebsd.tar.xz) = 10d412dd707ecfa656fe4e9f3e08f92a4c396dffedcfabb10405b0bafb0849c2 +SIZE (rust/2022-01-20/cargo-1.58.1-armv7-unknown-freebsd.tar.xz) = 4588676 +SHA256 (rust/2022-01-20/rustc-1.58.1-i686-unknown-freebsd.tar.xz) = 1a50ddeefb20da5851c665465869202bb6f762988a7bf523950418d3f4049c84 +SIZE (rust/2022-01-20/rustc-1.58.1-i686-unknown-freebsd.tar.xz) = 53748856 +SHA256 (rust/2022-01-20/rust-std-1.58.1-i686-unknown-freebsd.tar.xz) = 248a070d8a4f8ab87c323476c709d7db83118bdb8b3b32c1f787092941dc3bae +SIZE (rust/2022-01-20/rust-std-1.58.1-i686-unknown-freebsd.tar.xz) = 22017868 +SHA256 (rust/2022-01-20/cargo-1.58.1-i686-unknown-freebsd.tar.xz) = 885da898ea041d8f108a2678ed0c5e0a88e3f914231fccc0c74f5193e450aca2 +SIZE (rust/2022-01-20/cargo-1.58.1-i686-unknown-freebsd.tar.xz) = 5454892 +SHA256 (rust/2022-01-20/rustc-1.58.1-powerpc-unknown-freebsd.tar.xz) = 9f3a19cb004ed98fb1773b0b85dbd0b613ca9ac88cc64617be93ed8f10027304 +SIZE (rust/2022-01-20/rustc-1.58.1-powerpc-unknown-freebsd.tar.xz) = 51339132 +SHA256 (rust/2022-01-20/rust-std-1.58.1-powerpc-unknown-freebsd.tar.xz) = e0ec787bc6122402df83bc58854ea0adc141476c611d7d5a820d74d37cee0da6 +SIZE (rust/2022-01-20/rust-std-1.58.1-powerpc-unknown-freebsd.tar.xz) = 19986132 +SHA256 (rust/2022-01-20/cargo-1.58.1-powerpc-unknown-freebsd.tar.xz) = f9f363c90b61857d7166f07ab105ddfbb8834feb2391a234577688085efcd1b2 +SIZE (rust/2022-01-20/cargo-1.58.1-powerpc-unknown-freebsd.tar.xz) = 5044396 +SHA256 (rust/2022-01-20/rustc-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 41a65df771fbdb707f397c46051494b6643bc372ccba5e00d85fd243f58ae9a8 +SIZE (rust/2022-01-20/rustc-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 59874020 +SHA256 (rust/2022-01-20/rust-std-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 235a1882af9f82c8be19561705fa42826485540eb5e12f877a01d77849bfcd5f +SIZE (rust/2022-01-20/rust-std-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 20142520 +SHA256 (rust/2022-01-20/cargo-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 9dcc2ed48ea9c5195b4bcbec8bdbad9107f422ef2d94fb6581c639d91f60f757 +SIZE (rust/2022-01-20/cargo-1.58.1-powerpc64-unknown-freebsd-elfv1.tar.xz) = 5124252 +SHA256 (rust/2022-01-20/rustc-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = a4dcc3cb8dba4bd683a39410abde7142cfbd01a210721d065891fa9722d6a94a +SIZE (rust/2022-01-20/rustc-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = 51876588 +SHA256 (rust/2022-01-20/rust-std-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = 70620d17631dc2224aa33e731d34a258f01f8011a4b977e4bcb39f7eca21b37f +SIZE (rust/2022-01-20/rust-std-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = 20287396 +SHA256 (rust/2022-01-20/cargo-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = 5f0393765a6fd7f131f7f161d9036486e5fbae23a49717e21cc88b86949e64f7 +SIZE (rust/2022-01-20/cargo-1.58.1-powerpc64le-unknown-freebsd.tar.xz) = 5035344 +SHA256 (rust/2022-01-20/rustc-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 30e83e1682819d0dd0af59a657c7c9e43a0ab12c65e895450bc4c6217644567a +SIZE (rust/2022-01-20/rustc-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 146101152 +SHA256 (rust/2022-01-20/rust-std-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 996617dbf439fbbaeeaf561f8df2384f6911ed3a5f37aac5299d7c2fe7c04d59 +SIZE (rust/2022-01-20/rust-std-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 27900440 +SHA256 (rust/2022-01-20/cargo-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 1fadc4457e169c5adf9226bd39e3baa429c19934d66d35082fccf12d36177d23 +SIZE (rust/2022-01-20/cargo-1.58.1-riscv64gc-unknown-freebsd.tar.xz) = 25171860 +SHA256 (rust/2022-01-20/rustc-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = f51bbce85904167eb3140fd338c0db1461d773a12816eda5a9e23d99e7d43858 +SIZE (rust/2022-01-20/rustc-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = 49776472 +SHA256 (rust/2022-01-20/rust-std-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = f66dc338c191603a84b8c2765035a3de0e8ea24720448ca708d75a318464a79e +SIZE (rust/2022-01-20/rust-std-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = 20119252 +SHA256 (rust/2022-01-20/cargo-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = 125db61c8bcd860b31250bc621bc4899cc7a35f6a320f2bf55887580af5019c6 +SIZE (rust/2022-01-20/cargo-1.58.1-powerpc64-unknown-freebsd-elfv2.tar.xz) = 4773656 diff --git a/lang/rust/files/patch-library_stdarch_crates_std__detect_src_detect_os_aarch64.rs b/lang/rust/files/patch-library_stdarch_crates_std__detect_src_detect_os_aarch64.rs new file mode 100644 index 000000000000..920c78536499 --- /dev/null +++ b/lang/rust/files/patch-library_stdarch_crates_std__detect_src_detect_os_aarch64.rs @@ -0,0 +1,13 @@ +https://github.com/rust-lang/stdarch/pull/1290/commits/4557e223d895067d5c5a627c26929de060868c22 + +--- library/stdarch/crates/std_detect/src/detect/os/aarch64.rs.orig 2022-03-08 09:13:53 UTC ++++ library/stdarch/crates/std_detect/src/detect/os/aarch64.rs +@@ -16,6 +16,7 @@ + //! - [Zircon implementation](https://fuchsia.googlesource.com/zircon/+/master/kernel/arch/arm64/feature.cpp) + //! - [Linux documentation](https://www.kernel.org/doc/Documentation/arm64/cpu-feature-registers.txt) + ++use core::arch::asm; + use crate::detect::{cache, Feature}; + + /// Try to read the features from the system registers. + diff --git a/lang/rust/files/riscv64/patch-compiler_rustc__llvm_build.rs b/lang/rust/files/riscv64/patch-compiler_rustc__llvm_build.rs deleted file mode 100644 index 1786f3e285df..000000000000 --- a/lang/rust/files/riscv64/patch-compiler_rustc__llvm_build.rs +++ /dev/null @@ -1,16 +0,0 @@ ---- compiler/rustc_llvm/build.rs.orig 2021-11-29 19:27:11 UTC -+++ compiler/rustc_llvm/build.rs -@@ -276,8 +276,11 @@ fn main() { - "stdc++" - }; - -- // RISC-V requires libatomic for sub-word atomic operations -- if target.starts_with("riscv") { -+ // RISC-V GCC erroneously requires libatomic for sub-word -+ // atomic operations. FreeBSD uses Clang as its system -+ // compiler and provides no libatomic in its base system so -+ // does not want this. -+ if !target.contains("freebsd") && target.starts_with("riscv") { - println!("cargo:rustc-link-lib=atomic"); - } - diff --git a/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_mod.rs b/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_mod.rs deleted file mode 100644 index f08735462131..000000000000 --- a/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_mod.rs +++ /dev/null @@ -1,10 +0,0 @@ ---- compiler/rustc_target/src/spec/mod.rs.orig 2021-11-04 11:23:50 UTC -+++ compiler/rustc_target/src/spec/mod.rs -@@ -805,6 +805,7 @@ supported_targets! { - ("powerpc-unknown-freebsd", powerpc_unknown_freebsd), - ("powerpc64-unknown-freebsd", powerpc64_unknown_freebsd), - ("powerpc64le-unknown-freebsd", powerpc64le_unknown_freebsd), -+ ("riscv64gc-unknown-freebsd", riscv64gc_unknown_freebsd), - ("x86_64-unknown-freebsd", x86_64_unknown_freebsd), - - ("x86_64-unknown-dragonfly", x86_64_unknown_dragonfly), diff --git a/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_riscv64gc__unknown__freebsd.rs b/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_riscv64gc__unknown__freebsd.rs deleted file mode 100644 index 9dcbb17ab3c0..000000000000 --- a/lang/rust/files/riscv64/patch-compiler_rustc__target_src_spec_riscv64gc__unknown__freebsd.rs +++ /dev/null @@ -1,21 +0,0 @@ ---- compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs.orig 2021-11-04 11:22:10 UTC -+++ compiler/rustc_target/src/spec/riscv64gc_unknown_freebsd.rs -@@ -0,0 +1,18 @@ -+use crate::spec::{CodeModel, Target, TargetOptions}; -+ -+pub fn target() -> Target { -+ Target { -+ llvm_target: "riscv64-unknown-freebsd".to_string(), -+ pointer_width: 64, -+ data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), -+ arch: "riscv64".to_string(), -+ options: TargetOptions { -+ code_model: Some(CodeModel::Medium), -+ cpu: "generic-rv64".to_string(), -+ features: "+m,+a,+f,+d,+c".to_string(), -+ llvm_abiname: "lp64d".to_string(), -+ max_atomic_width: Some(64), -+ ..super::freebsd_base::opts() -+ }, -+ } -+} diff --git a/lang/rust/files/riscv64/patch-library_std_src_os_raw_mod.rs b/lang/rust/files/riscv64/patch-library_std_src_os_raw_mod.rs deleted file mode 100644 index e880f73fd205..000000000000 --- a/lang/rust/files/riscv64/patch-library_std_src_os_raw_mod.rs +++ /dev/null @@ -1,22 +0,0 @@ ---- library/std/src/os/raw/mod.rs.orig 2021-11-05 15:16:50 UTC -+++ library/std/src/os/raw/mod.rs -@@ -68,7 +68,8 @@ type_alias! { "char.md", c_char = u8, NonZero_c_char = - target_arch = "aarch64", - target_arch = "arm", - target_arch = "powerpc", -- target_arch = "powerpc64" -+ target_arch = "powerpc64", -+ target_arch = "riscv64" - ) - ), - all( -@@ -110,7 +111,8 @@ type_alias! { "char.md", c_char = i8, NonZero_c_char = - target_arch = "aarch64", - target_arch = "arm", - target_arch = "powerpc", -- target_arch = "powerpc64" -+ target_arch = "powerpc64", -+ target_arch = "riscv64" - ) - ), - all( diff --git a/lang/rust/files/riscv64/patch-library_stdarch_crates_std__detect_src_detect_os_freebsd_auxvec.rs b/lang/rust/files/riscv64/patch-library_stdarch_crates_std__detect_src_detect_os_freebsd_auxvec.rs deleted file mode 100644 index d2df5bd0056f..000000000000 --- a/lang/rust/files/riscv64/patch-library_stdarch_crates_std__detect_src_detect_os_freebsd_auxvec.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- library/stdarch/crates/std_detect/src/detect/os/freebsd/auxvec.rs.orig 2021-10-18 09:52:55 UTC -+++ library/stdarch/crates/std_detect/src/detect/os/freebsd/auxvec.rs -@@ -3,7 +3,8 @@ - any( - target_arch = "aarch64", - target_arch = "arm", -- target_arch = "powerpc64" -+ target_arch = "powerpc64", -+ target_arch = "riscv64" - ), - allow(dead_code) - )] diff --git a/lang/rust/files/riscv64/patch-src_bootstrap_bootstrap.py b/lang/rust/files/riscv64/patch-src_bootstrap_bootstrap.py deleted file mode 100644 index d384c0990ca5..000000000000 --- a/lang/rust/files/riscv64/patch-src_bootstrap_bootstrap.py +++ /dev/null @@ -1,11 +0,0 @@ ---- src/bootstrap/bootstrap.py.orig 2021-11-11 14:21:03 UTC -+++ src/bootstrap/bootstrap.py -@@ -283,7 +283,7 @@ def default_build_triple(verbose): - err = "unknown OS type: {}".format(ostype) - sys.exit(err) - -- if cputype == 'powerpc' and ostype == 'unknown-freebsd': -+ if cputype in ['powerpc', 'riscv'] and ostype == 'unknown-freebsd': - cputype = subprocess.check_output( - ['uname', '-p']).strip().decode(default_encoding) - cputype_mapper = { diff --git a/lang/rust/files/riscv64/patch-src_bootstrap_native.rs b/lang/rust/files/riscv64/patch-src_bootstrap_native.rs deleted file mode 100644 index df56a7f09589..000000000000 --- a/lang/rust/files/riscv64/patch-src_bootstrap_native.rs +++ /dev/null @@ -1,20 +0,0 @@ ---- src/bootstrap/native.rs.orig 2021-11-29 19:27:11 UTC -+++ src/bootstrap/native.rs -@@ -248,9 +248,14 @@ impl Step for Llvm { - } - } - -- if target.starts_with("riscv") { -- // In RISC-V, using C++ atomics require linking to `libatomic` but the LLVM build -- // system check cannot detect this. Therefore it is set manually here. -+ if !target.contains("freebsd") && target.starts_with("riscv") { -+ // RISC-V GCC erroneously requires linking against -+ // `libatomic` when using 1-byte and 2-byte C++ -+ // atomics but the LLVM build system check cannot -+ // detect this. Therefore it is set manually here. -+ // FreeBSD uses Clang as its system compiler and -+ // provides no libatomic in its base system so does -+ // not want this. - if !builder.config.llvm_tools_enabled { - cfg.define("CMAKE_EXE_LINKER_FLAGS", "-latomic"); - } else { diff --git a/lang/rust/files/riscv64/patch-src_doc_rustc_src_platform-support.md b/lang/rust/files/riscv64/patch-src_doc_rustc_src_platform-support.md deleted file mode 100644 index 9f82379f9187..000000000000 --- a/lang/rust/files/riscv64/patch-src_doc_rustc_src_platform-support.md +++ /dev/null @@ -1,10 +0,0 @@ ---- src/doc/rustc/src/platform-support.md.orig 2021-11-04 11:32:01 UTC -+++ src/doc/rustc/src/platform-support.md -@@ -261,6 +261,7 @@ target | std | host | notes - `riscv32gc-unknown-linux-gnu` | | | RISC-V Linux (kernel 5.4, glibc 2.33) - `riscv32gc-unknown-linux-musl` | | | RISC-V Linux (kernel 5.4, musl + RISCV32 support patches) - `riscv32imc-esp-espidf` | ✓ | | RISC-V ESP-IDF -+`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD - `riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.0) - `s390x-unknown-linux-musl` | | | S390x Linux (kernel 2.6.32, MUSL) - `sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs similarity index 72% rename from lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs rename to lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs index bdde822353ff..4427d55ed653 100644 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs +++ b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs @@ -1,12 +1,12 @@ ---- vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs +--- vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs.orig 2021-11-29 20:27:33 UTC ++++ vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs @@ -217,7 +217,8 @@ extern "C" { cfg_if! { if #[cfg(any(target_arch = "x86_64", - target_arch = "aarch64"))] { + target_arch = "aarch64", + target_arch = "riscv64"))] { mod b64; pub use self::b64::*; } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs similarity index 72% rename from lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs rename to lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs index bde4f77fac49..18f866da36eb 100644 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs +++ b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs @@ -1,12 +1,12 @@ ---- vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +--- vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs.orig 2021-11-29 20:27:33 UTC ++++ vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -241,7 +241,8 @@ extern "C" { cfg_if! { if #[cfg(any(target_arch = "x86_64", - target_arch = "aarch64"))] { + target_arch = "aarch64", + target_arch = "riscv64"))] { mod b64; pub use self::b64::*; } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs similarity index 72% rename from lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs rename to lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs index 3dda6014eeb2..5bf019e846eb 100644 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs +++ b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs @@ -1,12 +1,12 @@ ---- vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs +--- vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs.orig 2021-11-29 20:27:33 UTC ++++ vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs @@ -271,7 +271,8 @@ extern "C" { cfg_if! { if #[cfg(any(target_arch = "x86_64", - target_arch = "aarch64"))] { + target_arch = "aarch64", + target_arch = "riscv64"))] { mod b64; pub use self::b64::*; } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_mod.rs similarity index 71% rename from lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_mod.rs rename to lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_mod.rs index 371806f231de..affd8555921c 100644 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_mod.rs +++ b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_mod.rs @@ -1,12 +1,12 @@ ---- vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/mod.rs +--- vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2021-11-29 20:27:33 UTC ++++ vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -2021,6 +2021,9 @@ cfg_if! { } else if #[cfg(target_arch = "powerpc")] { mod powerpc; pub use self::powerpc::*; + } else if #[cfg(target_arch = "riscv64")] { + mod riscv64; + pub use self::riscv64::*; } else { // Unknown target_arch } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_riscv64.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_riscv64.rs similarity index 97% rename from lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_riscv64.rs rename to lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_riscv64.rs index 57f82315c60d..c395951cc851 100644 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.106_src_unix_bsd_freebsdlike_freebsd_riscv64.rs +++ b/lang/rust/files/riscv64/patch-vendor_libc-0.2.108_src_unix_bsd_freebsdlike_freebsd_riscv64.rs @@ -1,157 +1,157 @@ ---- vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/riscv64.rs.orig 2021-11-05 13:41:21 UTC -+++ vendor/libc-0.2.106/src/unix/bsd/freebsdlike/freebsd/riscv64.rs +--- vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/riscv64.rs.orig 2021-11-05 13:41:21 UTC ++++ vendor/libc-0.2.108/src/unix/bsd/freebsdlike/freebsd/riscv64.rs @@ -0,0 +1,154 @@ +pub type c_char = u8; +pub type c_long = i64; +pub type c_ulong = u64; +pub type wchar_t = ::c_int; +pub type time_t = i64; +pub type suseconds_t = ::c_long; +pub type register_t = i64; + +// 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_longlong>() - 1; + } else { + #[doc(hidden)] + pub const _ALIGNBYTES: usize = 8 - 1; + } +} + +s_no_extra_traits! { + pub struct gpregs { + pub gp_ra: ::register_t, + pub gp_sp: ::register_t, + pub gp_gp: ::register_t, + pub gp_tp: ::register_t, + pub gp_t: [::register_t; 7], + pub gp_s: [::register_t; 12], + pub gp_a: [::register_t; 8], + pub gp_sepc: ::register_t, + pub gp_sstatus: ::register_t, + } + + pub struct fpregs { + pub fp_x: [[::register_t; 2]; 32], + pub fp_fcsr: ::register_t, + pub fp_flags: ::c_int, + pub fp_pad: ::c_int, + } + + pub struct mcontext_t { + pub mc_gpregs: gpregs, + pub mc_fpregs: fpregs, + pub mc_flags: ::c_int, + pub mc_pad: ::c_int, + pub mc_spare: [u64; 8], + } +} + +cfg_if! { + if #[cfg(feature = "extra_traits")] { + impl PartialEq for gpregs { + fn eq(&self, other: &gpregs) -> bool { + self.gp_ra == other.gp_ra && + self.gp_sp == other.gp_sp && + self.gp_gp == other.gp_gp && + self.gp_tp == other.gp_tp && + self.gp_t.iter().zip(other.gp_t.iter()).all(|(a, b)| a == b) && + self.gp_s.iter().zip(other.gp_s.iter()).all(|(a, b)| a == b) && + self.gp_a.iter().zip(other.gp_a.iter()).all(|(a, b)| a == b) && + self.gp_sepc == other.gp_sepc && + self.gp_sstatus == other.gp_sstatus + } + } + impl Eq for gpregs {} + impl ::fmt::Debug for gpregs { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("gpregs") + .field("gp_ra", &self.gp_ra) + .field("gp_sp", &self.gp_sp) + .field("gp_gp", &self.gp_gp) + .field("gp_tp", &self.gp_tp) + .field("gp_t", &self.gp_t) + .field("gp_s", &self.gp_s) + .field("gp_a", &self.gp_a) + .field("gp_sepc", &self.gp_sepc) + .field("gp_sstatus", &self.gp_sstatus) + .finish() + } + } + impl ::hash::Hash for gpregs { + fn hash(&self, state: &mut H) { + self.gp_ra.hash(state); + self.gp_sp.hash(state); + self.gp_gp.hash(state); + self.gp_tp.hash(state); + self.gp_t.hash(state); + self.gp_s.hash(state); + self.gp_a.hash(state); + self.gp_sepc.hash(state); + self.gp_sstatus.hash(state); + } + } + impl PartialEq for fpregs { + fn eq(&self, other: &fpregs) -> bool { + self.fp_x == other.fp_x && + self.fp_fcsr == other.fp_fcsr && + self.fp_flags == other.fp_flags && + self.fp_pad == other.fp_pad + } + } + impl Eq for fpregs {} + impl ::fmt::Debug for fpregs { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("fpregs") + .field("fp_x", &self.fp_x) + .field("fp_fcsr", &self.fp_fcsr) + .field("fp_flags", &self.fp_flags) + .field("fp_pad", &self.fp_pad) + .finish() + } + } + impl ::hash::Hash for fpregs { + fn hash(&self, state: &mut H) { + self.fp_x.hash(state); + self.fp_fcsr.hash(state); + self.fp_flags.hash(state); + self.fp_pad.hash(state); + } + } + impl PartialEq for mcontext_t { + fn eq(&self, other: &mcontext_t) -> bool { + self.mc_gpregs == other.mc_gpregs && + self.mc_fpregs == other.mc_fpregs && + self.mc_flags == other.mc_flags && + self.mc_pad == other.mc_pad && + self.mc_spare.iter().zip(other.mc_spare.iter()).all(|(a, b)| a == b) + } + } + impl Eq for mcontext_t {} + impl ::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + f.debug_struct("mcontext_t") + .field("mc_gpregs", &self.mc_gpregs) + .field("mc_fpregs", &self.mc_fpregs) + .field("mc_flags", &self.mc_flags) + .field("mc_pad", &self.mc_pad) + .field("mc_spare", &self.mc_spare) + .finish() + } + } + impl ::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { + self.mc_gpregs.hash(state); + self.mc_fpregs.hash(state); + self.mc_flags.hash(state); + self.mc_pad.hash(state); + self.mc_spare.hash(state); + } + } + } +} + +pub const MAP_32BIT: ::c_int = 0x00080000; +pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs deleted file mode 100644 index 04aef529ce69..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs -@@ -217,7 +217,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs deleted file mode 100644 index e9a428f19c59..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs -@@ -235,7 +235,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs deleted file mode 100644 index fbfa6662aabb..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs -@@ -240,7 +240,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_mod.rs deleted file mode 100644 index 864d0669534c..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/mod.rs -@@ -1749,6 +1749,9 @@ cfg_if! { - } else if #[cfg(target_arch = "powerpc")] { - mod powerpc; - pub use self::powerpc::*; -+ } else if #[cfg(target_arch = "riscv64")] { -+ mod riscv64; -+ pub use self::riscv64::*; - } else { - // Unknown target_arch - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_riscv64.rs b/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_riscv64.rs deleted file mode 100644 index d4fddf2844a2..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc-0.2.98_src_unix_bsd_freebsdlike_freebsd_riscv64.rs +++ /dev/null @@ -1,157 +0,0 @@ ---- vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/riscv64.rs.orig 2021-11-05 13:41:21 UTC -+++ vendor/libc-0.2.98/src/unix/bsd/freebsdlike/freebsd/riscv64.rs -@@ -0,0 +1,154 @@ -+pub type c_char = u8; -+pub type c_long = i64; -+pub type c_ulong = u64; -+pub type wchar_t = ::c_int; -+pub type time_t = i64; -+pub type suseconds_t = ::c_long; -+pub type register_t = i64; -+ -+// 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_longlong>() - 1; -+ } else { -+ #[doc(hidden)] -+ pub const _ALIGNBYTES: usize = 8 - 1; -+ } -+} -+ -+s_no_extra_traits! { -+ pub struct gpregs { -+ pub gp_ra: ::register_t, -+ pub gp_sp: ::register_t, -+ pub gp_gp: ::register_t, -+ pub gp_tp: ::register_t, -+ pub gp_t: [::register_t; 7], -+ pub gp_s: [::register_t; 12], -+ pub gp_a: [::register_t; 8], -+ pub gp_sepc: ::register_t, -+ pub gp_sstatus: ::register_t, -+ } -+ -+ pub struct fpregs { -+ pub fp_x: [[::register_t; 2]; 32], -+ pub fp_fcsr: ::register_t, -+ pub fp_flags: ::c_int, -+ pub fp_pad: ::c_int, -+ } -+ -+ pub struct mcontext_t { -+ pub mc_gpregs: gpregs, -+ pub mc_fpregs: fpregs, -+ pub mc_flags: ::c_int, -+ pub mc_pad: ::c_int, -+ pub mc_spare: [u64; 8], -+ } -+} -+ -+cfg_if! { -+ if #[cfg(feature = "extra_traits")] { -+ impl PartialEq for gpregs { -+ fn eq(&self, other: &gpregs) -> bool { -+ self.gp_ra == other.gp_ra && -+ self.gp_sp == other.gp_sp && -+ self.gp_gp == other.gp_gp && -+ self.gp_tp == other.gp_tp && -+ self.gp_t.iter().zip(other.gp_t.iter()).all(|(a, b)| a == b) && -+ self.gp_s.iter().zip(other.gp_s.iter()).all(|(a, b)| a == b) && -+ self.gp_a.iter().zip(other.gp_a.iter()).all(|(a, b)| a == b) && -+ self.gp_sepc == other.gp_sepc && -+ self.gp_sstatus == other.gp_sstatus -+ } -+ } -+ impl Eq for gpregs {} -+ impl ::fmt::Debug for gpregs { -+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { -+ f.debug_struct("gpregs") -+ .field("gp_ra", &self.gp_ra) -+ .field("gp_sp", &self.gp_sp) -+ .field("gp_gp", &self.gp_gp) -+ .field("gp_tp", &self.gp_tp) -+ .field("gp_t", &self.gp_t) -+ .field("gp_s", &self.gp_s) -+ .field("gp_a", &self.gp_a) -+ .field("gp_sepc", &self.gp_sepc) -+ .field("gp_sstatus", &self.gp_sstatus) -+ .finish() -+ } -+ } -+ impl ::hash::Hash for gpregs { -+ fn hash(&self, state: &mut H) { -+ self.gp_ra.hash(state); -+ self.gp_sp.hash(state); -+ self.gp_gp.hash(state); -+ self.gp_tp.hash(state); -+ self.gp_t.hash(state); -+ self.gp_s.hash(state); -+ self.gp_a.hash(state); -+ self.gp_sepc.hash(state); -+ self.gp_sstatus.hash(state); -+ } -+ } -+ impl PartialEq for fpregs { -+ fn eq(&self, other: &fpregs) -> bool { -+ self.fp_x == other.fp_x && -+ self.fp_fcsr == other.fp_fcsr && -+ self.fp_flags == other.fp_flags && -+ self.fp_pad == other.fp_pad -+ } -+ } -+ impl Eq for fpregs {} -+ impl ::fmt::Debug for fpregs { -+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { -+ f.debug_struct("fpregs") -+ .field("fp_x", &self.fp_x) -+ .field("fp_fcsr", &self.fp_fcsr) -+ .field("fp_flags", &self.fp_flags) -+ .field("fp_pad", &self.fp_pad) -+ .finish() -+ } -+ } -+ impl ::hash::Hash for fpregs { -+ fn hash(&self, state: &mut H) { -+ self.fp_x.hash(state); -+ self.fp_fcsr.hash(state); -+ self.fp_flags.hash(state); -+ self.fp_pad.hash(state); -+ } -+ } -+ impl PartialEq for mcontext_t { -+ fn eq(&self, other: &mcontext_t) -> bool { -+ self.mc_gpregs == other.mc_gpregs && -+ self.mc_fpregs == other.mc_fpregs && -+ self.mc_flags == other.mc_flags && -+ self.mc_pad == other.mc_pad && -+ self.mc_spare.iter().zip(other.mc_spare.iter()).all(|(a, b)| a == b) -+ } -+ } -+ impl Eq for mcontext_t {} -+ impl ::fmt::Debug for mcontext_t { -+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { -+ f.debug_struct("mcontext_t") -+ .field("mc_gpregs", &self.mc_gpregs) -+ .field("mc_fpregs", &self.mc_fpregs) -+ .field("mc_flags", &self.mc_flags) -+ .field("mc_pad", &self.mc_pad) -+ .field("mc_spare", &self.mc_spare) -+ .finish() -+ } -+ } -+ impl ::hash::Hash for mcontext_t { -+ fn hash(&self, state: &mut H) { -+ self.mc_gpregs.hash(state); -+ self.mc_fpregs.hash(state); -+ self.mc_flags.hash(state); -+ self.mc_pad.hash(state); -+ self.mc_spare.hash(state); -+ } -+ } -+ } -+} -+ -+pub const MAP_32BIT: ::c_int = 0x00080000; -+pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 diff --git a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs deleted file mode 100644 index 017c18db6f9c..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd11_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs -@@ -217,7 +217,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs deleted file mode 100644 index 599ba3d18247..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd12_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs -@@ -241,7 +241,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs deleted file mode 100644 index 4098c94249cc..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_freebsd13_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs -@@ -271,7 +271,8 @@ extern "C" { - - cfg_if! { - if #[cfg(any(target_arch = "x86_64", -- target_arch = "aarch64"))] { -+ target_arch = "aarch64", -+ target_arch = "riscv64"))] { - mod b64; - pub use self::b64::*; - } diff --git a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs b/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs deleted file mode 100644 index a99c851e9422..000000000000 --- a/lang/rust/files/riscv64/patch-vendor_libc_src_unix_bsd_freebsdlike_freebsd_mod.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2021-11-29 20:27:33 UTC -+++ vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs -@@ -2021,6 +2021,9 @@ cfg_if! { - } else if #[cfg(target_arch = "powerpc")] { - mod powerpc; - pub use self::powerpc::*; -+ } else if #[cfg(target_arch = "riscv64")] { -+ mod riscv64; -+ pub use self::riscv64::*; - } else { - // Unknown target_arch - }