Skip to content

Commit

Permalink
fixup: rust 1.75
Browse files Browse the repository at this point in the history
needed for pydantic-core
  • Loading branch information
sfoster1 committed Dec 13, 2024
1 parent 8108f59 commit 7ad7c58
Show file tree
Hide file tree
Showing 31 changed files with 2,605 additions and 2,923 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ do_update_crates[depends] = "python3-native:do_populate_sysroot"
do_update_crates[nostamp] = "1"
do_update_crates[doc] = "Update the recipe by reading Cargo.lock and write in ${THISDIR}/${BPN}-crates.inc"

RECIPE_UPDATE_EXTRA_TASKS += "do_update_crates"

# The directory where to search for Cargo.lock files
CARGO_LOCK_SRC_DIR ??= "${S}"

Expand Down
8 changes: 4 additions & 4 deletions layers/meta-opentrons/classes/cargo_common.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
inherit rust-common

# Where we download our registry and dependencies to
export CARGO_HOME = "${WORKDIR}/cargo_home"
export CARGO_HOME = "${UNPACKDIR}/cargo_home"

# The pkg-config-rs library used by cargo build scripts disables itself when
# cross compiling unless this is defined. We set up pkg-config appropriately
Expand All @@ -41,7 +41,7 @@ CARGO_SRC_DIR ??= ""
CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"

# Path to Cargo.lock
CARGO_LOCK_PATH ??= "${@ os.path.join(os.path.dirname(d.getVar('CARGO_MANIFEST_PATH', True)), 'Cargo.lock')}"
CARGO_LOCK_PATH ??= "${@ os.path.join(os.path.dirname(d.getVar('CARGO_MANIFEST_PATH')), 'Cargo.lock')}"

CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}"
cargo_common_do_configure () {
Expand Down Expand Up @@ -138,7 +138,7 @@ python cargo_common_do_patch_paths() {
return

patches = dict()
workdir = d.getVar('WORKDIR')
workdir = d.getVar('UNPACKDIR')
fetcher = bb.fetch2.Fetch(src_uri, d)
for url in fetcher.urls:
ud = fetcher.ud[url]
Expand Down Expand Up @@ -171,7 +171,7 @@ python cargo_common_do_patch_paths() {
# here is better than letting cargo tell (in case the file is missing)
# "Cargo.lock should be modified but --frozen was given"

lockfile = d.getVar("CARGO_LOCK_PATH", True)
lockfile = d.getVar("CARGO_LOCK_PATH")
if not os.path.exists(lockfile):
bb.fatal(f"{lockfile} file doesn't exist")

Expand Down
7 changes: 5 additions & 2 deletions layers/meta-opentrons/classes/rust-target-config.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def llvm_features_from_tune(d):

if 'vfpv4' in feat:
f.append("+vfp4")
elif 'vfpv4d16' in feat:
f.append("+vfp4")
f.append("-d32")
elif 'vfpv3' in feat:
f.append("+vfp3")
elif 'vfpv3d16' in feat:
Expand Down Expand Up @@ -127,15 +130,15 @@ def llvm_features(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"
DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
TARGET_ENDIAN[arm-eabi] = "little"
TARGET_POINTER_WIDTH[arm-eabi] = "32"
TARGET_C_INT_WIDTH[arm-eabi] = "32"
MAX_ATOMIC_WIDTH[arm-eabi] = "64"
FEATURES[arm-eabi] = "+v6,+vfp2"

## armv7-unknown-linux-gnueabihf
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
TARGET_ENDIAN[armv7-eabi] = "little"
TARGET_POINTER_WIDTH[armv7-eabi] = "32"
TARGET_C_INT_WIDTH[armv7-eabi] = "32"
Expand Down
16 changes: 8 additions & 8 deletions layers/meta-opentrons/conf/distro/opentrons.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ PREFERRED_VERSION_vulkan-tools = "1.2.182.0"
PREFERRED_VERSION_vulkan-headers = "1.2.182.0"
PREFERRED_VERSION_vulkan-loader = "1.2.182.0"
PREFERRED_VERSION_python3-setuptools-rust = "1.10.2"
PREFERRED_VERSION_rust = "1.71.1"
PREFERRED_VERSION_rust-cross-canadian = "1.71.1"
PREFERRED_VERSION_libstd-rs = "1.71.1"
PREFERRED_VERSION_rust-llvm = "1.71.1"
PREFERRED_VERSION_cargo = "1.71.1"
PREFERRED_VERSION_cargo-native = "1.71.1"
PREFERRED_VERSION_rust = "1.75.0"
PREFERRED_VERSION_rust-cross-canadian = "1.75.0"
PREFERRED_VERSION_libstd-rs = "1.75.0"
PREFERRED_VERSION_rust-llvm = "1.75.0"
PREFERRED_VERSION_cargo = "1.75.0"
PREFERRED_VERSION_cargo-native = "1.75.0"
PREFERRED_VERSION_cargo-c = "0.9.18"
PREFERRED_VERSION_rust-native = "1.71.1"
PREFERRED_VERSION_rust-llvm-native = "1.71.1"
PREFERRED_VERSION_rust-native = "1.75.0"
PREFERRED_VERSION_rust-llvm-native = "1.75.0"
PREFERRED_VERSION_librsvg = "2.56.3"
Loading

0 comments on commit 7ad7c58

Please sign in to comment.