diff --git a/meta-balena-rust/classes/cargo.bbclass b/meta-balena-rust/classes/cargo.bbclass index 4a780a501f..93e185f2c9 100644 --- a/meta-balena-rust/classes/cargo.bbclass +++ b/meta-balena-rust/classes/cargo.bbclass @@ -1,9 +1,16 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + ## ## Purpose: ## This class is used by any recipes that are built using ## Cargo. inherit cargo_common +inherit rust-target-config # the binary we will use CARGO = "cargo" @@ -12,8 +19,8 @@ CARGO = "cargo" BASEDEPENDS:append = " cargo-native" # Ensure we get the right rust variant -DEPENDS:append:class-target = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" -DEPENDS:append:class-nativesdk = " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" +DEPENDS:append:class-target = " rust-native ${RUSTLIB_DEP}" +DEPENDS:append:class-nativesdk = " rust-native ${RUSTLIB_DEP}" DEPENDS:append:class-native = " rust-native" # Enable build separation @@ -32,17 +39,16 @@ MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" -CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" +CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" # This is based on the content of CARGO_BUILD_FLAGS and generally will need to # change if CARGO_BUILD_FLAGS changes. BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" -CARGO_TARGET_SUBDIR="${HOST_SYS}/${BUILD_DIR}" +CARGO_TARGET_SUBDIR="${RUST_HOST_SYS}/${BUILD_DIR}" oe_cargo_build () { export RUSTFLAGS="${RUSTFLAGS}" - export RUST_TARGET_PATH="${RUST_TARGET_PATH}" + bbnote "Using rust targets from ${RUST_TARGET_PATH}" bbnote "cargo = $(which ${CARGO})" - bbnote "rustc = $(which ${RUSTC})" bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@" "${CARGO}" build ${CARGO_BUILD_FLAGS} "$@" } diff --git a/meta-balena-rust/classes/cargo_common.bbclass b/meta-balena-rust/classes/cargo_common.bbclass index d3ba050aca..f503a001dd 100644 --- a/meta-balena-rust/classes/cargo_common.bbclass +++ b/meta-balena-rust/classes/cargo_common.bbclass @@ -1,3 +1,9 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + ## ## Purpose: ## This class is to support building with cargo. It @@ -8,14 +14,7 @@ ## is used by cargo.bbclass and Rust ## -def set_crate_fetcher(d): - # Check to see whether bitbake has a crate fetcher (included in Kirkstone) - if not os.path.exists(os.path.join(d.getVar('TOPDIR'),'../layers/poky/bitbake/lib/bb/fetch2/crate.py')): - return "crate-fetch" - return "" - # add crate fetch support -inherit ${@set_crate_fetcher(d)} inherit rust-common # Where we download our registry and dependencies to @@ -57,7 +56,7 @@ cargo_common_do_configure () { [source.crates-io] replace-with = "bitbake" - local-registry = "/nonexistant" + local-registry = "/nonexistent" EOF fi @@ -76,26 +75,35 @@ cargo_common_do_configure () { cat <<- EOF >> ${CARGO_HOME}/config # HOST_SYS - [target.${HOST_SYS}] + [target.${RUST_HOST_SYS}] linker = "${CARGO_RUST_TARGET_CCLD}" EOF - if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then + if [ "${RUST_HOST_SYS}" != "${RUST_BUILD_SYS}" ]; then cat <<- EOF >> ${CARGO_HOME}/config # BUILD_SYS - [target.${BUILD_SYS}] + [target.${RUST_BUILD_SYS}] linker = "${RUST_BUILD_CCLD}" EOF fi + if [ "${RUST_TARGET_SYS}" != "${RUST_BUILD_SYS}" -a "${RUST_TARGET_SYS}" != "${RUST_HOST_SYS}" ]; then + cat <<- EOF >> ${CARGO_HOME}/config + + # TARGET_SYS + [target.${RUST_TARGET_SYS}] + linker = "${RUST_TARGET_CCLD}" + EOF + fi + # Put build output in build directory preferred by bitbake instead of # inside source directory unless they are the same if [ "${B}" != "${S}" ]; then cat <<- EOF >> ${CARGO_HOME}/config [build] - # Use out of tree build destination to avoid poluting the source tree + # Use out of tree build destination to avoid polluting the source tree target-dir = "${B}/target" EOF fi diff --git a/meta-balena-rust/classes/crate-fetch.bbclass b/meta-balena-rust/classes/crate-fetch.bbclass deleted file mode 100644 index a7fa22b2a0..0000000000 --- a/meta-balena-rust/classes/crate-fetch.bbclass +++ /dev/null @@ -1,28 +0,0 @@ -# -# crate-fetch class -# -# Registers 'crate' method for Bitbake fetch2. -# -# Adds support for following format in recipe SRC_URI: -# crate:/// -# - -def import_crate(d): - import crate - if not getattr(crate, 'imported', False): - bb.fetch2.methods.append(crate.Crate()) - crate.imported = True - -python crate_import_handler() { - import_crate(d) -} - -addhandler crate_import_handler -crate_import_handler[eventmask] = "bb.event.RecipePreFinalise" - -def crate_get_srcrev(d): - import_crate(d) - return bb.fetch2.get_srcrev(d) - -# Override SRCPV to make sure it imports the fetcher first -SRCPV = "${@crate_get_srcrev(d)}" diff --git a/meta-balena-rust/classes/rust-bin.bbclass b/meta-balena-rust/classes/rust-bin.bbclass index c87343b3cf..b8e7ef8191 100644 --- a/meta-balena-rust/classes/rust-bin.bbclass +++ b/meta-balena-rust/classes/rust-bin.bbclass @@ -1,3 +1,9 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + inherit rust RDEPENDS:${PN}:append:class-target = " ${RUSTLIB_DEP}" @@ -93,7 +99,6 @@ do_configure () { } oe_runrustc () { - export RUST_TARGET_PATH="${RUST_TARGET_PATH}" bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@" "${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@" } diff --git a/meta-balena-rust/classes/rust-common.bbclass b/meta-balena-rust/classes/rust-common.bbclass index d2c7e4a802..3338de7502 100644 --- a/meta-balena-rust/classes/rust-common.bbclass +++ b/meta-balena-rust/classes/rust-common.bbclass @@ -1,46 +1,24 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + inherit python3native +inherit rust-target-config # Common variables used by all Rust builds -export rustlibdir = "${libdir}/rust" +export rustlibdir = "${libdir}/rustlib/${RUST_HOST_SYS}/lib" FILES:${PN} += "${rustlibdir}/*.so" FILES:${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta" FILES:${PN}-dbg += "${rustlibdir}/.debug" -RUSTLIB = "-L ${STAGING_LIBDIR}/rust" +RUSTLIB = "-L ${STAGING_DIR_HOST}${rustlibdir}" RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}" RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}" RUSTLIB_DEP ?= "libstd-rs" -export RUST_TARGET_PATH = "${STAGING_LIBDIR_NATIVE}/rustlib" RUST_PANIC_STRATEGY ?= "unwind" -# Native builds are not effected by TCLIBC. Without this, rust-native -# thinks it's "target" (i.e. x86_64-linux) is a musl target. -RUST_LIBC = "${TCLIBC}" -RUST_LIBC:class-crosssdk = "glibc" -RUST_LIBC:class-native = "glibc" - -def set_rust_arch(arch): - try: - import oe.rust - return oe.rust.arch_to_rust_arch(arch) - except ImportError or ModuleNotFoundError: - return arch - -def determine_libc(d, thing): - '''Determine which libc something should target''' - - # BUILD is never musl, TARGET may be musl or glibc, - # HOST could be musl, but only if a compiler is built to be run on - # target in which case HOST_SYS != BUILD_SYS. - if thing == 'TARGET': - libc = d.getVar('RUST_LIBC') - elif thing == 'BUILD' and (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')): - libc = d.getVar('RUST_LIBC') - else: - libc = d.getVar('RUST_LIBC:class-native') - - return libc - def target_is_armv7(d): '''Determine if target is armv7''' # TUNE_FEATURES may include arm* even if the target is not arm @@ -70,37 +48,30 @@ def rust_base_triple(d, thing): ''' # The llvm-target for armv7 is armv7-unknown-linux-gnueabihf - if thing == "TARGET" and target_is_armv7(d): + if d.getVar('{}_ARCH'.format(thing)) == d.getVar('TARGET_ARCH') and target_is_armv7(d): arch = "armv7" else: - arch = set_rust_arch(d.getVar('{}_ARCH'.format(thing))) - - # All the Yocto targets are Linux and are 'unknown' - vendor = "-unknown" - os = d.getVar('{}_OS'.format(thing)) - libc = determine_libc(d, thing) + arch = oe.rust.arch_to_rust_arch(d.getVar('{}_ARCH'.format(thing))) - # Prefix with a dash and convert glibc -> gnu - if libc == "glibc": - libc = "-gnu" - elif libc == "musl": - libc = "-musl" - - # Don't double up musl (only appears to be the case on aarch64) - if os == "linux-musl": - if libc != "-musl": - bb.fatal("{}_OS was '{}' but TCLIBC was not 'musl'".format(thing, os)) - os = "linux" + # Substituting "unknown" when vendor is empty will match rust's standard + # targets when building native recipes (including rust-native itself) + vendor = d.getVar('{}_VENDOR'.format(thing)) or "-unknown" + # Default to glibc + libc = "-gnu" + os = d.getVar('{}_OS'.format(thing)) # This catches ARM targets and appends the necessary hard float bits if os == "linux-gnueabi" or os == "linux-musleabi": libc = bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d) - return arch + vendor + '-' + os + libc + elif "musl" in os: + libc = "-musl" + os = "linux" + return arch + vendor + '-' + os + libc # In some cases uname and the toolchain differ on their idea of the arch name -RUST_BUILD_ARCH = "${@set_rust_arch(d.getVar('BUILD_ARCH'))}" +RUST_BUILD_ARCH = "${@oe.rust.arch_to_rust_arch(d.getVar('BUILD_ARCH'))}" # Naming explanation # Yocto @@ -146,26 +117,32 @@ RUST_TARGET_CXX = "${WRAPPER_DIR}/target-rust-cxx" RUST_TARGET_CCLD = "${WRAPPER_DIR}/target-rust-ccld" RUST_TARGET_AR = "${WRAPPER_DIR}/target-rust-ar" -create_wrapper () { +create_wrapper_rust () { file="$1" shift + extras="$1" + shift cat <<- EOF > "${file}" #!/usr/bin/env python3 import os, sys orig_binary = "$@" + extras = "${extras}" binary = orig_binary.split()[0] args = orig_binary.split() + sys.argv[1:] + if extras: + args.append(extras) os.execvp(binary, args) EOF chmod +x "${file}" } -export WRAPPER_TARGET_CC = "${CC}" -export WRAPPER_TARGET_CXX = "${CXX}" -export WRAPPER_TARGET_CCLD = "${CCLD}" -export WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}" -export WRAPPER_TARGET_AR = "${AR}" +WRAPPER_TARGET_CC = "${CC}" +WRAPPER_TARGET_CXX = "${CXX}" +WRAPPER_TARGET_CCLD = "${CCLD}" +WRAPPER_TARGET_LDFLAGS = "${LDFLAGS}" +WRAPPER_TARGET_EXTRALD = "" +WRAPPER_TARGET_AR = "${AR}" # compiler is used by gcc-rs # linker is used by rustc/cargo @@ -174,22 +151,22 @@ do_rust_create_wrappers () { mkdir -p "${WRAPPER_DIR}" # Yocto Build / Rust Host C compiler - create_wrapper "${RUST_BUILD_CC}" "${BUILD_CC}" + create_wrapper_rust "${RUST_BUILD_CC}" "" "${BUILD_CC}" # Yocto Build / Rust Host C++ compiler - create_wrapper "${RUST_BUILD_CXX}" "${BUILD_CXX}" + create_wrapper_rust "${RUST_BUILD_CXX}" "" "${BUILD_CXX}" # Yocto Build / Rust Host linker - create_wrapper "${RUST_BUILD_CCLD}" "${BUILD_CCLD}" "${BUILD_LDFLAGS}" + create_wrapper_rust "${RUST_BUILD_CCLD}" "" "${BUILD_CCLD}" "${BUILD_LDFLAGS}" # Yocto Build / Rust Host archiver - create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}" + create_wrapper_rust "${RUST_BUILD_AR}" "" "${BUILD_AR}" # Yocto Target / Rust Target C compiler - create_wrapper "${RUST_TARGET_CC}" "${WRAPPER_TARGET_CC}" "${WRAPPER_TARGET_LDFLAGS}" + create_wrapper_rust "${RUST_TARGET_CC}" "${WRAPPER_TARGET_EXTRALD}" "${WRAPPER_TARGET_CC}" "${WRAPPER_TARGET_LDFLAGS}" # Yocto Target / Rust Target C++ compiler - create_wrapper "${RUST_TARGET_CXX}" "${WRAPPER_TARGET_CXX}" + create_wrapper_rust "${RUST_TARGET_CXX}" "${WRAPPER_TARGET_EXTRALD}" "${WRAPPER_TARGET_CXX}" "${CXXFLAGS}" # Yocto Target / Rust Target linker - create_wrapper "${RUST_TARGET_CCLD}" "${WRAPPER_TARGET_CCLD}" "${WRAPPER_TARGET_LDFLAGS}" + create_wrapper_rust "${RUST_TARGET_CCLD}" "${WRAPPER_TARGET_EXTRALD}" "${WRAPPER_TARGET_CCLD}" "${WRAPPER_TARGET_LDFLAGS}" # Yocto Target / Rust Target archiver - create_wrapper "${RUST_TARGET_AR}" "${WRAPPER_TARGET_AR}" + create_wrapper_rust "${RUST_TARGET_AR}" "" "${WRAPPER_TARGET_AR}" } diff --git a/meta-balena-rust/recipes-devtools/rust/rust-common.inc b/meta-balena-rust/classes/rust-target-config.bbclass similarity index 76% rename from meta-balena-rust/recipes-devtools/rust/rust-common.inc rename to meta-balena-rust/classes/rust-target-config.bbclass index dffebd006e..2710b4325d 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-common.inc +++ b/meta-balena-rust/classes/rust-target-config.bbclass @@ -1,3 +1,8 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# # Right now this is focused on arm-specific tune features. # We get away with this for now as one can only use x86-64 as the build host @@ -117,6 +122,7 @@ def llvm_features(d): llvm_features_from_cc_arch(d) + llvm_features_from_target_fpu(d)) +llvm_features[vardepvalue] = "${@llvm_features(d)}" ## arm-unknown-linux-gnueabihf DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" @@ -190,6 +196,13 @@ TARGET_POINTER_WIDTH[mips64] = "64" TARGET_C_INT_WIDTH[mips64] = "64" MAX_ATOMIC_WIDTH[mips64] = "64" +## mips64-n32-unknown-linux-{gnu, musl} +DATA_LAYOUT[mips64-n32] = "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128" +TARGET_ENDIAN[mips64-n32] = "big" +TARGET_POINTER_WIDTH[mips64-n32] = "32" +TARGET_C_INT_WIDTH[mips64-n32] = "32" +MAX_ATOMIC_WIDTH[mips64-n32] = "64" + ## mips64el-unknown-linux-{gnu, musl} DATA_LAYOUT[mips64el] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128" TARGET_ENDIAN[mips64el] = "little" @@ -218,25 +231,19 @@ TARGET_POINTER_WIDTH[powerpc64le] = "64" TARGET_C_INT_WIDTH[powerpc64le] = "64" MAX_ATOMIC_WIDTH[powerpc64le] = "64" -## riscv32-unknown-linux-{gnu, musl} -DATA_LAYOUT[riscv32] = "e-m:e-p:32:32-i64:64-n32-S128" -TARGET_ENDIAN[riscv32] = "little" -TARGET_POINTER_WIDTH[riscv32] = "32" -TARGET_C_INT_WIDTH[riscv32] = "32" -MAX_ATOMIC_WIDTH[riscv32] = "32" - -## riscv64-unknown-linux-{gnu, musl} -DATA_LAYOUT[riscv64] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128" -TARGET_ENDIAN[riscv64] = "little" -TARGET_POINTER_WIDTH[riscv64] = "64" -TARGET_C_INT_WIDTH[riscv64] = "64" -MAX_ATOMIC_WIDTH[riscv64] = "64" - -def sys_for(d, thing): - return d.getVar('{}_SYS'.format(thing)) +## riscv32gc-unknown-linux-{gnu, musl} +DATA_LAYOUT[riscv32gc] = "e-m:e-p:32:32-i64:64-n32-S128" +TARGET_ENDIAN[riscv32gc] = "little" +TARGET_POINTER_WIDTH[riscv32gc] = "32" +TARGET_C_INT_WIDTH[riscv32gc] = "32" +MAX_ATOMIC_WIDTH[riscv32gc] = "32" -def prefix_for(d, thing): - return d.getVar('{}_PREFIX'.format(thing)) +## riscv64gc-unknown-linux-{gnu, musl} +DATA_LAYOUT[riscv64gc] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128" +TARGET_ENDIAN[riscv64gc] = "little" +TARGET_POINTER_WIDTH[riscv64gc] = "64" +TARGET_C_INT_WIDTH[riscv64gc] = "64" +MAX_ATOMIC_WIDTH[riscv64gc] = "64" # Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something # rust's internals won't choke on. @@ -251,9 +258,21 @@ def arch_to_rust_target_arch(arch): return "arm" elif arch == "powerpc64le": return "powerpc64" + elif arch == "riscv32gc": + return "riscv32" + elif arch == "riscv64gc": + return "riscv64" else: return arch +# Convert a rust target string to a llvm-compatible triplet +def rust_sys_to_llvm_target(sys): + if sys.startswith('riscv32gc-'): + return sys.replace('riscv32gc-', 'riscv32-', 1) + if sys.startswith('riscv64gc-'): + return sys.replace('riscv64gc-', 'riscv64-', 1) + return sys + # generates our target CPU value def llvm_cpu(d): cpu = d.getVar('PACKAGE_ARCH') @@ -265,13 +284,12 @@ def llvm_cpu(d): trans['x86-64'] = "x86-64" trans['i686'] = "i686" trans['i586'] = "i586" - trans['powerpc'] = "powerpc" trans['mips64'] = "mips64" trans['mips64el'] = "mips64" trans['riscv64'] = "generic-rv64" trans['riscv32'] = "generic-rv32" - if target in ["mips", "mipsel"]: + if target in ["mips", "mipsel", "powerpc"]: feat = frozenset(d.getVar('TUNE_FEATURES').split()) if "mips32r2" in feat: trans['mipsel'] = "mips32r2" @@ -279,25 +297,44 @@ def llvm_cpu(d): elif "mips32" in feat: trans['mipsel'] = "mips32" trans['mips'] = "mips32" + elif "ppc7400" in feat: + trans['powerpc'] = "7400" try: return trans[cpu] except: return trans.get(target, "generic") -TARGET_LLVM_CPU="${@llvm_cpu(d)}" -TARGET_LLVM_FEATURES = "${@llvm_features(d)}" - -# class-native implies TARGET=HOST, and TUNE_FEATURES only describes the real -# (original) target. -TARGET_LLVM_FEATURES:class-native = "${@','.join(llvm_features_from_cc_arch(d))}" +llvm_cpu[vardepvalue] = "${@llvm_cpu(d)}" -def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): +def rust_gen_target(d, thing, wd, arch): import json - sys = sys_for(d, thing) - prefix = prefix_for(d, thing) - rust_arch = set_rust_arch(arch) + build_sys = d.getVar('BUILD_SYS') + target_sys = d.getVar('TARGET_SYS') + + sys = d.getVar('{}_SYS'.format(thing)) + prefix = d.getVar('{}_PREFIX'.format(thing)) + rustsys = d.getVar('RUST_{}_SYS'.format(thing)) + + abi = None + cpu = "generic" + features = "" + + # Need to apply the target tuning consitently, only if the triplet applies to the target + # and not in the native case + if sys == target_sys and sys != build_sys: + abi = d.getVar('ABIEXTENSION') + cpu = llvm_cpu(d) + if bb.data.inherits_class('native', d): + features = ','.join(llvm_features_from_cc_arch(d)) + else: + features = llvm_features(d) or "" + # arm and armv7 have different targets in llvm + if arch == "arm" and target_is_armv7(d): + arch = 'armv7' + + rust_arch = oe.rust.arch_to_rust_arch(arch) if abi: arch_abi = "{}-{}".format(rust_arch, abi) @@ -309,8 +346,10 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): # build tspec tspec = {} - tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi) + tspec['llvm-target'] = rust_sys_to_llvm_target(rustsys) tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) + if tspec['data-layout'] is None: + bb.fatal("No rust target defined for %s" % arch_abi) tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) @@ -336,25 +375,29 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): tspec['linker-is-gnu'] = True tspec['linker-flavor'] = "gcc" tspec['has-rpath'] = True - tspec['has-elf-tls'] = True tspec['position-independent-executables'] = True tspec['panic-strategy'] = d.getVar("RUST_PANIC_STRATEGY") # write out the target spec json file - with open(wd + sys + '.json', 'w') as f: + with open(wd + rustsys + '.json', 'w') as f: json.dump(tspec, f, indent=4) # These are accounted for in tmpdir path names so don't need to be in the task sig -rust_gen_target[vardepsexclude] += "RUST_HOST_SYS RUST_TARGET_SYS" +rust_gen_target[vardepsexclude] += "ABIEXTENSION llvm_cpu" do_rust_gen_targets[vardeps] += "DATA_LAYOUT TARGET_ENDIAN TARGET_POINTER_WIDTH TARGET_C_INT_WIDTH MAX_ATOMIC_WIDTH FEATURES" +RUST_TARGETS_DIR = "${WORKDIR}/rust-targets/" +export RUST_TARGET_PATH = "${RUST_TARGETS_DIR}" + python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - build_arch = d.getVar('BUILD_ARCH') - rust_gen_target(d, 'BUILD', wd, "", "generic", build_arch) + wd = d.getVar('RUST_TARGETS_DIR') + # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last + rust_gen_target(d, 'BUILD', wd, d.getVar('BUILD_ARCH')) + rust_gen_target(d, 'HOST', wd, d.getVar('HOST_ARCH')) + rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_ARCH')) } addtask rust_gen_targets after do_patch before do_compile -do_rust_gen_targets[dirs] += "${WORKDIR}/targets" +do_rust_gen_targets[dirs] += "${RUST_TARGETS_DIR}" diff --git a/meta-balena-rust/classes/rust.bbclass b/meta-balena-rust/classes/rust.bbclass index 5c8938d09f..dae25cac2a 100644 --- a/meta-balena-rust/classes/rust.bbclass +++ b/meta-balena-rust/classes/rust.bbclass @@ -1,8 +1,14 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + inherit rust-common RUSTC = "rustc" -RUSTC_ARCHFLAGS += "--target=${HOST_SYS} ${RUSTFLAGS}" +RUSTC_ARCHFLAGS += "--target=${RUST_HOST_SYS} ${RUSTFLAGS}" def rust_base_dep(d): # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to @@ -10,7 +16,7 @@ def rust_base_dep(d): deps = "" if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'): if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')): - deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" + deps += " rust-native ${RUSTLIB_DEP}" else: deps += " rust-native" return deps @@ -37,7 +43,7 @@ HOST_CFLAGS ?= "${CFLAGS}" HOST_CXXFLAGS ?= "${CXXFLAGS}" HOST_CPPFLAGS ?= "${CPPFLAGS}" -rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib" +rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${RUST_HOST_SYS}/lib" # Native sysroot standard library path rustlib_src="${prefix}/lib/${rustlib_suffix}" # Host sysroot standard library path diff --git a/meta-balena-rust/conf/distro/include/balena-os-rust-version.inc b/meta-balena-rust/conf/distro/include/balena-os-rust-version.inc index 6c34165fe6..aadacfb051 100644 --- a/meta-balena-rust/conf/distro/include/balena-os-rust-version.inc +++ b/meta-balena-rust/conf/distro/include/balena-os-rust-version.inc @@ -1,7 +1,7 @@ -PREFERRED_VERSION_rust = "1.62.0" -PREFERRED_VERSION_rust-native = "1.62.0" -PREFERRED_VERSION_rust-cross-${TARGET_ARCH} = "1.62.0" -PREFERRED_VERSION_rust-llvm-native = "1.62.0" -PREFERRED_VERSION_cargo-native = "1.62.0" -PREFERRED_VERSION_libstd-rs = "1.62.0" +PREFERRED_VERSION_rust = "1.65.0" +PREFERRED_VERSION_rust-native = "1.65.0" +PREFERRED_VERSION_rust-cross-${TARGET_ARCH} = "1.65.0" +PREFERRED_VERSION_rust-llvm-native = "1.65.0" +PREFERRED_VERSION_cargo-native = "1.65.0" +PREFERRED_VERSION_libstd-rs = "1.65.0" diff --git a/meta-balena-rust/lib/crate.py b/meta-balena-rust/lib/crate.py index 47012b1a63..f091200dd9 100644 --- a/meta-balena-rust/lib/crate.py +++ b/meta-balena-rust/lib/crate.py @@ -71,7 +71,7 @@ def _crate_urldata_init(self, ud, d): ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) ud.parm['name'] = name - logger.debug(2, "Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) + logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) def unpack(self, ud, rootdir, d): """ diff --git a/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian.inc b/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian.inc deleted file mode 100644 index 7fc22a4128..0000000000 --- a/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian.inc +++ /dev/null @@ -1,72 +0,0 @@ -SUMMARY = "Cargo, a package manager for Rust cross canadian flavor." - -RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config" - -HOST_SYS = "${HOST_ARCH}-unknown-linux-gnu" -CARGO_RUST_TARGET_CCLD = "${RUST_BUILD_CCLD}" - -require recipes-devtools/rust/rust-common.inc -require cargo.inc - -CARGO = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo" -BASEDEPENDS:remove = "cargo-native" - -export RUST_TARGET_PATH="${WORKDIR}/targets/" - -RUSTLIB = " \ - -L ${STAGING_DIR_NATIVE}/${SDKPATHNATIVE}/usr/lib/${TARGET_SYS}/rustlib/${HOST_SYS}/lib \ -" - -DEPENDS += "rust-native \ - rust-cross-canadian-${TRANSLATED_TARGET_ARCH} \ - virtual/nativesdk-${HOST_PREFIX}compilerlibs \ - nativesdk-openssl nativesdk-zlib \ - virtual/nativesdk-libc \ -" - -inherit cross-canadian - -PN = "cargo-cross-canadian-${TRANSLATED_TARGET_ARCH}" - -python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - - rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) - rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) -} - -do_compile:prepend () { - PKG_CONFIG_PATH="${RECIPE_SYSROOT_NATIVE}/usr/lib/pkgconfig:${PKG_CONFIG_PATH}" -} - -do_install () { - SYS_BINDIR=$(dirname ${D}${bindir}) - install -d "${SYS_BINDIR}" - install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${SYS_BINDIR}" - for i in ${SYS_BINDIR}/*; do - chrpath -r "\$ORIGIN/../lib" ${i} - done - - ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d - mkdir "${ENV_SETUP_DIR}" - ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" - cat <<- EOF > "${ENV_SETUP_SH}" - export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" - mkdir -p "\$CARGO_HOME" - # Init the default target once, it might be otherwise user modified. - if [ ! -f "\$CARGO_HOME/config" ]; then - touch "\$CARGO_HOME/config" - echo "[build]" >> "\$CARGO_HOME/config" - echo 'target = "'${TARGET_SYS}'"' >> "\$CARGO_HOME/config" - fi - - # Keep the below off as long as HTTP/2 is disabled. - export CARGO_HTTP_MULTIPLEXING=false - - export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt" - EOF -} - -PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin" -FILES:${PN} += "${base_prefix}/environment-setup.d ${PKG_SYS_BINDIR}" - diff --git a/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian_1.62.0.bb b/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian_1.62.0.bb deleted file mode 100644 index 63fd69107b..0000000000 --- a/meta-balena-rust/recipes-devtools/cargo/cargo-cross-canadian_1.62.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require recipes-devtools/rust/rust-source.inc -require recipes-devtools/rust/rust-snapshot.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:" - -require cargo-cross-canadian.inc diff --git a/meta-balena-rust/recipes-devtools/cargo/cargo.inc b/meta-balena-rust/recipes-devtools/cargo/cargo.inc index 607c51fc3d..40421df4f7 100644 --- a/meta-balena-rust/recipes-devtools/cargo/cargo.inc +++ b/meta-balena-rust/recipes-devtools/cargo/cargo.inc @@ -41,6 +41,14 @@ do_install () { install -m 755 "${B}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}" } +do_install:append:class-nativesdk() { + # To quote the cargo docs, "Cargo also sets the dynamic library path when compiling + # and running binaries with commands like `cargo run` and `cargo test`". Sadly it + # sets to libdir but not base_libdir leading to symbol mismatches depending on the + # host OS. Fully set LD_LIBRARY_PATH to contain both to avoid this. + create_wrapper ${D}/${bindir}/cargo LD_LIBRARY_PATH=${libdir}:${base_libdir} +} + # Disabled due to incompatibility with libgit2 0.28.x (https://github.com/rust-lang/git2-rs/issues/458, https://bugs.gentoo.org/707746#c1) # as shipped by Yocto Dunfell. # According to https://github.com/rust-lang/git2-rs/issues/458#issuecomment-522567539, there are no compatibility guarantees between @@ -54,3 +62,8 @@ export LIBSSH2_SYS_USE_PKG_CONFIG = "1" # so we must use the locally set up snapshot to bootstrap the build. BASEDEPENDS:remove:class-native = "cargo-native" CARGO:class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo" + +DEPENDS:append:class-nativesdk = " nativesdk-rust" +RUSTLIB:append:class-nativesdk = " -L ${STAGING_DIR_HOST}/${SDKPATHNATIVE}/usr/lib/rustlib/${RUST_HOST_SYS}/lib" + + diff --git a/meta-balena-rust/recipes-devtools/cargo/cargo_1.62.0.bb b/meta-balena-rust/recipes-devtools/cargo/cargo_1.65.0.bb similarity index 82% rename from meta-balena-rust/recipes-devtools/cargo/cargo_1.62.0.bb rename to meta-balena-rust/recipes-devtools/cargo/cargo_1.65.0.bb index eee58fc245..5c8527708c 100644 --- a/meta-balena-rust/recipes-devtools/cargo/cargo_1.62.0.bb +++ b/meta-balena-rust/recipes-devtools/cargo/cargo_1.65.0.bb @@ -2,3 +2,4 @@ require recipes-devtools/rust/rust-source.inc require recipes-devtools/rust/rust-snapshot.inc require cargo.inc BBCLASSEXTEND = "native nativesdk" +RUSTLIB_DEP:class-nativesdk = "" \ No newline at end of file diff --git a/meta-balena-rust/recipes-devtools/rust/README-rust.md b/meta-balena-rust/recipes-devtools/rust/README-rust.md index b87637c3b0..209836ab65 100644 --- a/meta-balena-rust/recipes-devtools/rust/README-rust.md +++ b/meta-balena-rust/recipes-devtools/rust/README-rust.md @@ -3,22 +3,6 @@ This provides the Rust compiler, tools for building packages (cargo), and a few example projects. -## What works: - - - Building `rust-native` and `cargo-native` - - Building Rust based projects with Cargo for the TARGET - - e.g. `rustfmt` which is used by the CI system - - `-buildsdk` and `-crosssdk` packages - -## What doesn't: - - - Using anything but x86_64 or arm64 as the build environment - - rust (built for target) [issue #81](https://github.com/meta-rust/meta-rust/issues/81) - -## What's untested: - - - cargo (built for target) - ## Building a rust package When building a rust package in bitbake, it's usually easiest to build with @@ -36,11 +20,11 @@ may also be added to the SDK. NOTE: You will have to edit the generated recipe based on the comments contained within it -## TODO - ## Pitfalls - - TARGET_SYS _must_ be different from BUILD_SYS. This is due to the way Rust configuration options are tracked for different targets. This is the reason we use the Yocto triples instead of the native Rust triples. See rust-lang/cargo#3349. + - TARGET_SYS _must_ be different from BUILD_SYS. This is due to the way Rust + configuration options are tracked for different targets. This is the reason + we use the Yocto triples instead of the native Rust triples. See rust-lang/cargo#3349. ## Dependencies @@ -52,7 +36,3 @@ On the target: - Any `-sys` packages your project might need must have RDEPENDs for the native library. -## Copyright - -MIT OR Apache-2.0 - Same as rust - diff --git a/meta-balena-rust/recipes-devtools/rust/files/target-rust-ccld.c b/meta-balena-rust/recipes-devtools/rust/files/target-rust-ccld.c new file mode 100644 index 0000000000..d3d491fb60 --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/files/target-rust-ccld.c @@ -0,0 +1,19 @@ +/* +* +* Copyright (C) 2022 Wind River Systems +* +* SPDX-License-Identifier: MIT +* +*/ + +#include +#include +#include + +int main (int argc, char *argv[]) +{ + unsetenv("LD_LIBRARY_PATH"); + execvp("target-rust-ccld-wrapper", argv); + + return 0; +} diff --git a/meta-balena-rust/recipes-devtools/rust/libstd-rs.inc b/meta-balena-rust/recipes-devtools/rust/libstd-rs.inc index 987956344a..d49383ced5 100644 --- a/meta-balena-rust/recipes-devtools/rust/libstd-rs.inc +++ b/meta-balena-rust/recipes-devtools/rust/libstd-rs.inc @@ -35,6 +35,6 @@ do_install () { # With the incremental build support added in 1.24, the libstd deps directory also includes dependency # files that get installed. Those are really only needed to incrementally rebuild the libstd library # itself and don't need to be installed. - rm -f ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d - cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} + rm -f ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/*.d + cp ${B}/${RUST_TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} } diff --git a/meta-balena-rust/recipes-devtools/rust/libstd-rs_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/libstd-rs_1.65.0.bb similarity index 100% rename from meta-balena-rust/recipes-devtools/rust/libstd-rs_1.62.0.bb rename to meta-balena-rust/recipes-devtools/rust/libstd-rs_1.65.0.bb diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian-common.inc deleted file mode 100644 index 1f21c8af26..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian-common.inc +++ /dev/null @@ -1,54 +0,0 @@ - -RUST_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config" - -require rust.inc - -DEPENDS += "rust-llvm (=${PV})" - -inherit cross-canadian - -DEPENDS += " \ - virtual/${HOST_PREFIX}gcc-crosssdk \ - virtual/nativesdk-libc rust-llvm-native \ - virtual/${TARGET_PREFIX}compilerlibs \ - virtual/nativesdk-${HOST_PREFIX}compilerlibs \ - gcc-cross-${TARGET_ARCH} \ - " - -# The host tools are likely not to be able to do the necessary operation on -# the target architecturea. Alternatively one could check compatibility -# between host/target. -EXCLUDE_FROM_SHLIBS_${RUSTLIB_TARGET_PN} = "1" - -DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \ - -fdebug-prefix-map=${STAGING_DIR_HOST}= \ - -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \ - " - -python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) - rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) - rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) -} - -INHIBIT_DEFAULT_RUST_DEPS = "1" - -export WRAPPER_TARGET_CC = "${CCACHE}${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}" -export WRAPPER_TARGET_CXX = "${CCACHE}${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}" -export WRAPPER_TARGET_CCLD = "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TARGET_CC_ARCH} ${SECURITY_NOPIE_CFLAGS}" -export WRAPPER_TARGET_LDFLAGS = "${TARGET_LDFLAGS}" -export WRAPPER_TARGET_AR = "${TARGET_PREFIX}ar" - -python do_configure:prepend() { - targets = [d.getVar("TARGET_SYS", True), "{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))] - hosts = ["{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))] -} - -INSANE_SKIP:${RUSTLIB_TARGET_PN} = "file-rdeps arch ldflags" -SKIP_FILEDEPS:${RUSTLIB_TARGET_PN} = "1" - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_SYSROOT_STRIP = "1" - diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian.inc b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian.inc index 8bbbd61bdc..17f933959f 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian.inc @@ -1,78 +1,85 @@ +PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}" -require rust-cross-canadian-common.inc +inherit rust-target-config +inherit rust-common -RUSTLIB_TARGET_PN = "rust-cross-canadian-rustlib-target-${TRANSLATED_TARGET_ARCH}" -RUSTLIB_HOST_PN = "rust-cross-canadian-rustlib-host-${TRANSLATED_TARGET_ARCH}" -RUSTLIB_SRC_PN = "rust-cross-canadian-src" -RUSTLIB_PKGS = "${RUSTLIB_SRC_PN} ${RUSTLIB_TARGET_PN} ${RUSTLIB_HOST_PN}" -PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}" +LICENSE = "MIT" + +MODIFYTOS = "0" + +DEPENDS += "virtual/${SDK_PREFIX}gcc-crosssdk virtual/nativesdk-libc virtual/nativesdk-${SDK_PREFIX}compilerlibs" -PACKAGES = "${RUSTLIB_PKGS} ${PN}" -RDEPENDS:${PN} += "${RUSTLIB_PKGS}" +SRC_URI += "file://target-rust-ccld.c" +LIC_FILES_CHKSUM = "file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7" +S = "${WORKDIR}" -# The default behaviour of x.py changed in 1.47+ so now we need to -# explicitly ask for the stage 2 compiler to be assembled. -do_compile () { - rust_runx build --stage 2 +# Need to use our SDK's sh here, see #14878 +create_sdk_wrapper () { + file="$1" + shift + cat <<- EOF > "${file}" + #!/bin/sh + \$$1 \$@ + EOF + + chmod +x "$file" } do_install () { # Rust requires /usr/lib to contain the libs. - # Similar story is with /usr/bin ruquiring `lib` to be at the same level. # The required structure is retained for simplicity. SYS_LIBDIR=$(dirname ${D}${libdir}) SYS_BINDIR=$(dirname ${D}${bindir}) RUSTLIB_DIR=${SYS_LIBDIR}/${TARGET_SYS}/rustlib - install -d "${SYS_BINDIR}" - cp build/${SNAPSHOT_BUILD_SYS}/stage2/bin/* ${SYS_BINDIR} - for i in ${SYS_BINDIR}/*; do - chrpath -r "\$ORIGIN/../lib" ${i} - done - - install -d "${D}${libdir}" - cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${TARGET_SYS}/*.so ${SYS_LIBDIR} - cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${TARGET_SYS}/rustlib ${RUSTLIB_DIR} - - for i in ${SYS_LIBDIR}/*.so; do - chrpath -r "\$ORIGIN/../lib" ${i} - done - for i in ${RUSTLIB_DIR}/*/lib/*.so; do - chrpath -d ${i} - done - - install -m 0644 "${WORKDIR}/targets/${TARGET_SYS}.json" "${RUSTLIB_DIR}" - - SRC_DIR=${RUSTLIB_DIR}/src/rust - install -d ${SRC_DIR}/src/llvm-project - cp -R --no-dereference build/${SNAPSHOT_BUILD_SYS}/stage2/lib/rustlib/src/rust/src/llvm-project/libunwind ${SRC_DIR}/src/llvm-project - cp -R --no-dereference build/${SNAPSHOT_BUILD_SYS}/stage2/lib/rustlib/src/rust/library ${SRC_DIR} - cp --no-dereference build/${SNAPSHOT_BUILD_SYS}/stage2/lib/rustlib/src/rust/Cargo.lock ${SRC_DIR} - # Remove executable bit from any files so then SDK doesn't try to relocate. - chmod -R -x+X ${SRC_DIR} + install -d ${RUSTLIB_DIR} + install -m 0644 "${RUST_TARGETS_DIR}/${RUST_HOST_SYS}.json" "${RUSTLIB_DIR}" + install -m 0644 "${RUST_TARGETS_DIR}/${RUST_TARGET_SYS}.json" "${RUSTLIB_DIR}" + + # Uses SDK's CC as linker so linked binaries works out of box. + # We have a problem as rust sets LD_LIBRARY_PATH and this will break running host + # binaries (even /bin/sh) in the SDK as they detect a newer glibc from the SDK + # in those paths and we hit symbol errors. We saw particular problems with symbol + # mismatch on ubuntu1804 during development. To avoid this we have an SDK built + # binary which unsets LD_LIBRARY_PATH, which can then call the wrapper script + # where the context is easier to do the env maniupations needed + install -d ${SYS_BINDIR} + outfile="${SYS_BINDIR}/target-rust-ccld" + ${CC} ${WORKDIR}/target-rust-ccld.c -o $outfile + chmod +x "$outfile" + create_sdk_wrapper "${SYS_BINDIR}/target-rust-ccld-wrapper" "CC" ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d mkdir "${ENV_SETUP_DIR}" - ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" + RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" - cat <<- EOF > "${ENV_SETUP_SH}" - export RUSTFLAGS="--sysroot=\$OECORE_NATIVE_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT -L\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib/${TARGET_SYS}/lib" + cat <<- EOF > "${RUST_ENV_SETUP_SH}" + export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT" export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib" EOF chown -R root.root ${D} + + CARGO_ENV_SETUP_SH="${ENV_SETUP_DIR}/cargo.sh" + cat <<- EOF > "${CARGO_ENV_SETUP_SH}" + export CARGO_HOME="\$OECORE_TARGET_SYSROOT/home/cargo" + mkdir -p "\$CARGO_HOME" + # Init the default target once, it might be otherwise user modified. + if [ ! -f "\$CARGO_HOME/config" ]; then + touch "\$CARGO_HOME/config" + echo "[build]" >> "\$CARGO_HOME/config" + echo 'target = "'${RUST_TARGET_SYS}'"' >> "\$CARGO_HOME/config" + echo '# TARGET_SYS' >> "\$CARGO_HOME/config" + echo '[target.'${RUST_TARGET_SYS}']' >> "\$CARGO_HOME/config" + echo 'linker = "target-rust-ccld"' >> "\$CARGO_HOME/config" + fi + + # Keep the below off as long as HTTP/2 is disabled. + export CARGO_HTTP_MULTIPLEXING=false + + export CARGO_HTTP_CAINFO="\$OECORE_NATIVE_SYSROOT/etc/ssl/certs/ca-certificates.crt" + EOF } -PKG_SYS_LIBDIR = "${SDKPATHNATIVE}/usr/lib" -PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin" -PKG_RUSTLIB_DIR = "${PKG_SYS_LIBDIR}/${TARGET_SYS}/rustlib" -FILES:${PN} = "${PKG_SYS_LIBDIR}/*.so ${PKG_SYS_BINDIR} ${base_prefix}/environment-setup.d" -FILES:${RUSTLIB_TARGET_PN} = "${PKG_RUSTLIB_DIR}/${TARGET_SYS} ${PKG_RUSTLIB_DIR}/${TARGET_SYS}.json" -FILES:${RUSTLIB_HOST_PN} = "${PKG_RUSTLIB_DIR}/${BUILD_ARCH}-unknown-linux-gnu" -FILES:${RUSTLIB_SRC_PN} = "${PKG_RUSTLIB_DIR}/src" - -SUMMARY:${RUSTLIB_TARGET_PN} = "Rust cross canadian libaries for ${TARGET_SYS}" -SUMMARY:${RUSTLIB_HOST_PN} = "Rust cross canadian libaries for ${HOST_SYS}" -SUMMARY:${RUSTLIB_SRC_PN} = "Rust standard library sources for cross canadian toolchain" -SUMMARY:${PN} = "Rust crost canadian compiler" +FILES:${PN} += "${base_prefix}/environment-setup.d" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.62.0.bb deleted file mode 100644 index 766912c019..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.62.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require rust-cross-canadian.inc -require rust-source.inc -require rust-snapshot.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/rust:" - diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.65.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.65.0.bb new file mode 100644 index 0000000000..55865238ab --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/rust-cross-canadian_1.65.0.bb @@ -0,0 +1,2 @@ +inherit cross-canadian +require rust-cross-canadian.inc \ No newline at end of file diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross.inc b/meta-balena-rust/recipes-devtools/rust/rust-cross.inc deleted file mode 100644 index f6babfeeda..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-cross.inc +++ /dev/null @@ -1,66 +0,0 @@ -python do_rust_gen_targets () { - wd = d.getVar('WORKDIR') + '/targets/' - # It is important 'TARGET' is last here so that it overrides our less - # informed choices for BUILD & HOST if TARGET happens to be the same as - # either of them. - for thing in ['BUILD', 'HOST', 'TARGET']: - bb.debug(1, "rust_gen_target for " + thing) - features = "" - cpu = "generic" - arch = d.getVar('{}_ARCH'.format(thing)) - abi = "" - if thing is "TARGET": - abi = d.getVar('ABIEXTENSION') - # arm and armv7 have different targets in llvm - if arch == "arm" and target_is_armv7(d): - arch = 'armv7' - features = d.getVar('TARGET_LLVM_FEATURES') or "" - cpu = d.getVar('TARGET_LLVM_CPU') - rust_gen_target(d, thing, wd, features, cpu, arch, abi) -} - -# Otherwise we'll depend on what we provide -INHIBIT_DEFAULT_RUST_DEPS = "1" - -# Unlike native (which nicely maps it's DEPENDS) cross wipes them out completely. -# Generally, we (and cross in general) need the same things that native needs, -# so it might make sense to take it's mapping. For now, though, we just mention -# the bits we need explicitly. -DEPENDS += "rust-llvm-native" -DEPENDS += "rust-native" - -# In the cross compilation case, rustc doesn't seem to get the rpath quite -# right. It manages to include '../../lib/${TARGET_PREFIX}', but doesn't -# include the '../../lib' (ie: relative path from cross_bindir to normal -# libdir. As a result, we end up not being able to properly reference files in normal ${libdir}. -# Most of the time this happens to work fine as the systems libraries are -# subsituted, but sometimes a host system will lack a library, or the right -# version of a library (libtinfo was how I noticed this). -# -# FIXME: this should really be fixed in rust itself. -# FIXME: using hard-coded relative paths is wrong, we should ask bitbake for -# the relative path between 2 of it's vars. -HOST_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib" -BUILD_POST_LINK_ARGS:append = " -Wl,-rpath=../../lib" - -# We need the same thing for the calls to the compiler when building the runtime crap -TARGET_CC_ARCH:append = " --sysroot=${STAGING_DIR_TARGET}" - -do_rust_setup_snapshot () { -} - -do_configure () { -} - -do_compile () { -} - -do_install () { - mkdir -p ${D}${prefix}/${base_libdir_native}/rustlib - cp ${WORKDIR}/targets/${TARGET_SYS}.json ${D}${prefix}/${base_libdir_native}/rustlib -} - -rust_cross_sysroot_preprocess() { - sysroot_stage_dir ${D}${prefix}/${base_libdir_native}/rustlib ${SYSROOT_DESTDIR}${prefix}/${base_libdir_native}/rustlib -} -SYSROOT_PREPROCESS_FUNCS += "rust_cross_sysroot_preprocess" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-cross_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-cross_1.62.0.bb deleted file mode 100644 index 5358d98da8..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-cross_1.62.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require rust.inc -inherit cross -require rust-cross.inc -require rust-source.inc - -DEPENDS += "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc" -PROVIDES = "virtual/${TARGET_PREFIX}rust" -PN = "rust-cross-${TUNE_PKGARCH}-${TCLIBC}" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-crosssdk_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-crosssdk_1.62.0.bb deleted file mode 100644 index 6ea8cb09b2..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-crosssdk_1.62.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -require rust.inc -inherit crosssdk -require rust-cross.inc -require rust-source.inc - -DEPENDS += "virtual/${TARGET_PREFIX}gcc-crosssdk virtual/nativesdk-${TARGET_PREFIX}compilerlibs virtual/nativesdk-libc" -PROVIDES = "virtual/nativesdk-${TARGET_PREFIX}rust" -PN = "rust-crosssdk-${TUNE_PKGARCH}-${RUST_LIBC}" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-llvm.inc b/meta-balena-rust/recipes-devtools/rust/rust-llvm.inc index 68b495edcf..625eb57041 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-llvm.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust-llvm.inc @@ -4,8 +4,7 @@ HOMEPAGE = "http://www.rust-lang.org" SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ - file://0003-Support-Add-missing-cstdint-header-to-Signals.h.patch;striplevel=2 \ - file://0003-llvm-fix-include-benchmarks.patch;striplevel=2" + file://0003-llvm-fix-include-benchmarks.patch;striplevel=2" S = "${RUSTSRC}/src/llvm-project/llvm" @@ -48,6 +47,13 @@ EXTRA_OECMAKE:append:class-target = "\ -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ " +EXTRA_OECMAKE:append:class-nativesdk = "\ + -DCMAKE_CROSSCOMPILING:BOOL=ON \ + -DLLVM_BUILD_TOOLS=OFF \ + -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ + -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ +" + # The debug symbols are huge here (>2GB) so suppress them since they # provide almost no value. If you really need them then override this INHIBIT_PACKAGE_DEBUG_SPLIT = "1" @@ -69,4 +75,4 @@ FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a" FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin" FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-llvm/0003-Support-Add-missing-cstdint-header-to-Signals.h.patch b/meta-balena-rust/recipes-devtools/rust/rust-llvm/0003-Support-Add-missing-cstdint-header-to-Signals.h.patch deleted file mode 100644 index 6ed23aa9c5..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-llvm/0003-Support-Add-missing-cstdint-header-to-Signals.h.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a94bf34221fc4519bd8ec72560c2d363ffe2de4c Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Mon, 23 May 2022 08:03:23 +0100 -Subject: [PATCH] [Support] Add missing header to Signals.h - -Without the change llvm build fails on this week's gcc-13 snapshot as: - - [ 0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o - In file included from llvm/lib/Support/Signals.cpp:14: - llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void - 119 | void CleanupOnSignal(uintptr_t Context); - | ^~~~~~~~~~~~~~~ - -Upstream-Status: Backport [llvmorg-15.0.0 ff1681ddb303223973653f7f5f3f3435b48a1983] -Signed-off-by: Martin Jansa -Signed-off-by: Alexander Sverdlin ---- - llvm/include/llvm/Support/Signals.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/llvm/include/llvm/Support/Signals.h b/llvm/include/llvm/Support/Signals.h -index 44f5a750ff5c..937e0572d4a7 100644 ---- a/llvm/include/llvm/Support/Signals.h -+++ b/llvm/include/llvm/Support/Signals.h -@@ -14,6 +14,7 @@ - #ifndef LLVM_SUPPORT_SIGNALS_H - #define LLVM_SUPPORT_SIGNALS_H - -+#include - #include - - namespace llvm { diff --git a/meta-balena-rust/recipes-devtools/rust/rust-llvm_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-llvm_1.65.0.bb similarity index 83% rename from meta-balena-rust/recipes-devtools/rust/rust-llvm_1.62.0.bb rename to meta-balena-rust/recipes-devtools/rust/rust-llvm_1.65.0.bb index 5b94e22f7b..396f741953 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-llvm_1.62.0.bb +++ b/meta-balena-rust/recipes-devtools/rust/rust-llvm_1.65.0.bb @@ -1,6 +1,6 @@ # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use # -LLVM_RELEASE = "13.0.0" +LLVM_RELEASE = "14.0.5" require rust-source.inc require rust-llvm.inc diff --git a/meta-balena-rust/recipes-devtools/rust/rust-snapshot.inc b/meta-balena-rust/recipes-devtools/rust/rust-snapshot.inc index 3bd7b07cef..2f9cdb9566 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-snapshot.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust-snapshot.inc @@ -1,25 +1,25 @@ ## This is information on the rust-snapshot (binary) used to build our current release. -## snapshot info is taken from rust/src/stage0.txt +## snapshot info is taken from rust/src/stage0.json ## Rust is self-hosting and bootstraps itself with a pre-built previous version of itself. ## The exact (previous) version that has been used is specified in the source tarball. ## The version is replicated here. ## TODO: find a way to add additional SRC_URIs based on the contents of an ## earlier SRC_URI. -RS_VERSION = "1.61.0" -CARGO_VERSION = "1.61.0" +RS_VERSION = "1.64.0" +CARGO_VERSION = "1.64.0" # TODO: Add hashes for other architecture toolchains as well. Make a script? -SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "270b07aa5f2de52255a117e1e587138d77375ce0d09a1d7fead085f29b3977e9" -SRC_URI[rustc-snapshot-x86_64.sha256sum] = "21c4613f389ed130fbaaf88f1e984319f72b5fc10734569a5ba19e22ebb03abd" -SRC_URI[cargo-snapshot-x86_64.sha256sum] = "9461727d754f865ef2a87479d40bbe4c5176f80963b7c50b7797bc8940d7a0a0" +SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "6ace34bcbba9557aa2fc3a0515c3da4a83ca24d7d45506c5e1b32f589fa38a8b" +SRC_URI[rustc-snapshot-x86_64.sha256sum] = "1f5756a03119853b53358018c5b1592940a2354c3c9f84ee7faf684e3478f8f0" +SRC_URI[cargo-snapshot-x86_64.sha256sum] = "21434d83a30ad3fa4e4831487c5574a20b07dd57d213b26e1246290c57d4ec41" -SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "57d60a519dbce12146849f7e72d55f3cffe9cdcbff8d58e90bb62d3c016bb5c0" -SRC_URI[rustc-snapshot-aarch64.sha256sum] = "c996de6391e3ea94629fbc09b03bce186fcde345159f43ec95a82c500adb5e94" -SRC_URI[cargo-snapshot-aarch64.sha256sum] = "a055e6cfd9b5f8938780db6179d2ef92990c714ce64278337d7edf3d29c8ab62" +SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "40abc9ec4f86ff0e37ba176e4c68dfa708e9857bb0372169c865367593127566" +SRC_URI[rustc-snapshot-aarch64.sha256sum] = "8f10b379bcc8caaab983b7d04a3f105dae42f95718f231b46d7e68685d239191" +SRC_URI[cargo-snapshot-aarch64.sha256sum] = "103d69e4f2f49f5a6309d7d195747b31f94cf707f90fb49cf76039a5ce6295c7" -SRC_URI[rust-std-snapshot-powerpc64le.sha256sum] = "36c0ccff14c80419507561db050f9533f0abd43fc50f3ddb859c10df74b1c351" -SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "dc54893d747e4f3330515caa75e404f78c6c5475a1216d1428f5e7ce1c2e9602" -SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "09817011ff1ef4b7006387c7cabb6a059731792a9372533dec7d87e7f014444b" +SRC_URI[rust-std-snapshot-powerpc64le.sha256sum] = "ef697469b2a3ea8897f49b70e3be0c7aaca3f26fd3234812113e2e85cafac738" +SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "11630fc51fffe722e52f649357b5948c24b5305cfb61a8114527234e054451c4" +SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "ba7188b2c7890e61bf58d3aa9e94c323fec375f67cf03841bbcc0f6c800fe6ad" SRC_URI += " \ https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ diff --git a/meta-balena-rust/recipes-devtools/rust/rust-source.inc b/meta-balena-rust/recipes-devtools/rust/rust-source.inc index fda26534e8..0c85b4b480 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-source.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust-source.inc @@ -1,5 +1,11 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" -SRC_URI[rust.sha256sum] = "6c00ef115c894c2645e60b5049a4f5dacf1dc0c993f3074f7ae4fdf4c755dd5e" +SRC_URI[rust.sha256sum] = "2d6aa2ea3fedd55acbbd65f78349385f9daa9c14e25db7a8df5d015588eee1cf" + +SRC_URI:append:class-target:pn-rust = " \ + file://hardcodepaths.patch \ + file://crossbeam_atomic.patch \ + file://0001-Add-ENOTSUP-constant-for-riscv32-musl.patch" +SRC_URI:append:class-nativesdk:pn-nativesdk-rust = " file://hardcodepaths.patch" RUSTSRC = "${WORKDIR}/rustc-${PV}-src" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-target.inc b/meta-balena-rust/recipes-devtools/rust/rust-target.inc index 3f637b3ba5..dce2b47517 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust-target.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust-target.inc @@ -7,4 +7,4 @@ INHIBIT_DEFAULT_RUST_DEPS:class-native = "1" # We don't need to depend on gcc-native because yocto assumes it exists PROVIDES:class-native = "virtual/${TARGET_PREFIX}rust" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian.inc b/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian.inc deleted file mode 100644 index f0358551ae..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian.inc +++ /dev/null @@ -1,38 +0,0 @@ - -require rust-cross-canadian-common.inc - -RUST_TOOLS_CLIPPY_PN = "rust-tools-clippy-cross-canadian-${TRANSLATED_TARGET_ARCH}" -RUST_TOOLS_RUSTFMT_PN = "rust-tools-rustfmt-cross-canadian-${TRANSLATED_TARGET_ARCH}" -RUST_TOOLS_PKGS = "${RUST_TOOLS_CLIPPY_PN} ${RUST_TOOLS_RUSTFMT_PN}" -PN = "rust-tools-cross-canadian-${TRANSLATED_TARGET_ARCH}" - -PACKAGES = "${RUST_TOOLS_CLIPPY_PN} ${RUST_TOOLS_RUSTFMT_PN} ${PN}" -RDEPENDS:${PN} += "${RUST_TOOLS_PKGS}" - -do_compile () { - rust_runx build --stage 2 src/tools/clippy - rust_runx build --stage 2 src/tools/rustfmt -} - -do_install () { - SYS_BINDIR=$(dirname ${D}${bindir}) - - install -d "${SYS_BINDIR}" - cp build/${SNAPSHOT_BUILD_SYS}/stage2-tools-bin/* ${SYS_BINDIR} - for i in ${SYS_BINDIR}/*; do - chrpath -r "\$ORIGIN/../lib" ${i} - done - - chown -R root.root ${D} -} - -ALLOW_EMPTY:${PN} = "1" - -PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin" -FILES:${RUST_TOOLS_CLIPPY_PN} = "${PKG_SYS_BINDIR}/cargo-clippy ${PKG_SYS_BINDIR}/clippy-driver" -FILES:${RUST_TOOLS_RUSTFMT_PN} = "${PKG_SYS_BINDIR}/rustfmt" - -SUMMARY:${PN} = "Rust helper tools" -SUMMARY:${RUST_TOOLS_CLIPPY_PN} = "A collection of lints to catch common mistakes and improve your Rust code" -SUMMARY:${RUST_TOOLS_RUSTFMT_PN} = "A tool for formatting Rust code according to style guidelines" - diff --git a/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian_1.62.0.bb deleted file mode 100644 index 2d809d68f5..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust-tools-cross-canadian_1.62.0.bb +++ /dev/null @@ -1,6 +0,0 @@ -require rust-tools-cross-canadian.inc -require rust-source.inc -require rust-snapshot.inc - -FILESEXTRAPATHS:prepend := "${THISDIR}/rust:" - diff --git a/meta-balena-rust/recipes-devtools/rust/rust.inc b/meta-balena-rust/recipes-devtools/rust/rust.inc index 262e5b6d26..956301023a 100644 --- a/meta-balena-rust/recipes-devtools/rust/rust.inc +++ b/meta-balena-rust/recipes-devtools/rust/rust.inc @@ -9,17 +9,14 @@ inherit cargo_common DEPENDS += "file-native python3-native" DEPENDS:append:class-native = " rust-llvm-native" +DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm" S = "${RUSTSRC}" -# We generate local targets, and need to be able to locate them -export RUST_TARGET_PATH="${WORKDIR}/targets/" - export FORCE_CRATE_HASH="${BB_TASKHASH}" RUST_ALTERNATE_EXE_PATH ?= "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" -export YOCTO_ALTERNATE_EXE_PATH = "${RUST_ALTERNATE_EXE_PATH}" -export YOCTO_ALTERNATE_MULTILIB_NAME = "/${BASELIB}" +RUST_ALTERNATE_EXE_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config" # We don't want to use bitbakes vendoring because the rust sources do their # own vendoring. @@ -27,19 +24,15 @@ CARGO_DISABLE_BITBAKE_VENDORING = "1" # We can't use RUST_BUILD_SYS here because that may be "musl" if # TCLIBC="musl". Snapshots are always -unknown-linux-gnu -SNAPSHOT_BUILD_SYS = "${RUST_BUILD_ARCH}-unknown-linux-gnu" setup_cargo_environment () { # The first step is to build bootstrap and some early stage tools, # these are build for the same target as the snapshot, e.g. # x86_64-unknown-linux-gnu. # Later stages are build for the native target (i.e. target.x86_64-linux) cargo_common_do_configure - - printf '[target.%s]\n' "${SNAPSHOT_BUILD_SYS}" >> ${CARGO_HOME}/config - printf "linker = '%s'\n" "${RUST_BUILD_CCLD}" >> ${CARGO_HOME}/config } -include rust-common.inc +inherit rust-target-config do_rust_setup_snapshot () { for installer in "${WORKDIR}/rust-snapshot-components/"*"/install.sh"; do @@ -79,28 +72,46 @@ python do_configure() { config = configparser.RawConfigParser() # [target.ARCH-poky-linux] - target_section = "target.{}".format(d.getVar('TARGET_SYS', True)) - config.add_section(target_section) + host_section = "target.{}".format(d.getVar('RUST_HOST_SYS', True)) + config.add_section(host_section) - llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") - config.set(target_section, "llvm-config", e(llvm_config)) + llvm_config_target = d.expand("${RUST_ALTERNATE_EXE_PATH}") + llvm_config_build = d.expand("${RUST_ALTERNATE_EXE_PATH_NATIVE}") + config.set(host_section, "llvm-config", e(llvm_config_target)) - config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) - config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) + config.set(host_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) + config.set(host_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) + config.set(host_section, "linker", e(d.expand("${RUST_TARGET_CCLD}"))) + if "musl" in host_section: + config.set(host_section, "musl-root", e(d.expand("${STAGING_DIR_HOST}${exec_prefix}"))) # If we don't do this rust-native will compile it's own llvm for BUILD. # [target.${BUILD_ARCH}-unknown-linux-gnu] - target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) - config.add_section(target_section) + build_section = "target.{}".format(d.getVar('RUST_BUILD_SYS', True)) + if build_section != host_section: + config.add_section(build_section) + + config.set(build_section, "llvm-config", e(llvm_config_build)) + + config.set(build_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) + config.set(build_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) + config.set(build_section, "linker", e(d.expand("${RUST_BUILD_CCLD}"))) - config.set(target_section, "llvm-config", e(llvm_config)) + target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) + if target_section != host_section and target_section != build_section: + config.add_section(target_section) - config.set(target_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) - config.set(target_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) + config.set(target_section, "llvm-config", e(llvm_config_target)) + + config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) + config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) + config.set(target_section, "linker", e(d.expand("${RUST_TARGET_CCLD}"))) # [llvm] config.add_section("llvm") config.set("llvm", "static-libstdcpp", e(False)) + if "llvm" in (d.getVar('TC_CXX_RUNTIME') or ""): + config.set("llvm", "use-libcxx", e(True)) # [rust] config.add_section("rust") @@ -110,6 +121,10 @@ python do_configure() { # Whether or not to optimize the compiler and standard library config.set("rust", "optimize", e(True)) + # Emits extraneous output from tests to ensure that failures of the test + # harness are debuggable just from logfiles + config.set("rust", "verbose-tests", e(True)) + # [build] config.add_section("build") config.set("build", "submodules", e(False)) @@ -128,16 +143,16 @@ python do_configure() { config.set("build", "vendor", e(True)) if not "targets" in locals(): - targets = [d.getVar("TARGET_SYS", True)] + targets = [d.getVar("RUST_TARGET_SYS", True)] config.set("build", "target", e(targets)) if not "hosts" in locals(): - hosts = [d.getVar("HOST_SYS", True)] + hosts = [d.getVar("RUST_HOST_SYS", True)] config.set("build", "host", e(hosts)) # We can't use BUILD_SYS since that is something the rust snapshot knows # nothing about when trying to build some stage0 tools (like fabricate) - config.set("build", "build", e(d.getVar("SNAPSHOT_BUILD_SYS", True))) + config.set("build", "build", e(d.getVar("RUST_BUILD_SYS", True))) # [install] config.add_section("install") @@ -157,10 +172,6 @@ python do_configure() { bb.build.exec_func("setup_cargo_environment", d) } -def get_parallel_make_argument(d): - if "parallel_make_argument" in dir(oe.utils): - return oe.utils.parallel_make_argument(d, '-j %d') - return d.getVar('PARALLEL_MAKE') rust_runx () { echo "COMPILE ${PN}" "$@" @@ -173,9 +184,19 @@ rust_runx () { unset CXXFLAGS unset CPPFLAGS + export RUSTFLAGS="${RUST_DEBUG_REMAP}" + + # Copy the natively built llvm-config into the target so we can run it. Horrible, + # but works! + if [ ${RUST_ALTERNATE_EXE_PATH_NATIVE} != ${RUST_ALTERNATE_EXE_PATH} ]; then + mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}` + cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH} + chrpath -d ${RUST_ALTERNATE_EXE_PATH} + fi + oe_cargo_fix_env - python3 src/bootstrap/bootstrap.py ${@get_parallel_make_argument(d)} "$@" --verbose + python3 src/bootstrap/bootstrap.py ${@oe.utils.parallel_make_argument(d, '-j %d')} "$@" --verbose } rust_runx[vardepsexclude] += "PARALLEL_MAKE" @@ -185,26 +206,14 @@ do_compile () { rust_do_install () { mkdir -p ${D}${bindir} - cp build/${HOST_SYS}/stage2/bin/* ${D}${bindir} + cp build/${RUST_HOST_SYS}/stage2/bin/* ${D}${bindir} mkdir -p ${D}${libdir}/rustlib - cp -pRd build/${HOST_SYS}/stage2/lib/* ${D}${libdir} + cp -pRd build/${RUST_HOST_SYS}/stage2/lib/* ${D}${libdir} # Remove absolute symlink so bitbake doesn't complain rm -f ${D}${libdir}/rustlib/src/rust } -rust_install_targets() { - # Install our custom target.json files - local td="${D}${libdir}/rustlib/" - install -d "$td" - for tgt in "${WORKDIR}/targets/"* ; do - install -m 0644 "$tgt" "$td" - done -} - - do_install () { rust_do_install - rust_install_targets } -# ex: sts=4 et sw=4 ts=8 diff --git a/meta-balena-rust/recipes-devtools/rust/rust/0001-Add-ENOTSUP-constant-for-riscv32-musl.patch b/meta-balena-rust/recipes-devtools/rust/rust/0001-Add-ENOTSUP-constant-for-riscv32-musl.patch new file mode 100644 index 0000000000..ecfe0fe9b0 --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/rust/0001-Add-ENOTSUP-constant-for-riscv32-musl.patch @@ -0,0 +1,32 @@ +From e9fb036eeffaaa5cb7b1e6fc1dabb92ed6263f0f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 19 Aug 2022 10:26:43 -0700 +Subject: [PATCH] Add ENOTSUP constant for riscv32/musl + +Upstream-Status: Backport [https://github.com/rust-lang/libc/commit/e9fb036eeffaaa5cb7b1e6fc1dabb92ed6263f0f] +Signed-off-by: Khem Raj +--- + vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs | 1 + + 1 file changed, 1 insertion(+) + +Index: rustc-1.65.0-src/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +=================================================================== +--- rustc-1.65.0-src.orig/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs ++++ rustc-1.65.0-src/vendor/libc/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +@@ -271,6 +271,7 @@ pub const ENOPROTOOPT: ::c_int = 92; + pub const EPROTONOSUPPORT: ::c_int = 93; + pub const ESOCKTNOSUPPORT: ::c_int = 94; + pub const EOPNOTSUPP: ::c_int = 95; ++pub const ENOTSUP: ::c_int = EOPNOTSUPP; + pub const EPFNOSUPPORT: ::c_int = 96; + pub const EAFNOSUPPORT: ::c_int = 97; + pub const EADDRINUSE: ::c_int = 98; +Index: rustc-1.65.0-src/vendor/libc/.cargo-checksum.json +=================================================================== +--- rustc-1.65.0-src.orig/vendor/libc/.cargo-checksum.json ++++ rustc-1.65.0-src/vendor/libc/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"CONTRIBUTING.md":"f480d10d2a506eecd23ae2e2dedb7a28b8bf6dae5f46f438dbb61be2003426fb","Cargo.toml":"1549dc2db0ecd74316f52b2d14b15144ae970a848bf3d54c048844ed7a35df2a","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"776affa26b66843a2b4f1a1c8f88d92f6461b74568911450fea717e9db6f877b","build.rs":"1d0cbe878e98e970c3318cac0772215a9f44bd286d859d665da27872ba9d8818","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"7f986e5f5e68d25ef04d386fd2f640e8be8f15427a8d4a458ea01d26b8dca0ca","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"94cbaad15021e287a1b9546a697b04c1e560f1204b52204ffaaea5975c5d03b9","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"ce753ef318b300bbd441feabdd77d00322dfb6ce9eee8c78a38afe02b57aa4c0","src/macros.rs":"b457eb028b8e8ab3c24bb7292b874ad4e491edbb83594f6a3da024df5348c088","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/solid/aarch64.rs":"a726e47f324adf73a4a0b67a2c183408d0cad105ae66acf36db37a42ab7f8707","src/solid/arm.rs":"e39a4f74ebbef3b97b8c95758ad741123d84ed3eb48d9cf4f1f4872097fc27fe","src/solid/mod.rs":"5f4151dca5132e4b4e4c23ab9737e12856dddbdc0ca3f7dbc004328ef3c8acde","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"2546ad3eb6aecb95f916648bc63264117c92b4b4859532b34cb011e4c75a5a72","src/unix/bsd/apple/b64/aarch64/align.rs":"e8eb38d064b5fefec6f37d42873820a0483e7c758ed336cc59a7155455ca89c9","src/unix/bsd/apple/b64/aarch64/mod.rs":"a3f0dfff62d0f7f4f1b5f9a4e2b662acf233a46badbc5419d3cc2d735629a710","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"8c87c5855038aae5d433c8f5eb3b29b0a175879a0245342b3bfd83bdf4cfd936","src/unix/bsd/apple/mod.rs":"56dc7604509f49b274770cade97a1874c8955c3b0a445fb857707ae0ca6df41b","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"d0e8246063cae113806524a63a47c6c0628cc54a3ef03e938e89964f8b4f08b4","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"2a215bd6136b8617aacedf9be738ccee94da9d29b418e9a78101d6291c182352","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"a6eee615e6ca5a6e04b526bb6b22d13b9356e87e51825cda33476c37a46cb0ef","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"755dafaf3f0945e798c34ea94c48e8552804ce60e2a15a4f0649f9d1aceaf422","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"cc65a73b0fa95a77044a4b3ee76d6eceb9773b55aea7d73bdf070e6f66e9ea38","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd14/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs":"0ed92eb93e78299cd7de0ae9daebb04a53b3c2d5e6a078e1fcd977f2a86bffc3","src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/mod.rs":"ec229cc7af2511cb510c078e87e90ee2625090bfe94f40eb35f73d79143533aa","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/riscv64.rs":"8f591bd273464d684c4f64365f8ed56a8138175daa70d96008541393057a0dae","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"51e4dd0c8ae247bb652feda5adad9333ea3bb30c750c3a3935e0b0e47d7803eb","src/unix/bsd/freebsdlike/mod.rs":"1e35b4773384ea143810cdce4b96f47108b37446430da30c96a0d1651656d73d","src/unix/bsd/mod.rs":"817ca5719c36a74c84e52c6a56a5998b60d7f02351a405e034f08ebab079b63a","src/unix/bsd/netbsdlike/mod.rs":"b07a0e81085bd811fce7270f3b90fbfea29faf9593d9e39d9d2ebbb9a78bf25f","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"65dcb58d11e8d8028401a9d07ca3eb4cb4f053e04249cc877353449d84ccc4cb","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"8f9613e50c2771b33d7cf817a735d536b389ec57f861b9486d870373c768276e","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"dd91931d373b7ecaf6e2de25adadee10d16fa9b12c2cbacdff3eb291e1ba36af","src/unix/bsd/netbsdlike/openbsd/arm.rs":"01580d261bc6447bb327a0d982181b7bdabfa066cee65a30373d3ced729ad307","src/unix/bsd/netbsdlike/openbsd/mips64.rs":"8532a189ae10c7d668d9d4065da8b05d124e09bd39442c9f74a7f231c43eca48","src/unix/bsd/netbsdlike/openbsd/mod.rs":"228505fa48292e74b06acbed96196801595a4b822da2126a6d6c7fa773cff8bc","src/unix/bsd/netbsdlike/openbsd/powerpc.rs":"01580d261bc6447bb327a0d982181b7bdabfa066cee65a30373d3ced729ad307","src/unix/bsd/netbsdlike/openbsd/powerpc64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/riscv64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"d31db31630289c85af3339dbe357998a21ca584cbae31607448fe2cf7675a4e1","src/unix/haiku/b32.rs":"a2efdbf7158a6da341e1db9176b0ab193ba88b449616239ed95dced11f54d87b","src/unix/haiku/b64.rs":"ff8115367d3d7d354f792d6176dfaaa26353f57056197b563bf4681f91ff7985","src/unix/haiku/mod.rs":"df7b6b7d8dd3441665bfe87f2abc942bddc65b8b10dfa9c83dd0422f68107891","src/unix/haiku/native.rs":"dbfcbf4954a79d1df2ff58e0590bbcb8c57dfc7a32392aa73ee4726b66bd6cc8","src/unix/haiku/x86_64.rs":"3ec3aeeb7ed208b8916f3e32d42bfd085ff5e16936a1a35d9a52789f043b7237","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"7c173e0375119bf06a3081652faede95e5bcd6858e7576b7533d037978737c8f","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/android/b64/aarch64/mod.rs":"ef230d49fd0d182adf2dae6f8e10babf18d72259d65980bf1c4c2dc8a4f84501","src/unix/linux_like/android/b64/mod.rs":"71e4fcbe952bfa4a5f9022f3972e906917b38f729b9d8ef57cd5d179104894ac","src/unix/linux_like/android/b64/riscv64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/android/b64/riscv64/mod.rs":"80e9f93fed838a48b4e2e8d77b95c72cfd7c0647bcce63851555c5ad16dad143","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e10d19bea39f719723ab6666a5ddbd378b6958769441c5904629e1df173b1dc2","src/unix/linux_like/android/mod.rs":"962741303dc24a5b9653f2e9b0b4ad9eb42fc54daa0a70ca70a7ce175e75094b","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"c69c90606d4362f8de89b8816df0ded724ed64b53bf55d15681fde171b7bb361","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"d6c259942c8e843373accd180fc8f4f45f03544dfd21b93a8d02641ead3ef63e","src/unix/linux_like/linux/arch/generic/mod.rs":"e20013ed91edcfb7f84f3f9f5a9ef827fd5c406e24b65989d8438da332236ef6","src/unix/linux_like/linux/arch/mips/mod.rs":"2d166054a586bb4bf6e4a4ba35f7574907b217225eff8f1a43adc4277e142460","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"3f6da7b0fa7b394c7d4eea2bb3caa7a7729ab0d6c1491fef02206a912c41b815","src/unix/linux_like/linux/arch/sparc/mod.rs":"91593ec0440f1dd8f8e612028f432c44c14089286e2aca50e10511ab942db8c3","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"6ec0eb3ee93f7ae99fd714b4deabfb5e97fbcefd8c26f5a45fb8e7150899cdeb","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"92ea7edc0e24f79dfbf5e3efc2d7509bed230562036e6aa85ef4f2c8088ecc8f","src/unix/linux_like/linux/gnu/b32/m68k/align.rs":"8faa92f77a9232c035418d45331774e64a9a841d99c91791570a203bf2b45bcb","src/unix/linux_like/linux/gnu/b32/m68k/mod.rs":"a2a0a9400dae44086ebf579e0448e0676d4a3214d1ae7d13a024857251e23b6b","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"0d7849eb2435ec1f49b6774872a0518f0129c50f37c9d38b37b1535722777a22","src/unix/linux_like/linux/gnu/b32/mod.rs":"8da281da578cdee972e952b118b903b370320897a7e335342a15e1359864bef2","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"049d6211ba4a9304bd4497c160bc21ae847c24e0528dd9d76263f16192e6aff5","src/unix/linux_like/linux/gnu/b32/riscv32/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"a4256148cec0bb672c8dfa605866930d9761af9655721de72ae41eeeb8fdbf6d","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"525618615aa0cb80c6c90860bf579dfed8db307fffd56b97dc235fb945419434","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"78b4038852986436888c63be9258037cf642124daee9d5fa5cef2bf8e412bf54","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"5b32fcc0d60356c92ded4e0ba9bb32f0140a8bd75ba800486bf38294f61dbdbb","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"c72a08011c32f82919e930e0d89044d8feb65fd41bf80647436756c290344eb8","src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs":"387808d5398b24339e7e2bf7591150735011befc5b421fa713d7017c04a7b1da","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"17aad16329431d83e1909e3a08022f6e28f4bcba7dec4a967fe1a321a6a43b99","src/unix/linux_like/linux/gnu/b64/mod.rs":"3c6555f30a7a8852757b31a542ea73fb6a16a6e27e838397e819278ad56e57a4","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"97e0ecf11ecce793a13fec39654fb513c5479edf7faa7a276fa714b61993d0fc","src/unix/linux_like/linux/gnu/b64/riscv64/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"b3fe290afe63d2d6e315d0cf1f775464e9c1f2a1906d243c1af74a137a4031cb","src/unix/linux_like/linux/gnu/b64/s390x.rs":"254f00266ecf9644a4b469457cb37c4dd6c055820926c1de0fb9035b6048e75c","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"87dd7f3d5bf3c09f4064ec738e306cc9cc41ad49b4a5df62c5983301c3bbf99a","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"62e822478356db4a73b6bbd1b36d825b893939ab4b308ec11b0578bcc4b49769","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"f0db9914315d5a3d51bf5ec04a0ae6584f2e1688b9258ce132b617e67d9bd7a9","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"b88ef8a1eaa9ed73bf2acb8192afb73af987a92abb94140c6376fc83f2fa5553","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"79305936a60d342efdc10519ba89507d6b48e65f13f33090d3b04dc9655ceed0","src/unix/linux_like/linux/gnu/mod.rs":"fd62b48974dd2f97f6e8fa2a30624e8d69fdedc5d3b0ab2f3f09516e88a8769a","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"af94b1a6d844bed87bb4c93de0a12f160ca1f918f5234d7fe17511d4e424dedc","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"e5faee8efda8a225ea0b17d4d6f9e893a678e73773fa62c549a8e19c106b9f04","src/unix/linux_like/linux/musl/b32/hexagon.rs":"226a8b64ce9c75abbbee6d2dceb0b44f7b6c750c4102ebd4d015194afee6666e","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"df8f8b529a6cc6b8a7326639e83303cf1320c6c50d76517c17d42bcf45f6240a","src/unix/linux_like/linux/musl/b32/mod.rs":"7b3d9dfd8605b00bb9b5fa1439abe5ebf60199c7fa033eee555e8d181e93ffa2","src/unix/linux_like/linux/musl/b32/powerpc.rs":"c957d99a4d4371d2411a5769be8cf344516bf9ddc1011f977501a4eb57cb4e82","src/unix/linux_like/linux/musl/b32/riscv32/align.rs":"efd2accf33b87de7c7547903359a5da896edc33cd6c719552c7474b60d4a5d48","src/unix/linux_like/linux/musl/b32/riscv32/mod.rs":"698f77bfcc838f82126c54f7387881fe3e89490117e5a4f333d1b4433823a672","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"199a91e90b454f9dc32770d5204cc4f6e5b8f144e0e34a1c91829949d6e804b3","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"6ba32725d24d7d8e6aa111f3b57aafa318f83b606abe96561329151829821133","src/unix/linux_like/linux/musl/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"9c4878df0fea0e0affd85346e0bc191abdc5e41e74dc9199b5644ec33d29c300","src/unix/linux_like/linux/musl/b64/mips64.rs":"1fa4974fe412b22c3555d3e240dbf00cc04a5287c751035ddf08a0470d4a7c9a","src/unix/linux_like/linux/musl/b64/mod.rs":"8c10627bd582cb272514e7350ae4743a65d489356eae039d2e7e55cd533fbbc8","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"36694cbdcdc33879e00502d55cb95eaa0096d213538993dd39c3da800cdd06d1","src/unix/linux_like/linux/musl/b64/riscv64/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/musl/b64/riscv64/mod.rs":"36621aca8ecf714f8dd42662dc2997833d95b9f129ef8c220503362e21efd695","src/unix/linux_like/linux/musl/b64/s390x.rs":"c7ebabc4e1bdbbd97e5065faa3a57f41f473570920582d979f9e9d4f77448546","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"77309276ad7a42cbe59ca381f23590b7a143aded05555b34a5b307b808cbca6e","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"238789097a26abc8b7cd578ed1a8e6cb8672083054303902781983902cd66854","src/unix/linux_like/linux/musl/mod.rs":"c3365480375bc258ffe267e7a299d7b3bb542a908bef8881f503ddc25ba8fc1f","src/unix/linux_like/linux/no_align.rs":"da2a8721becaaaa528781f97f5d9aae6a982ae5d4f5f6d2ffc0150bed72319b3","src/unix/linux_like/linux/non_exhaustive.rs":"181a05bf94fdb911db83ce793b993bd6548a4115b306a7ef3c10f745a8fea3e9","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"a056bbf718ddd775519058706bdb4909b56e6256985869e3c3132aa8ec5faca0","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"b84def53a49587e87f884c2bc28b21b290463b00b52e1d0309f2ba233a5b4a99","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"256a428290a560163ef7dc7d18b27bd3c6ce9748a0f28d5dc7f82203ee228220","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"367ec5483ad317e6ccba1ac0888da6cf088a8d32689214cc8d16129aa692260c","src/unix/linux_like/linux/uclibc/mod.rs":"1c3d25cddcfefa2bd17bdc81550826be31a08eef235e13f825f169a5029c8bca","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"024eba5753e852dbdd212427351affe7e83f9916c1864bce414d7aa2618f192e","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"bf6985e901041a61e90ccee1296b35a4c62ef90aa528d31989e1d647f072e79a","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"09fa012e027bfcdaabee221c1b676804a9c7e0e04a4b64fdd98a50c9b5c2f674","src/unix/mod.rs":"fbd5520d160a32a127608cd408905febe387773bbf05bfe199ef385fb5562e9c","src/unix/newlib/aarch64/mod.rs":"bac93836a9a57b2c710f32f852e92a4d11ad6759ab0fb6ad33e71d60e53278af","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"cbba6b3e957eceb496806e60de8725a23ff3fa0015983b4b4fa27b233732b526","src/unix/newlib/espidf/mod.rs":"816f235f4aa4baabba7f2606b31d0fdb03988c52194c966728de8690bf17299d","src/unix/newlib/generic.rs":"eab066d9f0a0f3eb53cc1073d01496bba0110989e1f6a59838afd19f870cd599","src/unix/newlib/horizon/mod.rs":"7cc5cc120437421db139bfa6a90b18168cd3070bdd0f5be96d40fe4c996f3ca1","src/unix/newlib/mod.rs":"54633d606e4e0413274af0b5beb5e697e6c061b63feaa0704b026554cc9d9c3e","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"0202ffd57caf75b6afa2c9717750ffb96e375ac33df0ae9609a3f831be393b67","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"033768cb273daf2c8090d97252c2de9dba6809e6a5d2457f5727d724807695db","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"29387916ee7dc58f07478746024003215e631cd30953e8fa2a5c415f81839007","src/unix/solarish/mod.rs":"8914a68865af026c1f4fb1d5f02ba0053362ef34b813ad60cc4aa3a88aa4999e","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/unix/solarish/x86.rs":"e86e806df0caed72765040eaa2f3c883198d1aa91508540adf9b7008c77f522e","src/unix/solarish/x86_64.rs":"9074e813949f3c613afeac39d4118fb942c0b3c476232fc536489357cff5790f","src/unix/solarish/x86_common.rs":"ac869d9c3c95645c22460468391eb1982023c3a8e02b9e06a72e3aef3d5f1eac","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"aea3da66f2140f2a82dfc9c58f6e6531d2dd9c15ea696e0f95a0d4a2a187b5b6","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"4fae202af0327d768ed9e1b586b75816cce14fe2dc16947d2f3d381f209a54c1","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"090dd8fcd951d18f1905bca96188783c2e3f1433484926ecdcda144237ecec0f","src/windows/msvc/mod.rs":"c068271e00fca6b62bc4bf44bcf142cfc38caeded9b6c4e01d1ceef3ccf986f4","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"} +\ No newline at end of file ++{"files":{"CONTRIBUTING.md":"f480d10d2a506eecd23ae2e2dedb7a28b8bf6dae5f46f438dbb61be2003426fb","Cargo.toml":"1549dc2db0ecd74316f52b2d14b15144ae970a848bf3d54c048844ed7a35df2a","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"a8d47ff51ca256f56a8932dba07660672dbfe3004257ca8de708aac1415937a1","README.md":"776affa26b66843a2b4f1a1c8f88d92f6461b74568911450fea717e9db6f877b","build.rs":"1d0cbe878e98e970c3318cac0772215a9f44bd286d859d665da27872ba9d8818","rustfmt.toml":"eaa2ea84fc1ba0359b77680804903e07bb38d257ab11986b95b158e460f787b2","src/fixed_width_ints.rs":"7f986e5f5e68d25ef04d386fd2f640e8be8f15427a8d4a458ea01d26b8dca0ca","src/fuchsia/aarch64.rs":"378776a9e40766154a54c94c2a7b4675b5c302a38e6e42da99e67bfbaee60e56","src/fuchsia/align.rs":"ae1cf8f011a99737eabeb14ffff768e60f13b13363d7646744dbb0f443dab3d6","src/fuchsia/mod.rs":"94cbaad15021e287a1b9546a697b04c1e560f1204b52204ffaaea5975c5d03b9","src/fuchsia/no_align.rs":"303f3f1b255e0088b5715094353cf00476131d8e94e6aebb3f469557771c8b8a","src/fuchsia/x86_64.rs":"93a3632b5cf67d2a6bcb7dc0a558605252d5fe689e0f38d8aa2ec5852255ac87","src/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/hermit/mod.rs":"d3bfce41e4463d4be8020a2d063c9bfa8b665f45f1cc6cbf3163f5d01e7cb21f","src/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/lib.rs":"ce753ef318b300bbd441feabdd77d00322dfb6ce9eee8c78a38afe02b57aa4c0","src/macros.rs":"b457eb028b8e8ab3c24bb7292b874ad4e491edbb83594f6a3da024df5348c088","src/psp.rs":"dd31aabd46171d474ec5828372e28588935120e7355c90c105360d8fa9264c1c","src/sgx.rs":"16a95cdefc81c5ee00d8353a60db363c4cc3e0f75abcd5d0144723f2a306ed1b","src/solid/aarch64.rs":"a726e47f324adf73a4a0b67a2c183408d0cad105ae66acf36db37a42ab7f8707","src/solid/arm.rs":"e39a4f74ebbef3b97b8c95758ad741123d84ed3eb48d9cf4f1f4872097fc27fe","src/solid/mod.rs":"5f4151dca5132e4b4e4c23ab9737e12856dddbdc0ca3f7dbc004328ef3c8acde","src/switch.rs":"9da3dd39b3de45a7928789926e8572d00e1e11a39e6f7289a1349aadce90edba","src/unix/align.rs":"2cdc7c826ef7ae61f5171c5ae8c445a743d86f1a7f2d9d7e4ceeec56d6874f65","src/unix/bsd/apple/b32/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b32/mod.rs":"2546ad3eb6aecb95f916648bc63264117c92b4b4859532b34cb011e4c75a5a72","src/unix/bsd/apple/b64/aarch64/align.rs":"e8eb38d064b5fefec6f37d42873820a0483e7c758ed336cc59a7155455ca89c9","src/unix/bsd/apple/b64/aarch64/mod.rs":"a3f0dfff62d0f7f4f1b5f9a4e2b662acf233a46badbc5419d3cc2d735629a710","src/unix/bsd/apple/b64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/mod.rs":"f5e278a1af7fb358891d1c9be4eb7e815aaca0c5cb738d0c3604ba2208a856f7","src/unix/bsd/apple/b64/x86_64/align.rs":"ec833a747866fe19ca2d9b4d3c9ff0385faba5edf4bd0d15fa68884c40b0e26c","src/unix/bsd/apple/b64/x86_64/mod.rs":"8c87c5855038aae5d433c8f5eb3b29b0a175879a0245342b3bfd83bdf4cfd936","src/unix/bsd/apple/mod.rs":"56dc7604509f49b274770cade97a1874c8955c3b0a445fb857707ae0ca6df41b","src/unix/bsd/freebsdlike/dragonfly/errno.rs":"8295b8bb0dfd38d2cdb4d9192cdeeb534cc6c3b208170e64615fa3e0edb3e578","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"d0e8246063cae113806524a63a47c6c0628cc54a3ef03e938e89964f8b4f08b4","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"2a215bd6136b8617aacedf9be738ccee94da9d29b418e9a78101d6291c182352","src/unix/bsd/freebsdlike/freebsd/arm.rs":"59d6a670eea562fb87686e243e0a84603d29a2028a3d4b3f99ccc01bd04d2f47","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"9808d152c1196aa647f1b0f0cf84dac8c930da7d7f897a44975545e3d9d17681","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"a6eee615e6ca5a6e04b526bb6b22d13b9356e87e51825cda33476c37a46cb0ef","src/unix/bsd/freebsdlike/freebsd/freebsd12/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"755dafaf3f0945e798c34ea94c48e8552804ce60e2a15a4f0649f9d1aceaf422","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd13/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"cc65a73b0fa95a77044a4b3ee76d6eceb9773b55aea7d73bdf070e6f66e9ea38","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/freebsd14/b64.rs":"61cbe45f8499bedb168106b686d4f8239472f25c7553b069eec2afe197ff2df6","src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs":"0ed92eb93e78299cd7de0ae9daebb04a53b3c2d5e6a078e1fcd977f2a86bffc3","src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs":"2df36a7f122f6d6e5753cfb4d22e915cc80f6bc91c0161b3daae55a481bfd052","src/unix/bsd/freebsdlike/freebsd/mod.rs":"ec229cc7af2511cb510c078e87e90ee2625090bfe94f40eb35f73d79143533aa","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"9ca3f82f88974e6db5569f2d76a5a3749b248a31747a6c0da5820492bdfeca42","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"2dae3ecc87eac3b11657aa98915def55fc4b5c0de11fe26aae23329a54628a9a","src/unix/bsd/freebsdlike/freebsd/riscv64.rs":"8f591bd273464d684c4f64365f8ed56a8138175daa70d96008541393057a0dae","src/unix/bsd/freebsdlike/freebsd/x86.rs":"c5005e3249eb7c93cfbac72a9e9272320d80ce7983da990ceb05a447f59a02c5","src/unix/bsd/freebsdlike/freebsd/x86_64/align.rs":"0e1f69a88fca1c32874b1daf5db3d446fefbe518dca497f096cc9168c39dde70","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"51e4dd0c8ae247bb652feda5adad9333ea3bb30c750c3a3935e0b0e47d7803eb","src/unix/bsd/freebsdlike/mod.rs":"1e35b4773384ea143810cdce4b96f47108b37446430da30c96a0d1651656d73d","src/unix/bsd/mod.rs":"817ca5719c36a74c84e52c6a56a5998b60d7f02351a405e034f08ebab079b63a","src/unix/bsd/netbsdlike/mod.rs":"b07a0e81085bd811fce7270f3b90fbfea29faf9593d9e39d9d2ebbb9a78bf25f","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"65dcb58d11e8d8028401a9d07ca3eb4cb4f053e04249cc877353449d84ccc4cb","src/unix/bsd/netbsdlike/netbsd/arm.rs":"58cdbb70b0d6f536551f0f3bb3725d2d75c4690db12c26c034e7d6ec4a924452","src/unix/bsd/netbsdlike/netbsd/mod.rs":"8f9613e50c2771b33d7cf817a735d536b389ec57f861b9486d870373c768276e","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"ee7ff5d89d0ed22f531237b5059aa669df93a3b5c489fa641465ace8d405bf41","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"9489f4b3e4566f43bb12dfb92238960613dac7f6a45cc13068a8d152b902d7d9","src/unix/bsd/netbsdlike/netbsd/x86.rs":"20692320e36bfe028d1a34d16fe12ca77aa909cb02bda167376f98f1a09aefe7","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"1afe5ef46b14397cdd68664b5b232e4f5b035b6db1d4cf411c899d51ebca9f30","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"dd91931d373b7ecaf6e2de25adadee10d16fa9b12c2cbacdff3eb291e1ba36af","src/unix/bsd/netbsdlike/openbsd/arm.rs":"01580d261bc6447bb327a0d982181b7bdabfa066cee65a30373d3ced729ad307","src/unix/bsd/netbsdlike/openbsd/mips64.rs":"8532a189ae10c7d668d9d4065da8b05d124e09bd39442c9f74a7f231c43eca48","src/unix/bsd/netbsdlike/openbsd/mod.rs":"228505fa48292e74b06acbed96196801595a4b822da2126a6d6c7fa773cff8bc","src/unix/bsd/netbsdlike/openbsd/powerpc.rs":"01580d261bc6447bb327a0d982181b7bdabfa066cee65a30373d3ced729ad307","src/unix/bsd/netbsdlike/openbsd/powerpc64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/riscv64.rs":"1dd5449dd1fd3d51e30ffdeeaece91d0aaf05c710e0ac699fecc5461cfa2c28e","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"d04fd287afbaa2c5df9d48c94e8374a532a3ba491b424ddf018270c7312f4085","src/unix/bsd/netbsdlike/openbsd/x86.rs":"6f7f5c4fde2a2259eb547890cbd86570cea04ef85347d7569e94e679448bec87","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"d31db31630289c85af3339dbe357998a21ca584cbae31607448fe2cf7675a4e1","src/unix/haiku/b32.rs":"a2efdbf7158a6da341e1db9176b0ab193ba88b449616239ed95dced11f54d87b","src/unix/haiku/b64.rs":"ff8115367d3d7d354f792d6176dfaaa26353f57056197b563bf4681f91ff7985","src/unix/haiku/mod.rs":"df7b6b7d8dd3441665bfe87f2abc942bddc65b8b10dfa9c83dd0422f68107891","src/unix/haiku/native.rs":"dbfcbf4954a79d1df2ff58e0590bbcb8c57dfc7a32392aa73ee4726b66bd6cc8","src/unix/haiku/x86_64.rs":"3ec3aeeb7ed208b8916f3e32d42bfd085ff5e16936a1a35d9a52789f043b7237","src/unix/hermit/aarch64.rs":"86048676e335944c37a63d0083d0f368ae10ceccefeed9debb3bbe08777fc682","src/unix/hermit/mod.rs":"859814f5df89e28fd4b345db399d181e11e7ed413841b6ff703a1fcbdbf013ae","src/unix/hermit/x86_64.rs":"ab832b7524e5fb15c49ff7431165ab1a37dc4667ae0b58e8306f4c539bfa110c","src/unix/linux_like/android/b32/arm.rs":"433c1530f602cc5ed26610c58055dde0c4ceea5e00150063b24ddc60768332a4","src/unix/linux_like/android/b32/mod.rs":"7c173e0375119bf06a3081652faede95e5bcd6858e7576b7533d037978737c8f","src/unix/linux_like/android/b32/x86/align.rs":"812914e4241df82e32b12375ca3374615dc3a4bdd4cf31f0423c5815320c0dab","src/unix/linux_like/android/b32/x86/mod.rs":"8388bd3a0fcb5636bf965eee6dc95ae6860b85a2b555b387c868aa4d4e01ec89","src/unix/linux_like/android/b64/aarch64/align.rs":"2179c3b1608fa4bf68840482bfc2b2fa3ee2faf6fcae3770f9e505cddca35c7b","src/unix/linux_like/android/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/android/b64/aarch64/mod.rs":"ef230d49fd0d182adf2dae6f8e10babf18d72259d65980bf1c4c2dc8a4f84501","src/unix/linux_like/android/b64/mod.rs":"71e4fcbe952bfa4a5f9022f3972e906917b38f729b9d8ef57cd5d179104894ac","src/unix/linux_like/android/b64/riscv64/align.rs":"0bf138f84e5327d8339bcd4adf071a6832b516445e597552c82bbd881095e3a8","src/unix/linux_like/android/b64/riscv64/mod.rs":"80e9f93fed838a48b4e2e8d77b95c72cfd7c0647bcce63851555c5ad16dad143","src/unix/linux_like/android/b64/x86_64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/android/b64/x86_64/mod.rs":"e10d19bea39f719723ab6666a5ddbd378b6958769441c5904629e1df173b1dc2","src/unix/linux_like/android/mod.rs":"962741303dc24a5b9653f2e9b0b4ad9eb42fc54daa0a70ca70a7ce175e75094b","src/unix/linux_like/emscripten/align.rs":"86c95cbed7a7161b1f23ee06843e7b0e2340ad92b2cb86fe2a8ef3e0e8c36216","src/unix/linux_like/emscripten/mod.rs":"c69c90606d4362f8de89b8816df0ded724ed64b53bf55d15681fde171b7bb361","src/unix/linux_like/emscripten/no_align.rs":"0128e4aa721a9902754828b61b5ec7d8a86619983ed1e0544a85d35b1051fad6","src/unix/linux_like/linux/align.rs":"d6c259942c8e843373accd180fc8f4f45f03544dfd21b93a8d02641ead3ef63e","src/unix/linux_like/linux/arch/generic/mod.rs":"e20013ed91edcfb7f84f3f9f5a9ef827fd5c406e24b65989d8438da332236ef6","src/unix/linux_like/linux/arch/mips/mod.rs":"2d166054a586bb4bf6e4a4ba35f7574907b217225eff8f1a43adc4277e142460","src/unix/linux_like/linux/arch/mod.rs":"466a29622e47c6c7f1500682b2eb17f5566dd81b322cd6348f0fdd355cec593a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"3f6da7b0fa7b394c7d4eea2bb3caa7a7729ab0d6c1491fef02206a912c41b815","src/unix/linux_like/linux/arch/sparc/mod.rs":"91593ec0440f1dd8f8e612028f432c44c14089286e2aca50e10511ab942db8c3","src/unix/linux_like/linux/gnu/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/gnu/b32/arm/align.rs":"6ec0eb3ee93f7ae99fd714b4deabfb5e97fbcefd8c26f5a45fb8e7150899cdeb","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"92ea7edc0e24f79dfbf5e3efc2d7509bed230562036e6aa85ef4f2c8088ecc8f","src/unix/linux_like/linux/gnu/b32/m68k/align.rs":"8faa92f77a9232c035418d45331774e64a9a841d99c91791570a203bf2b45bcb","src/unix/linux_like/linux/gnu/b32/m68k/mod.rs":"a2a0a9400dae44086ebf579e0448e0676d4a3214d1ae7d13a024857251e23b6b","src/unix/linux_like/linux/gnu/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"0d7849eb2435ec1f49b6774872a0518f0129c50f37c9d38b37b1535722777a22","src/unix/linux_like/linux/gnu/b32/mod.rs":"8da281da578cdee972e952b118b903b370320897a7e335342a15e1359864bef2","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"049d6211ba4a9304bd4497c160bc21ae847c24e0528dd9d76263f16192e6aff5","src/unix/linux_like/linux/gnu/b32/riscv32/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"a4256148cec0bb672c8dfa605866930d9761af9655721de72ae41eeeb8fdbf6d","src/unix/linux_like/linux/gnu/b32/sparc/align.rs":"21adbed27df73e2d1ed934aaf733a643003d7baf2bde9c48ea440895bcca6d41","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"525618615aa0cb80c6c90860bf579dfed8db307fffd56b97dc235fb945419434","src/unix/linux_like/linux/gnu/b32/x86/align.rs":"e4bafdc4a519a7922a81b37a62bbfd1177a2f620890eef8f1fbc47162e9eb413","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"78b4038852986436888c63be9258037cf642124daee9d5fa5cef2bf8e412bf54","src/unix/linux_like/linux/gnu/b64/aarch64/align.rs":"5b32fcc0d60356c92ded4e0ba9bb32f0140a8bd75ba800486bf38294f61dbdbb","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"21a21503ef2e095f4371044915d4bfb07a8578011cb5c713cd9f45947b0b5730","src/unix/linux_like/linux/gnu/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"e78c3cd197f44832338b414d1a9bc0d194f44c74db77bd7bf830c1fff62b2690","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"c72a08011c32f82919e930e0d89044d8feb65fd41bf80647436756c290344eb8","src/unix/linux_like/linux/gnu/b64/loongarch64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs":"387808d5398b24339e7e2bf7591150735011befc5b421fa713d7017c04a7b1da","src/unix/linux_like/linux/gnu/b64/mips64/align.rs":"7169d07a9fd4716f7512719aec9fda5d8bed306dc0720ffc1b21696c9951e3c6","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"17aad16329431d83e1909e3a08022f6e28f4bcba7dec4a967fe1a321a6a43b99","src/unix/linux_like/linux/gnu/b64/mod.rs":"3c6555f30a7a8852757b31a542ea73fb6a16a6e27e838397e819278ad56e57a4","src/unix/linux_like/linux/gnu/b64/powerpc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"97e0ecf11ecce793a13fec39654fb513c5479edf7faa7a276fa714b61993d0fc","src/unix/linux_like/linux/gnu/b64/riscv64/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"b3fe290afe63d2d6e315d0cf1f775464e9c1f2a1906d243c1af74a137a4031cb","src/unix/linux_like/linux/gnu/b64/s390x.rs":"254f00266ecf9644a4b469457cb37c4dd6c055820926c1de0fb9035b6048e75c","src/unix/linux_like/linux/gnu/b64/sparc64/align.rs":"e29c4868bbecfa4a6cd8a2ad06193f3bbc78a468cc1dc9df83f002f1268130d9","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"87dd7f3d5bf3c09f4064ec738e306cc9cc41ad49b4a5df62c5983301c3bbf99a","src/unix/linux_like/linux/gnu/b64/x86_64/align.rs":"62e822478356db4a73b6bbd1b36d825b893939ab4b308ec11b0578bcc4b49769","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"f0db9914315d5a3d51bf5ec04a0ae6584f2e1688b9258ce132b617e67d9bd7a9","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"b88ef8a1eaa9ed73bf2acb8192afb73af987a92abb94140c6376fc83f2fa5553","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"79305936a60d342efdc10519ba89507d6b48e65f13f33090d3b04dc9655ceed0","src/unix/linux_like/linux/gnu/mod.rs":"fd62b48974dd2f97f6e8fa2a30624e8d69fdedc5d3b0ab2f3f09516e88a8769a","src/unix/linux_like/linux/gnu/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/mod.rs":"af94b1a6d844bed87bb4c93de0a12f160ca1f918f5234d7fe17511d4e424dedc","src/unix/linux_like/linux/musl/b32/arm/align.rs":"3e8ac052c1043764776b54c93ba4260e061df998631737a897d9d47d54f7b80c","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"e5faee8efda8a225ea0b17d4d6f9e893a678e73773fa62c549a8e19c106b9f04","src/unix/linux_like/linux/musl/b32/hexagon.rs":"226a8b64ce9c75abbbee6d2dceb0b44f7b6c750c4102ebd4d015194afee6666e","src/unix/linux_like/linux/musl/b32/mips/align.rs":"429fb5e005cb7143602d430098b6ebfb7d360685b194f333dfd587472ae954ee","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"df8f8b529a6cc6b8a7326639e83303cf1320c6c50d76517c17d42bcf45f6240a","src/unix/linux_like/linux/musl/b32/mod.rs":"7b3d9dfd8605b00bb9b5fa1439abe5ebf60199c7fa033eee555e8d181e93ffa2","src/unix/linux_like/linux/musl/b32/powerpc.rs":"c957d99a4d4371d2411a5769be8cf344516bf9ddc1011f977501a4eb57cb4e82","src/unix/linux_like/linux/musl/b32/riscv32/align.rs":"efd2accf33b87de7c7547903359a5da896edc33cd6c719552c7474b60d4a5d48","src/unix/linux_like/linux/musl/b32/riscv32/mod.rs":"e57dc5562553aab6d0765e0ec266254aa52975f8757bfe97e0c6028fa7d5d37c","src/unix/linux_like/linux/musl/b32/x86/align.rs":"08e77fbd7435d7dec2ff56932433bece3f02e47ce810f89004a275a86d39cbe1","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"199a91e90b454f9dc32770d5204cc4f6e5b8f144e0e34a1c91829949d6e804b3","src/unix/linux_like/linux/musl/b64/aarch64/align.rs":"6ba32725d24d7d8e6aa111f3b57aafa318f83b606abe96561329151829821133","src/unix/linux_like/linux/musl/b64/aarch64/int128.rs":"1735f6f5c56770d20dd426442f09724d9b2052b46a7cd82f23f3288a4a7276de","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"9c4878df0fea0e0affd85346e0bc191abdc5e41e74dc9199b5644ec33d29c300","src/unix/linux_like/linux/musl/b64/mips64.rs":"1fa4974fe412b22c3555d3e240dbf00cc04a5287c751035ddf08a0470d4a7c9a","src/unix/linux_like/linux/musl/b64/mod.rs":"8c10627bd582cb272514e7350ae4743a65d489356eae039d2e7e55cd533fbbc8","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"36694cbdcdc33879e00502d55cb95eaa0096d213538993dd39c3da800cdd06d1","src/unix/linux_like/linux/musl/b64/riscv64/align.rs":"d321491612be8d5c61b6ec2dc0111beb3a22e58803f99cd37543efe86621b119","src/unix/linux_like/linux/musl/b64/riscv64/mod.rs":"36621aca8ecf714f8dd42662dc2997833d95b9f129ef8c220503362e21efd695","src/unix/linux_like/linux/musl/b64/s390x.rs":"c7ebabc4e1bdbbd97e5065faa3a57f41f473570920582d979f9e9d4f77448546","src/unix/linux_like/linux/musl/b64/x86_64/align.rs":"77309276ad7a42cbe59ca381f23590b7a143aded05555b34a5b307b808cbca6e","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"238789097a26abc8b7cd578ed1a8e6cb8672083054303902781983902cd66854","src/unix/linux_like/linux/musl/mod.rs":"c3365480375bc258ffe267e7a299d7b3bb542a908bef8881f503ddc25ba8fc1f","src/unix/linux_like/linux/no_align.rs":"da2a8721becaaaa528781f97f5d9aae6a982ae5d4f5f6d2ffc0150bed72319b3","src/unix/linux_like/linux/non_exhaustive.rs":"181a05bf94fdb911db83ce793b993bd6548a4115b306a7ef3c10f745a8fea3e9","src/unix/linux_like/linux/uclibc/align.rs":"9ed16138d8e439bd90930845a65eafa7ebd67366e6bf633936d44014f6e4c959","src/unix/linux_like/linux/uclibc/arm/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/arm/mod.rs":"a056bbf718ddd775519058706bdb4909b56e6256985869e3c3132aa8ec5faca0","src/unix/linux_like/linux/uclibc/arm/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips32/align.rs":"e4a3c27fe20a57b8d612c34cb05bc70646edb5cec7251957315afa53a7b9f936","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"b84def53a49587e87f884c2bc28b21b290463b00b52e1d0309f2ba233a5b4a99","src/unix/linux_like/linux/uclibc/mips/mips32/no_align.rs":"9cd223135de75315840ff9c3fd5441ba1cb632b96b5c85a76f8316c86653db25","src/unix/linux_like/linux/uclibc/mips/mips64/align.rs":"a7bdcb18a37a2d91e64d5fad83ea3edc78f5412adb28f77ab077dbb26dd08b2d","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"256a428290a560163ef7dc7d18b27bd3c6ce9748a0f28d5dc7f82203ee228220","src/unix/linux_like/linux/uclibc/mips/mips64/no_align.rs":"4a18e3875698c85229599225ac3401a2a40da87e77b2ad4ef47c6fcd5a24ed30","src/unix/linux_like/linux/uclibc/mips/mod.rs":"367ec5483ad317e6ccba1ac0888da6cf088a8d32689214cc8d16129aa692260c","src/unix/linux_like/linux/uclibc/mod.rs":"1c3d25cddcfefa2bd17bdc81550826be31a08eef235e13f825f169a5029c8bca","src/unix/linux_like/linux/uclibc/no_align.rs":"3f28637046524618adaa1012e26cb7ffe94b9396e6b518cccdc69d59f274d709","src/unix/linux_like/linux/uclibc/x86_64/l4re.rs":"024eba5753e852dbdd212427351affe7e83f9916c1864bce414d7aa2618f192e","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"bf6985e901041a61e90ccee1296b35a4c62ef90aa528d31989e1d647f072e79a","src/unix/linux_like/linux/uclibc/x86_64/other.rs":"42c3f71e58cabba373f6a55a623f3c31b85049eb64824c09c2b082b3b2d6a0a8","src/unix/linux_like/mod.rs":"09fa012e027bfcdaabee221c1b676804a9c7e0e04a4b64fdd98a50c9b5c2f674","src/unix/mod.rs":"fbd5520d160a32a127608cd408905febe387773bbf05bfe199ef385fb5562e9c","src/unix/newlib/aarch64/mod.rs":"bac93836a9a57b2c710f32f852e92a4d11ad6759ab0fb6ad33e71d60e53278af","src/unix/newlib/align.rs":"28aaf87fafbc6b312622719d472d8cf65f9e5467d15339df5f73e66d8502b28a","src/unix/newlib/arm/mod.rs":"cbba6b3e957eceb496806e60de8725a23ff3fa0015983b4b4fa27b233732b526","src/unix/newlib/espidf/mod.rs":"816f235f4aa4baabba7f2606b31d0fdb03988c52194c966728de8690bf17299d","src/unix/newlib/generic.rs":"eab066d9f0a0f3eb53cc1073d01496bba0110989e1f6a59838afd19f870cd599","src/unix/newlib/horizon/mod.rs":"7cc5cc120437421db139bfa6a90b18168cd3070bdd0f5be96d40fe4c996f3ca1","src/unix/newlib/mod.rs":"54633d606e4e0413274af0b5beb5e697e6c061b63feaa0704b026554cc9d9c3e","src/unix/newlib/no_align.rs":"e0743b2179495a9514bc3a4d1781e492878c4ec834ee0085d0891dd1712e82fb","src/unix/newlib/powerpc/mod.rs":"0202ffd57caf75b6afa2c9717750ffb96e375ac33df0ae9609a3f831be393b67","src/unix/no_align.rs":"c06e95373b9088266e0b14bba0954eef95f93fb2b01d951855e382d22de78e53","src/unix/redox/mod.rs":"033768cb273daf2c8090d97252c2de9dba6809e6a5d2457f5727d724807695db","src/unix/solarish/compat.rs":"b07a5bfac925eb012003a459ba6bddbd3bfa9c44b3394da2ac5a602e54beae9c","src/unix/solarish/illumos.rs":"29387916ee7dc58f07478746024003215e631cd30953e8fa2a5c415f81839007","src/unix/solarish/mod.rs":"8914a68865af026c1f4fb1d5f02ba0053362ef34b813ad60cc4aa3a88aa4999e","src/unix/solarish/solaris.rs":"65b005453aefa9b9d4fc860fe77cfec80d8c97a51342b15daf55fc3e808bb384","src/unix/solarish/x86.rs":"e86e806df0caed72765040eaa2f3c883198d1aa91508540adf9b7008c77f522e","src/unix/solarish/x86_64.rs":"9074e813949f3c613afeac39d4118fb942c0b3c476232fc536489357cff5790f","src/unix/solarish/x86_common.rs":"ac869d9c3c95645c22460468391eb1982023c3a8e02b9e06a72e3aef3d5f1eac","src/vxworks/aarch64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/arm.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/mod.rs":"aea3da66f2140f2a82dfc9c58f6e6531d2dd9c15ea696e0f95a0d4a2a187b5b6","src/vxworks/powerpc.rs":"acb7968ce99fe3f4abdf39d98f8133d21a4fba435b8ef7084777cb181d788e88","src/vxworks/powerpc64.rs":"98f0afdc511cd02557e506c21fed6737585490a1dce7a9d4941d08c437762b99","src/vxworks/x86.rs":"552f007f38317620b23889cb7c49d1d115841252439060122f52f434fbc6e5ba","src/vxworks/x86_64.rs":"018d92be3ad628a129eff9f2f5dfbc0883d8b8e5f2fa917b900a7f98ed6b514a","src/wasi.rs":"4fae202af0327d768ed9e1b586b75816cce14fe2dc16947d2f3d381f209a54c1","src/windows/gnu/align.rs":"b2c13ec1b9f3b39a75c452c80c951dff9d0215e31d77e883b4502afb31794647","src/windows/gnu/mod.rs":"3c8c7edb7cdf5d0c44af936db2a94869585c69dfabeef30571b4f4e38375767a","src/windows/mod.rs":"090dd8fcd951d18f1905bca96188783c2e3f1433484926ecdcda144237ecec0f","src/windows/msvc/mod.rs":"c068271e00fca6b62bc4bf44bcf142cfc38caeded9b6c4e01d1ceef3ccf986f4","tests/const_fn.rs":"cb75a1f0864f926aebe79118fc34d51a0d1ade2c20a394e7774c7e545f21f1f4"},"package":"8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"} +\ No newline at end of file diff --git a/meta-balena-rust/recipes-devtools/rust/rust/crossbeam_atomic.patch b/meta-balena-rust/recipes-devtools/rust/rust/crossbeam_atomic.patch new file mode 100644 index 0000000000..1c0d5a1974 --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/rust/crossbeam_atomic.patch @@ -0,0 +1,81 @@ +crossbeam-utils is taking the target triplet and comparing it against a +known list of platforms that have issues either with any atomics or with +64 bit atomics. Since OE encodes TARGET_VENDOR into the rust triplet (to +differentiate host vs. target) this means that platforms that should match, +don't. + +We could make a list of platforms and pass in configuration values but +having one list in rust and another in our recipes is likely to cause +problems in the future. We do already have this issue in the librsvg recipe. +Instead, switch out the value of TARGET_VENDOR for "-unknown" which +them makes the list in no_atomics.rs work correctly. + +Someone with more rust knowledge could split up the triplets in no_atmoics.rs +and compare against the architecture/processor, or replace -unknown with a glob +to create a patch that upstream might accept. + +Upstream-Status: Submitted [https://github.com/crossbeam-rs/crossbeam/pull/922] +Signed-off-by: Richard Purdie + +Index: rustc-1.65.0-src/vendor/crossbeam-utils/build.rs +=================================================================== +--- rustc-1.65.0-src.orig/vendor/crossbeam-utils/build.rs ++++ rustc-1.65.0-src/vendor/crossbeam-utils/build.rs +@@ -29,7 +29,7 @@ use std::env; + include!("no_atomic.rs"); + + fn main() { +- let target = match env::var("TARGET") { ++ let mut target = match env::var("TARGET") { + Ok(target) => target, + Err(e) => { + println!( +@@ -40,6 +40,8 @@ fn main() { + return; + } + }; ++ let vendor = env::var("TARGET_VENDOR").unwrap(); ++ target = target.replace(&vendor, "-unknown"); + + // Note that this is `no_`*, not `has_*`. This allows treating as the latest + // stable rustc is used when the build script doesn't run. This is useful +Index: rustc-1.65.0-src/vendor/crossbeam-utils/.cargo-checksum.json +=================================================================== +--- rustc-1.65.0-src.orig/vendor/crossbeam-utils/.cargo-checksum.json ++++ rustc-1.65.0-src/vendor/crossbeam-utils/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"CHANGELOG.md":"eb2f46ecf2eee5f591c4d4e789f18735bb1ed771782a5e0f16eab3a77001e7c2","Cargo.toml":"9ce8b596c9789e65bef4c952bdcac84fc88e50ba9ecb01a818036eff4e6ecfec","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"2a19af38a52dd965c2d66bb39f90a85b430b51ee9ccb29e9e1978ee7091e5087","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"4859f9c926c230023e861bf01c4b225b460035faf8cf6240108530efedbb747f","no_atomic.rs":"916ed15218bb7b75a4e0d432430e7134efd27ca43ca8a8766e0c90e89febb602","src/atomic/atomic_cell.rs":"0fc99463e633144c5d59d39c35b5477da1f1b90f5448cadc37454b7f4b97707e","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"94193895fa03cece415e8d7be700b73a9a8a7015774ca821253438607f9b0736","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"8fd5e3dcccc05860680e49c8498de8096bee9140bcfee8723d97117106a020d0","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"91f3a7d4ee8d9e06b6558d180e8a0df08ff5c6cef612b4ce4790f9f75cb34f84","src/sync/sharded_lock.rs":"78433f55ee3defeea348d65abc78e03d63d6a304e09c568b27b403e9ad205771","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"21cf9b3e965529e5c0a6ff8fc1ec846bfe0006c41deb238a149be8d07384e955","tests/atomic_cell.rs":"bf8bc869c922a1cbf929c3b741bae0cae98f2157f572b5a4eb2873d20a407c22","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"314adeb8a651a28935f7a49c9a261b8fa1fd82bf6a16c865a5aced6216d7e40b","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"02661c2a820a5abe8b0c8fe15a6650aead707b57cdda0610d1b09a2680ed6969"},"package":"51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"} +\ No newline at end of file ++{"files":{"CHANGELOG.md":"eb2f46ecf2eee5f591c4d4e789f18735bb1ed771782a5e0f16eab3a77001e7c2","Cargo.toml":"9ce8b596c9789e65bef4c952bdcac84fc88e50ba9ecb01a818036eff4e6ecfec","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"2a19af38a52dd965c2d66bb39f90a85b430b51ee9ccb29e9e1978ee7091e5087","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"108ba75398e3169c35b0e9754782391e4e4a9f9bf0ae2b216b55d836c4ac9ba8","no_atomic.rs":"916ed15218bb7b75a4e0d432430e7134efd27ca43ca8a8766e0c90e89febb602","src/atomic/atomic_cell.rs":"0fc99463e633144c5d59d39c35b5477da1f1b90f5448cadc37454b7f4b97707e","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"94193895fa03cece415e8d7be700b73a9a8a7015774ca821253438607f9b0736","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"8fd5e3dcccc05860680e49c8498de8096bee9140bcfee8723d97117106a020d0","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"91f3a7d4ee8d9e06b6558d180e8a0df08ff5c6cef612b4ce4790f9f75cb34f84","src/sync/sharded_lock.rs":"78433f55ee3defeea348d65abc78e03d63d6a304e09c568b27b403e9ad205771","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"21cf9b3e965529e5c0a6ff8fc1ec846bfe0006c41deb238a149be8d07384e955","tests/atomic_cell.rs":"bf8bc869c922a1cbf929c3b741bae0cae98f2157f572b5a4eb2873d20a407c22","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"314adeb8a651a28935f7a49c9a261b8fa1fd82bf6a16c865a5aced6216d7e40b","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"02661c2a820a5abe8b0c8fe15a6650aead707b57cdda0610d1b09a2680ed6969"},"package":"51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"} +\ No newline at end of file +Index: rustc-1.65.0-src/vendor/crossbeam-utils-0.8.8/.cargo-checksum.json +=================================================================== +--- rustc-1.65.0-src.orig/vendor/crossbeam-utils-0.8.8/.cargo-checksum.json ++++ rustc-1.65.0-src/vendor/crossbeam-utils-0.8.8/.cargo-checksum.json +@@ -1 +1 @@ +-{"files":{"CHANGELOG.md":"665a9f2c5fd37c98bef7c1b6eda753b58bb925d87e5b42d7298df973d7590631","Cargo.toml":"fe22292acd6a868e65baf225f90d5678678971642814d2d8e92a03954b8bdb40","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"7e74dc72343ff57e83d0a84a9fbdd9ff1645894165909999b4c3d2fba94bc96c","no_atomic.rs":"71b5f78fd701ce604aa766dd3d825fa5bed774282aae4d6c31d7acb01b1b242f","src/atomic/atomic_cell.rs":"01185588e0e16ba81425677966d0c11887dedc4ac0d4a65991a34057c418adc4","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"94193895fa03cece415e8d7be700b73a9a8a7015774ca821253438607f9b0736","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"d64faa1ca8896373468308031220940d988aa3a1679ea25d2291a7a7d22bc51a","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"} +\ No newline at end of file ++{"files":{"CHANGELOG.md":"665a9f2c5fd37c98bef7c1b6eda753b58bb925d87e5b42d7298df973d7590631","Cargo.toml":"fe22292acd6a868e65baf225f90d5678678971642814d2d8e92a03954b8bdb40","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"d983d511c89607ce89473779d1ee195e3eb509cc4d3043b9efe6aa2f94c98158","no_atomic.rs":"71b5f78fd701ce604aa766dd3d825fa5bed774282aae4d6c31d7acb01b1b242f","src/atomic/atomic_cell.rs":"01185588e0e16ba81425677966d0c11887dedc4ac0d4a65991a34057c418adc4","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"94193895fa03cece415e8d7be700b73a9a8a7015774ca821253438607f9b0736","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"3f997f5b41fec286ccedcf3d36f801d741387badb574820b8e3456117ecd9154","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"6a7676fd4e50af63aec6f655121a10cd6e8c704f4677125388186ba58dc5842d","tests/atomic_cell.rs":"d64faa1ca8896373468308031220940d988aa3a1679ea25d2291a7a7d22bc51a","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"eb6c5b59f007e0d290dd0f58758e8ccb5cacd38af34e3341368ced815f0c41be","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"} +\ No newline at end of file +Index: rustc-1.65.0-src/vendor/crossbeam-utils-0.8.8/build.rs +=================================================================== +--- rustc-1.65.0-src.orig/vendor/crossbeam-utils-0.8.8/build.rs ++++ rustc-1.65.0-src/vendor/crossbeam-utils-0.8.8/build.rs +@@ -29,7 +29,7 @@ use std::env; + include!("no_atomic.rs"); + + fn main() { +- let target = match env::var("TARGET") { ++ let mut target = match env::var("TARGET") { + Ok(target) => target, + Err(e) => { + println!( +@@ -40,6 +40,8 @@ fn main() { + return; + } + }; ++ let vendor = env::var("TARGET_VENDOR").unwrap(); ++ target = target.replace(&vendor, "-unknown"); + + // Note that this is `no_*`, not `has_*`. This allows treating + // `cfg(target_has_atomic = "ptr")` as true when the build script doesn't diff --git a/meta-balena-rust/recipes-devtools/rust/rust/hardcodepaths.patch b/meta-balena-rust/recipes-devtools/rust/rust/hardcodepaths.patch new file mode 100644 index 0000000000..87ac0c3989 --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/rust/hardcodepaths.patch @@ -0,0 +1,70 @@ +When building for the target, some build paths end up embedded in the binaries. +These changes remove that. Further investigation is needed to work out the way +to resolve these issues properly upstream. + +Upstream-Status: Inappropriate [patches need rework] +Signed-off-by: Richard Purdie + +Index: rustc-1.65.0-src/src/tools/clippy/src/driver.rs +=================================================================== +--- rustc-1.65.0-src.orig/src/tools/clippy/src/driver.rs ++++ rustc-1.65.0-src/src/tools/clippy/src/driver.rs +@@ -259,7 +259,6 @@ pub fn main() { + .and_then(|out| String::from_utf8(out.stdout).ok()) + .map(|s| PathBuf::from(s.trim())) + }) +- .or_else(|| option_env!("SYSROOT").map(PathBuf::from)) + .or_else(|| { + let home = option_env!("RUSTUP_HOME") + .or(option_env!("MULTIRUST_HOME")) +Index: rustc-1.65.0-src/compiler/rustc_codegen_llvm/src/context.rs +=================================================================== +--- rustc-1.65.0-src.orig/compiler/rustc_codegen_llvm/src/context.rs ++++ rustc-1.65.0-src/compiler/rustc_codegen_llvm/src/context.rs +@@ -155,46 +155,6 @@ pub unsafe fn create_module<'ll>( + } + } + +- // Ensure the data-layout values hardcoded remain the defaults. +- if sess.target.is_builtin { +- let tm = crate::back::write::create_informational_target_machine(tcx.sess); +- llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, tm); +- llvm::LLVMRustDisposeTargetMachine(tm); +- +- let llvm_data_layout = llvm::LLVMGetDataLayoutStr(llmod); +- let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes()) +- .expect("got a non-UTF8 data-layout from LLVM"); +- +- // Unfortunately LLVM target specs change over time, and right now we +- // don't have proper support to work with any more than one +- // `data_layout` than the one that is in the rust-lang/rust repo. If +- // this compiler is configured against a custom LLVM, we may have a +- // differing data layout, even though we should update our own to use +- // that one. +- // +- // As an interim hack, if CFG_LLVM_ROOT is not an empty string then we +- // disable this check entirely as we may be configured with something +- // that has a different target layout. +- // +- // Unsure if this will actually cause breakage when rustc is configured +- // as such. +- // +- // FIXME(#34960) +- let cfg_llvm_root = option_env!("CFG_LLVM_ROOT").unwrap_or(""); +- let custom_llvm_used = cfg_llvm_root.trim() != ""; +- +- if !custom_llvm_used && target_data_layout != llvm_data_layout { +- bug!( +- "data-layout for target `{rustc_target}`, `{rustc_layout}`, \ +- differs from LLVM target's `{llvm_target}` default layout, `{llvm_layout}`", +- rustc_target = sess.opts.target_triple, +- rustc_layout = target_data_layout, +- llvm_target = sess.target.llvm_target, +- llvm_layout = llvm_data_layout +- ); +- } +- } +- + let data_layout = SmallCStr::new(&target_data_layout); + llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr()); + diff --git a/meta-balena-rust/recipes-devtools/rust/rust_1.62.0.bb b/meta-balena-rust/recipes-devtools/rust/rust_1.62.0.bb deleted file mode 100644 index b505ad46ca..0000000000 --- a/meta-balena-rust/recipes-devtools/rust/rust_1.62.0.bb +++ /dev/null @@ -1,21 +0,0 @@ -require rust-target.inc -require rust-source.inc -require rust-snapshot.inc - -INSANE_SKIP:${PN}:class-native = "already-stripped" - -do_compile () { - rust_runx build --stage 2 -} - -rust_do_install() { - rust_runx install -} - -python () { - pn = d.getVar('PN') - - if not pn.endswith("-native"): - raise bb.parse.SkipRecipe("Rust recipe doesn't work for target builds at this time. Fixes welcome.") -} - diff --git a/meta-balena-rust/recipes-devtools/rust/rust_1.65.0.bb b/meta-balena-rust/recipes-devtools/rust/rust_1.65.0.bb new file mode 100644 index 0000000000..b39f772c5f --- /dev/null +++ b/meta-balena-rust/recipes-devtools/rust/rust_1.65.0.bb @@ -0,0 +1,89 @@ +require rust-target.inc +require rust-source.inc +require rust-snapshot.inc + +INSANE_SKIP:${PN}:class-native = "already-stripped" +FILES:${PN} += "${libdir}/rustlib" +FILES:${PN} += "${libdir}/*.so" +FILES:${PN}-dev = "" + +# Used by crossbeam_atomic.patch +export TARGET_VENDOR + +do_compile () { + rust_runx build --stage 2 +} + +do_compile:append:class-target () { + rust_runx build --stage 2 src/tools/clippy + rust_runx build --stage 2 src/tools/rustfmt +} + +do_compile:append:class-nativesdk () { + rust_runx build --stage 2 src/tools/clippy + rust_runx build --stage 2 src/tools/rustfmt +} + +ALLOW_EMPTY:${PN} = "1" + +PACKAGES =+ "${PN}-tools-clippy ${PN}-tools-rustfmt" +FILES:${PN}-tools-clippy = "${bindir}/cargo-clippy ${bindir}/clippy-driver" +FILES:${PN}-tools-rustfmt = "${bindir}/rustfmt" +RDEPENDS:${PN}-tools-clippy = "${PN}" +RDEPENDS:${PN}-tools-rustfmt = "${PN}" + +SUMMARY:${PN}-tools-clippy = "A collection of lints to catch common mistakes and improve your Rust code" +SUMMARY:${PN}-tools-rustfmt = "A tool for formatting Rust code according to style guidelines" + +rust_do_install() { + rust_runx install +} + +rust_do_install:class-nativesdk() { + export PSEUDO_UNLOAD=1 + rust_runx install + unset PSEUDO_UNLOAD + + install -d ${D}${bindir} + for i in cargo-clippy clippy-driver rustfmt; do + cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} + chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i + done + + chown root:root ${D}/ -R + rm ${D}${libdir}/rustlib/uninstall.sh + rm ${D}${libdir}/rustlib/install.log + rm ${D}${libdir}/rustlib/manifest* +} + +EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt" +rust_do_install:class-target() { + export PSEUDO_UNLOAD=1 + rust_runx install + unset PSEUDO_UNLOAD + + install -d ${D}${bindir} + for i in ${EXTRA_TOOLS}; do + cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} + chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i + done + + install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS} + install -m 0644 ${WORKDIR}/rust-targets/${RUST_HOST_SYS}.json ${D}${libdir}/rustlib/${RUST_HOST_SYS}/target.json + + chown root:root ${D}/ -R + rm ${D}${libdir}/rustlib/uninstall.sh + rm ${D}${libdir}/rustlib/install.log + rm ${D}${libdir}/rustlib/manifest* +} + +# see recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch +# we need to link with ssp_nonshared on musl to avoid "undefined reference to `__stack_chk_fail_local'" +# when building MACHINE=qemux86 for musl +WRAPPER_TARGET_EXTRALD:libc-musl = "-lssp_nonshared" + +RUSTLIB_DEP:class-nativesdk = "" + +# musl builds include libunwind.a +INSANE_SKIP:${PN} = "staticdev" +