31
recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch
Normal file
31
recipes-devtools/cargo/cargo-1.47.0/0001-Disable-http2.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 40802c3a42fab9cfcd27fda8d00e98f8cc30016a Mon Sep 17 00:00:00 2001
|
||||
From: Johan Anderholm <johan.anderholm@gmail.com>
|
||||
Date: Sun, 27 Jan 2019 10:19:00 +0100
|
||||
Subject: [PATCH] Disable http2
|
||||
|
||||
http2 requires that curl is build with nghttp2 which in turn depends on
|
||||
many dependencies and ultimately a dependency loop in the case of
|
||||
curl-native. As long as multiplexing is disabled in cargo this should
|
||||
be fine.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
---
|
||||
Cargo.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 95cea90c4..56211532f 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.1" }
|
||||
crates-io = { path = "crates/crates-io", version = "0.31.1" }
|
||||
crossbeam-utils = "0.7"
|
||||
crypto-hash = "0.3.1"
|
||||
-curl = { version = "0.4.23", features = ["http2"] }
|
||||
+curl = { version = "0.4.23" }
|
||||
curl-sys = "0.4.22"
|
||||
env_logger = "0.7.0"
|
||||
pretty_env_logger = { version = "0.4", optional = true }
|
||||
--
|
||||
2.28.0
|
||||
|
||||
8
recipes-devtools/cargo/cargo_1.47.0.bb
Normal file
8
recipes-devtools/cargo/cargo_1.47.0.bb
Normal file
@@ -0,0 +1,8 @@
|
||||
require recipes-devtools/rust/rust-source-${PV}.inc
|
||||
require recipes-devtools/rust/rust-snapshot-${PV}.inc
|
||||
require cargo.inc
|
||||
|
||||
LIC_FILES_CHKSUM += " \
|
||||
file://LICENSE-APACHE;md5=71b224ca933f0676e26d5c2e2271331c \
|
||||
file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \
|
||||
"
|
||||
@@ -2,6 +2,7 @@ SUMMARY = "Rust standard libaries"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
RUSTLIB_DEP = ""
|
||||
inherit cargo
|
||||
@@ -12,7 +13,9 @@ RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
|
||||
|
||||
S = "${RUSTSRC}/src/libstd"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
do_compile_prepend () {
|
||||
export CARGO_TARGET_DIR="${B}"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
@@ -1,8 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
|
||||
CARGO_FEATURES ?= "panic-unwind backtrace"
|
||||
|
||||
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||
|
||||
5
recipes-devtools/rust/libstd-rs_1.47.0.bb
Normal file
5
recipes-devtools/rust/libstd-rs_1.47.0.bb
Normal file
@@ -0,0 +1,5 @@
|
||||
require rust-source-${PV}.inc
|
||||
require libstd-rs.inc
|
||||
|
||||
# libstd moved from src/libstd to library/std in 1.47+
|
||||
S = "${RUSTSRC}/library/std"
|
||||
2
recipes-devtools/rust/rust-cross_1.47.0.bb
Normal file
2
recipes-devtools/rust/rust-cross_1.47.0.bb
Normal file
@@ -0,0 +1,2 @@
|
||||
require rust-cross.inc
|
||||
require rust-source-${PV}.inc
|
||||
@@ -1,5 +1,5 @@
|
||||
LICENSE = "NCSA"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
|
||||
|
||||
require rust-llvm.inc
|
||||
|
||||
@@ -5,7 +5,7 @@ SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch"
|
||||
|
||||
S = "${RUSTSRC}/src/llvm-project/llvm"
|
||||
|
||||
LIC_FILES_CHKSUM ?= "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
inherit cmake python3native
|
||||
|
||||
@@ -46,9 +46,9 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||
|
||||
export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
|
||||
|
||||
do_install_append_class-target() {
|
||||
# Disable checks on the native tools, since these should came from the native recipe
|
||||
sed -i -e 's/\(.*APPEND.*_IMPORT_CHECK_FILES_FOR_.*{_IMPORT_PREFIX}\/bin\/.*\)/#\1/' ${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm-ncsa.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm-ncsa.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm-ncsa.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
@@ -1,16 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||
|
||||
do_install_prepend () {
|
||||
# the install does a sed on this without installing the file
|
||||
# we don't need it for anything
|
||||
mkdir -p "${D}/usr/share/llvm/cmake"
|
||||
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
|
||||
}
|
||||
|
||||
do_install_append () {
|
||||
# we don't need any of this stuff to build Rust
|
||||
rm -rf "${D}/usr/lib/cmake"
|
||||
}
|
||||
|
||||
2
recipes-devtools/rust/rust-llvm_1.47.0.bb
Normal file
2
recipes-devtools/rust/rust-llvm_1.47.0.bb
Normal file
@@ -0,0 +1,2 @@
|
||||
require rust-source-${PV}.inc
|
||||
require rust-llvm.inc
|
||||
21
recipes-devtools/rust/rust-snapshot-1.47.0.inc
Normal file
21
recipes-devtools/rust/rust-snapshot-1.47.0.inc
Normal file
@@ -0,0 +1,21 @@
|
||||
## This is information on the rust-snapshot (binary) used to build our current release.
|
||||
## snapshot info is taken from rust/src/stage0.txt
|
||||
## TODO: find a way to add additional SRC_URIs based on the contents of an
|
||||
## earlier SRC_URI.
|
||||
RS_VERSION = "1.46.0"
|
||||
|
||||
RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||
RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||
CARGO_VERSION = "0.47.0"
|
||||
CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||
|
||||
SRC_URI += " \
|
||||
https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||
https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||
https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||
"
|
||||
|
||||
# TODO: Add hashes for other architecture toolchains as well. Make a script?
|
||||
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "e631d80cb03539769c041ee4566e94e36a271d4b3cdd149e1447d1f77fda979c"
|
||||
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "6edcec5367f9fcaee78cbcabfb1f6757fa95d7fd2c0853913223fe20ad534f12"
|
||||
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "9da5c4888c6025fa174eaef330337e49666ca9562f876a34d40c03a80d432b8d"
|
||||
10
recipes-devtools/rust/rust-source-1.47.0.inc
Normal file
10
recipes-devtools/rust/rust-source-1.47.0.inc
Normal file
@@ -0,0 +1,10 @@
|
||||
SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust"
|
||||
|
||||
SRC_URI[rust.sha256sum] = "ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6dbae4f38ea2"
|
||||
|
||||
# later versions of rust change the directory that they unextract to
|
||||
RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
|
||||
# set this as our default
|
||||
S = "${RUSTSRC}"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
|
||||
18
recipes-devtools/rust/rust_1.47.0.bb
Normal file
18
recipes-devtools/rust/rust_1.47.0.bb
Normal file
@@ -0,0 +1,18 @@
|
||||
require rust.inc
|
||||
require rust-source-${PV}.inc
|
||||
require rust-snapshot-${PV}.inc
|
||||
|
||||
DEPENDS += "rust-llvm (=${PV})"
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
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"
|
||||
|
||||
# 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 src/rustc
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Reference in New Issue
Block a user