Compare commits
204 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b783652cc | |||
| a012a1027d | |||
| 8ef8b39681 | |||
| 646fecee8a | |||
| e4d25b9808 | |||
| 1a3625364c | |||
| ea97549161 | |||
| d0dc19aa78 | |||
| 4a763a2301 | |||
| 5c7f51b6ad | |||
| d8d77be129 | |||
| dbf68d40b3 | |||
| a754e6c5d6 | |||
| 837b63596d | |||
| 2668f6afd3 | |||
| e5c2a4085f | |||
| 72aa4ef3ab | |||
| 0f950f5e33 | |||
| 10fb698a79 | |||
| 186ec59085 | |||
| 71895ec5a4 | |||
| 5cda04c7c2 | |||
| 5d1ada0c97 | |||
| 11aed43748 | |||
| 1cb2ad5543 | |||
| 0b5ea8beb0 | |||
| 412987892c | |||
| afccedc43c | |||
| 150b1591d6 | |||
| 2c4a666b68 | |||
| c5ff05d1e9 | |||
| 2f323e1e9e | |||
| 9487b089ea | |||
| bcbe02f6ac | |||
| 2afc6ecef2 | |||
| 4ca5b781dc | |||
| 164bc5f20a | |||
| 03f492ab35 | |||
| 84710b341b | |||
| 4a88247046 | |||
| 0d03c206c3 | |||
| 9a077b21d0 | |||
| 0621067c56 | |||
| 723e24bd9d | |||
| f2f17c58b0 | |||
| 68046d42b8 | |||
| f4517aaba8 | |||
| fa0aebc070 | |||
| b3d1b589ee | |||
| cb383b0d90 | |||
| 9952633163 | |||
| d537c62b4e | |||
| 16d015a481 | |||
| 8b7d6201b6 | |||
| e7c10de555 | |||
| e357f4e5d5 | |||
| 9ecc36acb5 | |||
| 4110f1d92a | |||
| 496b75fa1f | |||
| e4fdc0e8f7 | |||
| bf01840f5b | |||
| 1b00814593 | |||
| 68d6bce609 | |||
| 969467c029 | |||
| 665213a13d | |||
| 4c9068bd09 | |||
| 3b9251e732 | |||
| ea613e2ae2 | |||
| e660179c55 | |||
| 318a4c6f25 | |||
| c7fc7986c2 | |||
| 50828f8af2 | |||
| adf3f10036 | |||
| 446d28d6e1 | |||
| b15ba05ea8 | |||
| f54025fed9 | |||
| f317737fae | |||
| e04d99bf38 | |||
| 6b060617cd | |||
| 99ec7396f6 | |||
| f81fbebaeb | |||
| 5a9933dd46 | |||
| badf251873 | |||
| 060e033df9 | |||
| 6d3f61e5ce | |||
| bbf4f77f98 | |||
| b7380307d0 | |||
| 8b471a1bdc | |||
| b82e450b5a | |||
| cef09a5551 | |||
| 6052c90ca8 | |||
| 8e6c6271fc | |||
| 6066f1d2df | |||
| d3bdd55c03 | |||
| 6a0d148968 | |||
| e1fa6d39ce | |||
| de42179513 | |||
| 9b1b4db8b0 | |||
| 03d8fb472c | |||
| b117a311ef | |||
| 55e9c18a37 | |||
| 7cfa3db4f6 | |||
| 63aa6db53a | |||
| 48e2a7db25 | |||
| ab62d9cdbf | |||
| 22d72b3be6 | |||
| 575016d11d | |||
| 8203dce091 | |||
| 0639277e4c | |||
| 5a9c23fac4 | |||
| 69ae1df12e | |||
| 17cc34c9c8 | |||
| a19993c804 | |||
| 03c0338cab | |||
| 52ea673a8f | |||
| 4c7cbf6a60 | |||
| 8f46fe3e97 | |||
| c65375f14f | |||
| f02df59eea | |||
| 141177fbf9 | |||
| fa4f4f9c1a | |||
| 7f7156b664 | |||
| af5491692e | |||
| ab57e94e2c | |||
| 6965038dee | |||
| e5230147f6 | |||
| 528a34206b | |||
| 434f7851f5 | |||
| 5b1b95772e | |||
| 81ea9f2d2c | |||
| d4755fc065 | |||
| 533507b25b | |||
| ad9f280e6c | |||
| c60b799c11 | |||
| 463622c0c6 | |||
| 172a226259 | |||
| c83864ce19 | |||
| bd80824ddf | |||
| b28674a452 | |||
| 9383b2d572 | |||
| d231fcb708 | |||
| 7f80e6d68b | |||
| a1cd215131 | |||
| 34941a25e9 | |||
| 9b0dc6b3af | |||
| afe7e94a6e | |||
| 37813c4dff | |||
| 2fd83daa46 | |||
| 3bf7088579 | |||
| d9c63d8557 | |||
| a4fe235317 | |||
| 1ff41650d5 | |||
| 1b8883be12 | |||
| e31d252eb0 | |||
| 0cccf8b25c | |||
| d5bf43b9b3 | |||
| 9f1f8ab32f | |||
| 2cbf17309f | |||
| 758f8459ec | |||
| 398fecb48c | |||
| c55fb403f8 | |||
| 06a138a4a4 | |||
| 3e0f03d12a | |||
| e814ede9d9 | |||
| bb41c50510 | |||
| c29ada51f1 | |||
| 1db27bc4f7 | |||
| 4dcaaa8fc9 | |||
| 027b7aeeb0 | |||
| 8e28683458 | |||
| 394ad27929 | |||
| 1820907990 | |||
| 5a9614f91a | |||
| f851e8f185 | |||
| bc04c2ea4a | |||
| 64cdd4b714 | |||
| 502fc9b1d1 | |||
| 0adcc6e0bc | |||
| efae1a8bd0 | |||
| 1eb86e935c | |||
| f0e0b3b7e2 | |||
| 3276afb4ec | |||
| a58ea82720 | |||
| 22c971c2fa | |||
| 5d2e062a84 | |||
| 97fcc5db56 | |||
| 2a21657363 | |||
| d867f3d470 | |||
| f43eadc581 | |||
| bf4cdaf0a7 | |||
| 4ccca55f2f | |||
| e6b757111a | |||
| c19badf635 | |||
| 247bb57c84 | |||
| abe20ca06f | |||
| 185e29e4e1 | |||
| 94aa1405e3 | |||
| 04bd03be1e | |||
| 84af8005f3 | |||
| 339cc787cc | |||
| ac5d169623 | |||
| c05b6b4c30 | |||
| 52c0f97ff6 | |||
| 85d411c81c |
Vendored
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
def targets = [ 'qemux86', 'qemux86-64', 'qemuarm', 'qemuarm64' ]
|
def targets = [ 'qemux86', 'qemux86-64', 'qemuarm', 'qemuarm64', 'qemumips' ]
|
||||||
|
|
||||||
def machine_builds = [:]
|
def machine_builds = [:]
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ for (int i = 0; i < targets.size(); i++) {
|
|||||||
sh "./scripts/setup-env.sh"
|
sh "./scripts/setup-env.sh"
|
||||||
}
|
}
|
||||||
stage("fetch $machine") {
|
stage("fetch $machine") {
|
||||||
sh "GIT_LOCAL_REF_DIR=/srv/git-cache/ ./scripts/fetch.sh morty"
|
sh "GIT_LOCAL_REF_DIR=/srv/git-cache/ ./scripts/fetch.sh master"
|
||||||
}
|
}
|
||||||
stage("build $machine") {
|
stage("build $machine") {
|
||||||
sh "MACHINE=${machine} ./scripts/build.sh"
|
sh "MACHINE=${machine} ./scripts/build.sh"
|
||||||
@@ -25,7 +25,7 @@ for (int i = 0; i < targets.size(); i++) {
|
|||||||
throw e
|
throw e
|
||||||
} finally {
|
} finally {
|
||||||
stage("push build cache $machine") {
|
stage("push build cache $machine") {
|
||||||
sh "./scripts/publish-build-cache.sh morty"
|
sh "./scripts/publish-build-cache.sh master"
|
||||||
}
|
}
|
||||||
stage("cleanup $machine") {
|
stage("cleanup $machine") {
|
||||||
sh "./scripts/cleanup-env.sh"
|
sh "./scripts/cleanup-env.sh"
|
||||||
|
|||||||
+21
-59
@@ -1,13 +1,13 @@
|
|||||||
# add crate fetch support
|
##
|
||||||
inherit crate-fetch
|
## Purpose:
|
||||||
inherit rust-common
|
## This class is used by any recipes that are built using
|
||||||
|
## Cargo.
|
||||||
|
|
||||||
|
inherit cargo_common
|
||||||
|
|
||||||
# the binary we will use
|
# the binary we will use
|
||||||
CARGO = "cargo"
|
CARGO = "cargo"
|
||||||
|
|
||||||
# Where we download our registry and dependencies to
|
|
||||||
export CARGO_HOME = "${WORKDIR}/cargo_home"
|
|
||||||
|
|
||||||
# We need cargo to compile for the target
|
# We need cargo to compile for the target
|
||||||
BASEDEPENDS_append = " cargo-native"
|
BASEDEPENDS_append = " cargo-native"
|
||||||
|
|
||||||
@@ -22,66 +22,23 @@ B = "${S}"
|
|||||||
# where the issue occured
|
# where the issue occured
|
||||||
export RUST_BACKTRACE = "1"
|
export RUST_BACKTRACE = "1"
|
||||||
|
|
||||||
# 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
|
|
||||||
# for cross compilation, so tell it we know better than it.
|
|
||||||
export PKG_CONFIG_ALLOW_CROSS = "1"
|
|
||||||
|
|
||||||
cargo_do_configure () {
|
|
||||||
mkdir -p ${CARGO_HOME}
|
|
||||||
echo "paths = [" > ${CARGO_HOME}/config
|
|
||||||
|
|
||||||
for p in ${EXTRA_OECARGO_PATHS}; do
|
|
||||||
printf "\"%s\"\n" "$p"
|
|
||||||
done | sed -e 's/$/,/' >> ${CARGO_HOME}/config
|
|
||||||
echo "]" >> ${CARGO_HOME}/config
|
|
||||||
|
|
||||||
# Point cargo at our local mirror of the registry
|
|
||||||
cat <<- EOF >> ${CARGO_HOME}/config
|
|
||||||
[source.bitbake]
|
|
||||||
directory = "${CARGO_HOME}/bitbake"
|
|
||||||
|
|
||||||
[source.crates-io]
|
|
||||||
replace-with = "bitbake"
|
|
||||||
local-registry = "/nonexistant"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
|
||||||
echo "linker = '${RUST_TARGET_CCLD}'" >> ${CARGO_HOME}/config
|
|
||||||
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then
|
|
||||||
echo "[target.${BUILD_SYS}]" >> ${CARGO_HOME}/config
|
|
||||||
echo "linker = '${RUST_BUILD_CCLD}'" >> ${CARGO_HOME}/config
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
RUSTFLAGS ??= ""
|
RUSTFLAGS ??= ""
|
||||||
CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} --release"
|
BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
|
||||||
|
CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} ${BUILD_MODE}"
|
||||||
|
|
||||||
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
|
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
|
||||||
# change if CARGO_BUILD_FLAGS changes.
|
# change if CARGO_BUILD_FLAGS changes.
|
||||||
CARGO_TARGET_SUBDIR="${HOST_SYS}/release"
|
BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}"
|
||||||
|
CARGO_TARGET_SUBDIR="${HOST_SYS}/${BUILD_DIR}"
|
||||||
oe_cargo_build () {
|
oe_cargo_build () {
|
||||||
export RUSTFLAGS="${RUSTFLAGS}"
|
export RUSTFLAGS="${RUSTFLAGS}"
|
||||||
bbnote "cargo = $(which cargo)"
|
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
|
||||||
bbnote "rustc = $(which rustc)"
|
bbnote "cargo = $(which ${CARGO})"
|
||||||
|
bbnote "rustc = $(which ${RUSTC})"
|
||||||
bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
|
bbnote "${CARGO} build ${CARGO_BUILD_FLAGS} $@"
|
||||||
"${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
|
"${CARGO}" build ${CARGO_BUILD_FLAGS} "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
oe_cargo_fix_env () {
|
|
||||||
export CC="${RUST_TARGET_CC}"
|
|
||||||
export CFLAGS="${CFLAGS}"
|
|
||||||
export AR="${AR}"
|
|
||||||
export TARGET_CC="${RUST_TARGET_CC}"
|
|
||||||
export TARGET_CFLAGS="${CFLAGS}"
|
|
||||||
export TARGET_AR="${AR}"
|
|
||||||
export HOST_CC="${RUST_BUILD_CC}"
|
|
||||||
export HOST_CFLAGS="${BUILD_CFLAGS}"
|
|
||||||
export HOST_AR="${BUILD_AR}"
|
|
||||||
}
|
|
||||||
|
|
||||||
EXTRA_OECARGO_PATHS ??= ""
|
|
||||||
|
|
||||||
cargo_do_compile () {
|
cargo_do_compile () {
|
||||||
oe_cargo_fix_env
|
oe_cargo_fix_env
|
||||||
oe_cargo_build
|
oe_cargo_build
|
||||||
@@ -90,19 +47,24 @@ cargo_do_compile () {
|
|||||||
cargo_do_install () {
|
cargo_do_install () {
|
||||||
local have_installed=false
|
local have_installed=false
|
||||||
for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do
|
for tgt in "${B}/target/${CARGO_TARGET_SUBDIR}/"*; do
|
||||||
if [[ $tgt == *.so || $tgt == *.rlib ]]; then
|
case $tgt in
|
||||||
|
*.so|*.rlib)
|
||||||
install -d "${D}${rustlibdir}"
|
install -d "${D}${rustlibdir}"
|
||||||
install -m755 "$tgt" "${D}${rustlibdir}"
|
install -m755 "$tgt" "${D}${rustlibdir}"
|
||||||
have_installed=true
|
have_installed=true
|
||||||
elif [ -f "$tgt" ] && [ -x "$tgt" ]; then
|
;;
|
||||||
|
*)
|
||||||
|
if [ -f "$tgt" ] && [ -x "$tgt" ]; then
|
||||||
install -d "${D}${bindir}"
|
install -d "${D}${bindir}"
|
||||||
install -m755 "$tgt" "${D}${bindir}"
|
install -m755 "$tgt" "${D}${bindir}"
|
||||||
have_installed=true
|
have_installed=true
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
if ! $have_installed; then
|
if ! $have_installed; then
|
||||||
die "Did not find anything to install"
|
die "Did not find anything to install"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_FUNCTIONS do_configure do_compile do_install
|
EXPORT_FUNCTIONS do_compile do_install
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
##
|
||||||
|
## Purpose:
|
||||||
|
## This class is to support building with cargo. It
|
||||||
|
## must be different than cargo.bbclass because Rust
|
||||||
|
## now builds with Cargo but cannot use cargo.bbclass
|
||||||
|
## due to dependencies and assumptions in cargo.bbclass
|
||||||
|
## that Rust & Cargo are already installed. So this
|
||||||
|
## is used by cargo.bbclass and Rust
|
||||||
|
##
|
||||||
|
|
||||||
|
# add crate fetch support
|
||||||
|
inherit crate-fetch
|
||||||
|
inherit rust-common
|
||||||
|
|
||||||
|
# Where we download our registry and dependencies to
|
||||||
|
export CARGO_HOME = "${WORKDIR}/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
|
||||||
|
# for cross compilation, so tell it we know better than it.
|
||||||
|
export PKG_CONFIG_ALLOW_CROSS = "1"
|
||||||
|
|
||||||
|
# Don't instruct cargo to use crates downloaded by bitbake. Some rust packages,
|
||||||
|
# for example the rust compiler itself, come with their own vendored sources.
|
||||||
|
# Specifying two [source.crates-io] will not work.
|
||||||
|
CARGO_DISABLE_BITBAKE_VENDORING ?= "0"
|
||||||
|
|
||||||
|
# Used by libstd-rs to point to the vendor dir included in rustc src
|
||||||
|
CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake"
|
||||||
|
|
||||||
|
cargo_common_do_configure () {
|
||||||
|
mkdir -p ${CARGO_HOME}/bitbake
|
||||||
|
echo "paths = [" > ${CARGO_HOME}/config
|
||||||
|
|
||||||
|
for p in ${EXTRA_OECARGO_PATHS}; do
|
||||||
|
printf "\"%s\"\n" "$p"
|
||||||
|
done | sed -e 's/$/,/' >> ${CARGO_HOME}/config
|
||||||
|
echo "]" >> ${CARGO_HOME}/config
|
||||||
|
|
||||||
|
# Point cargo at our local mirror of the registry
|
||||||
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
|
[source.bitbake]
|
||||||
|
directory = "${CARGO_VENDORING_DIRECTORY}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -z "${EXTERNALSRC}" ] && [ ${CARGO_DISABLE_BITBAKE_VENDORING} = "0" ]; then
|
||||||
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
|
[source.crates-io]
|
||||||
|
replace-with = "bitbake"
|
||||||
|
local-registry = "/nonexistant"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Disable multiplexing in order to keep cargo from using http2, which we
|
||||||
|
# can't currently enable because of dependency loops
|
||||||
|
cat <<- EOF >> ${CARGO_HOME}/config
|
||||||
|
[http]
|
||||||
|
multiplexing = false
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# When a sstate-cache is used sometimes the certificates are not available
|
||||||
|
# at the compile time path anymore. Set it explicitly instead.
|
||||||
|
echo "cainfo = \"${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt\"" \
|
||||||
|
>> ${CARGO_HOME}/config
|
||||||
|
|
||||||
|
if [ -n "${http_proxy}" ]; then
|
||||||
|
echo "proxy = \"${http_proxy}\"" >> ${CARGO_HOME}/config
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[target.${HOST_SYS}]" >> ${CARGO_HOME}/config
|
||||||
|
echo "linker = '${RUST_TARGET_CCLD}'" >> ${CARGO_HOME}/config
|
||||||
|
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then
|
||||||
|
echo "[target.${BUILD_SYS}]" >> ${CARGO_HOME}/config
|
||||||
|
echo "linker = '${RUST_BUILD_CCLD}'" >> ${CARGO_HOME}/config
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
oe_cargo_fix_env () {
|
||||||
|
export CC="${RUST_TARGET_CC}"
|
||||||
|
export CXX="${RUST_TARGET_CXX}"
|
||||||
|
export CFLAGS="${CFLAGS}"
|
||||||
|
export CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export AR="${AR}"
|
||||||
|
export TARGET_CC="${RUST_TARGET_CC}"
|
||||||
|
export TARGET_CXX="${RUST_TARGET_CXX}"
|
||||||
|
export TARGET_CFLAGS="${CFLAGS}"
|
||||||
|
export TARGET_CXXFLAGS="${CXXFLAGS}"
|
||||||
|
export TARGET_AR="${AR}"
|
||||||
|
export HOST_CC="${RUST_BUILD_CC}"
|
||||||
|
export HOST_CXX="${RUST_BUILD_CXX}"
|
||||||
|
export HOST_CFLAGS="${BUILD_CFLAGS}"
|
||||||
|
export HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
|
||||||
|
export HOST_AR="${BUILD_AR}"
|
||||||
|
}
|
||||||
|
|
||||||
|
EXTRA_OECARGO_PATHS ??= ""
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS do_configure
|
||||||
+58
-22
@@ -1,10 +1,8 @@
|
|||||||
inherit rust
|
inherit rust
|
||||||
|
|
||||||
DEPENDS_append = " patchelf-native"
|
RDEPENDS_${PN}_append_class-target += "${RUSTLIB_DEP}"
|
||||||
RDEPENDS_${PN} += "${RUSTLIB_DEP}"
|
|
||||||
|
|
||||||
RUSTFLAGS += "-C crate_hash=${BB_TASKHASH}"
|
RUSTC_ARCHFLAGS += "-C opt-level=3 -g -L ${STAGING_DIR_HOST}/${rustlibdir} -C linker=${RUST_TARGET_CCLD}"
|
||||||
RUSTC_ARCHFLAGS += "-C opt-level=3 -g -L ${STAGING_DIR_HOST}/${rustlibdir}"
|
|
||||||
EXTRA_OEMAKE += 'RUSTC_ARCHFLAGS="${RUSTC_ARCHFLAGS}"'
|
EXTRA_OEMAKE += 'RUSTC_ARCHFLAGS="${RUSTC_ARCHFLAGS}"'
|
||||||
|
|
||||||
# Some libraries alias with the standard library but libstd is configured to
|
# Some libraries alias with the standard library but libstd is configured to
|
||||||
@@ -17,9 +15,9 @@ OVERLAP_LIBS = "\
|
|||||||
rand \
|
rand \
|
||||||
"
|
"
|
||||||
def get_overlap_deps(d):
|
def get_overlap_deps(d):
|
||||||
deps = d.getVar("DEPENDS", True).split()
|
deps = d.getVar("DEPENDS").split()
|
||||||
overlap_deps = []
|
overlap_deps = []
|
||||||
for o in d.getVar("OVERLAP_LIBS", True).split():
|
for o in d.getVar("OVERLAP_LIBS").split():
|
||||||
l = len([o for dep in deps if (o + '-rs' in dep)])
|
l = len([o for dep in deps if (o + '-rs' in dep)])
|
||||||
if l > 0:
|
if l > 0:
|
||||||
overlap_deps.append(o)
|
overlap_deps.append(o)
|
||||||
@@ -31,13 +29,51 @@ OVERLAP_DEPS = "${@get_overlap_deps(d)}"
|
|||||||
RUSTC_PREFER_DYNAMIC = "-C prefer-dynamic"
|
RUSTC_PREFER_DYNAMIC = "-C prefer-dynamic"
|
||||||
RUSTC_FLAGS += "${RUSTC_PREFER_DYNAMIC}"
|
RUSTC_FLAGS += "${RUSTC_PREFER_DYNAMIC}"
|
||||||
|
|
||||||
CRATE_NAME ?= "${@d.getVar('BPN', True).replace('-rs', '').replace('-', '_')}"
|
CRATE_NAME ?= "${@d.getVar('BPN').replace('-rs', '').replace('-', '_')}"
|
||||||
BINNAME ?= "${BPN}"
|
BINNAME ?= "${BPN}"
|
||||||
LIBNAME ?= "lib${CRATE_NAME}-rs"
|
LIBNAME ?= "lib${CRATE_NAME}-rs"
|
||||||
CRATE_TYPE ?= "dylib"
|
CRATE_TYPE ?= "dylib"
|
||||||
BIN_SRC ?= "${S}/src/main.rs"
|
BIN_SRC ?= "${S}/src/main.rs"
|
||||||
LIB_SRC ?= "${S}/src/lib.rs"
|
LIB_SRC ?= "${S}/src/lib.rs"
|
||||||
|
|
||||||
|
rustbindest ?= "${bindir}"
|
||||||
|
rustlibdest ?= "${rustlibdir}"
|
||||||
|
RUST_RPATH_ABS ?= "${rustlibdir}:${rustlib}"
|
||||||
|
|
||||||
|
def relative_rpaths(paths, base):
|
||||||
|
relpaths = set()
|
||||||
|
for p in paths.split(':'):
|
||||||
|
if p == base:
|
||||||
|
relpaths.add('$ORIGIN')
|
||||||
|
continue
|
||||||
|
relpaths.add(os.path.join('$ORIGIN', os.path.relpath(p, base)))
|
||||||
|
return '-rpath=' + ':'.join(relpaths) if len(relpaths) else ''
|
||||||
|
|
||||||
|
RUST_LIB_RPATH_FLAGS ?= "${@relative_rpaths(d.getVar('RUST_RPATH_ABS', True), d.getVar('rustlibdest', True))}"
|
||||||
|
RUST_BIN_RPATH_FLAGS ?= "${@relative_rpaths(d.getVar('RUST_RPATH_ABS', True), d.getVar('rustbindest', True))}"
|
||||||
|
|
||||||
|
def libfilename(d):
|
||||||
|
if d.getVar('CRATE_TYPE', True) == 'dylib':
|
||||||
|
return d.getVar('LIBNAME', True) + '.so'
|
||||||
|
else:
|
||||||
|
return d.getVar('LIBNAME', True) + '.rlib'
|
||||||
|
|
||||||
|
def link_args(d, bin):
|
||||||
|
linkargs = []
|
||||||
|
if bin:
|
||||||
|
rpaths = d.getVar('RUST_BIN_RPATH_FLAGS', False)
|
||||||
|
else:
|
||||||
|
rpaths = d.getVar('RUST_LIB_RPATH_FLAGS', False)
|
||||||
|
if d.getVar('CRATE_TYPE', True) == 'dylib':
|
||||||
|
linkargs.append('-soname')
|
||||||
|
linkargs.append(libfilename(d))
|
||||||
|
if len(rpaths):
|
||||||
|
linkargs.append(rpaths)
|
||||||
|
if len(linkargs):
|
||||||
|
return ' '.join(['-Wl,' + arg for arg in linkargs])
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
get_overlap_externs () {
|
get_overlap_externs () {
|
||||||
externs=
|
externs=
|
||||||
for dep in ${OVERLAP_DEPS}; do
|
for dep in ${OVERLAP_DEPS}; do
|
||||||
@@ -57,22 +93,22 @@ do_configure () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
oe_runrustc () {
|
oe_runrustc () {
|
||||||
|
export RUST_TARGET_PATH="${RUST_TARGET_PATH}"
|
||||||
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||||
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
oe_compile_rust_lib () {
|
oe_compile_rust_lib () {
|
||||||
[ "${CRATE_TYPE}" == "dylib" ] && suffix=so || suffix=rlib
|
|
||||||
rm -rf ${LIBNAME}.{rlib,so}
|
rm -rf ${LIBNAME}.{rlib,so}
|
||||||
local -a link_args
|
local -a link_args
|
||||||
if [ "${CRATE_TYPE}" == "dylib" ]; then
|
if [ -n '${@link_args(d, False)}' ]; then
|
||||||
link_args[0]="-C"
|
link_args[0]='-C'
|
||||||
link_args[1]="link-args=-Wl,-soname -Wl,${LIBNAME}.$suffix"
|
link_args[1]='link-args=${@link_args(d, False)}'
|
||||||
fi
|
fi
|
||||||
oe_runrustc $(get_overlap_externs) \
|
oe_runrustc $(get_overlap_externs) \
|
||||||
"${link_args[@]}" \
|
"${link_args[@]}" \
|
||||||
${LIB_SRC} \
|
${LIB_SRC} \
|
||||||
-o ${LIBNAME}.$suffix \
|
-o ${@libfilename(d)} \
|
||||||
--crate-name=${CRATE_NAME} --crate-type=${CRATE_TYPE} \
|
--crate-name=${CRATE_NAME} --crate-type=${CRATE_TYPE} \
|
||||||
"$@"
|
"$@"
|
||||||
}
|
}
|
||||||
@@ -80,20 +116,27 @@ oe_compile_rust_lib[vardeps] += "get_overlap_externs"
|
|||||||
|
|
||||||
oe_compile_rust_bin () {
|
oe_compile_rust_bin () {
|
||||||
rm -rf ${BINNAME}
|
rm -rf ${BINNAME}
|
||||||
oe_runrustc $(get_overlap_externs) ${BIN_SRC} -o ${BINNAME} "$@"
|
local -a link_args
|
||||||
|
if [ -n '${@link_args(d, True)}' ]; then
|
||||||
|
link_args[0]='-C'
|
||||||
|
link_args[1]='link-args=${@link_args(d, True)}'
|
||||||
|
fi
|
||||||
|
oe_runrustc $(get_overlap_externs) \
|
||||||
|
"${link_args[@]}" \
|
||||||
|
${BIN_SRC} -o ${BINNAME} "$@"
|
||||||
}
|
}
|
||||||
oe_compile_rust_bin[vardeps] += "get_overlap_externs"
|
oe_compile_rust_bin[vardeps] += "get_overlap_externs"
|
||||||
|
|
||||||
oe_install_rust_lib () {
|
oe_install_rust_lib () {
|
||||||
for lib in $(ls ${LIBNAME}.{so,rlib} 2>/dev/null); do
|
for lib in $(ls ${LIBNAME}.{so,rlib} 2>/dev/null); do
|
||||||
echo Installing $lib
|
echo Installing $lib
|
||||||
install -D -m 755 $lib ${D}/${rustlibdir}/$lib
|
install -D -m 755 $lib ${D}/${rustlibdest}/$lib
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
oe_install_rust_bin () {
|
oe_install_rust_bin () {
|
||||||
echo Installing ${BINNAME}
|
echo Installing ${BINNAME}
|
||||||
install -D -m 755 ${BINNAME} ${D}/${bindir}/${BINNAME}
|
install -D -m 755 ${BINNAME} ${D}/${rustbindest}/${BINNAME}
|
||||||
}
|
}
|
||||||
|
|
||||||
do_rust_bin_fixups() {
|
do_rust_bin_fixups() {
|
||||||
@@ -101,13 +144,6 @@ do_rust_bin_fixups() {
|
|||||||
echo "Strip rust note: $f"
|
echo "Strip rust note: $f"
|
||||||
${OBJCOPY} -R .note.rustc $f $f
|
${OBJCOPY} -R .note.rustc $f $f
|
||||||
done
|
done
|
||||||
|
|
||||||
for f in `find ${PKGD}`; do
|
|
||||||
file "$f" | grep -q ELF || continue
|
|
||||||
readelf -d "$f" | grep RUNPATH | grep -q rustlib || continue
|
|
||||||
echo "Set rpath:" "$f"
|
|
||||||
patchelf --set-rpath '$ORIGIN:'${rustlibdir}:${rustlib} "$f"
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
PACKAGE_PREPROCESS_FUNCS += "do_rust_bin_fixups"
|
PACKAGE_PREPROCESS_FUNCS += "do_rust_bin_fixups"
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,37 @@
|
|||||||
# Common variables used by all Rust builds
|
# Common variables used by all Rust builds
|
||||||
export rustlibdir = "${libdir}/rust"
|
export rustlibdir = "${libdir}/rust"
|
||||||
FILES_${PN} += "${rustlibdir}/*.so"
|
FILES_${PN} += "${rustlibdir}/*.so"
|
||||||
FILES_${PN}-dev += "${rustlibdir}/*.rlib"
|
FILES_${PN}-dev += "${rustlibdir}/*.rlib ${rustlibdir}/*.rmeta"
|
||||||
FILES_${PN}-dbg += "${rustlibdir}/.debug"
|
FILES_${PN}-dbg += "${rustlibdir}/.debug"
|
||||||
|
|
||||||
RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
|
RUSTLIB = "-L ${STAGING_LIBDIR}/rust"
|
||||||
RUSTFLAGS += "-C rpath ${RUSTLIB}"
|
RUST_DEBUG_REMAP = "--remap-path-prefix=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}"
|
||||||
|
RUSTFLAGS += "${RUSTLIB} ${RUST_DEBUG_REMAP}"
|
||||||
RUSTLIB_DEP ?= "libstd-rs"
|
RUSTLIB_DEP ?= "libstd-rs"
|
||||||
|
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-native = "glibc"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
# Responsible for taking Yocto triples and converting it to Rust triples
|
# Responsible for taking Yocto triples and converting it to Rust triples
|
||||||
|
|
||||||
def rust_base_triple(d, thing):
|
def rust_base_triple(d, thing):
|
||||||
'''
|
'''
|
||||||
Mangle bitbake's *_SYS into something that rust might support (see
|
Mangle bitbake's *_SYS into something that rust might support (see
|
||||||
@@ -18,11 +40,11 @@ def rust_base_triple(d, thing):
|
|||||||
Note that os is assumed to be some linux form
|
Note that os is assumed to be some linux form
|
||||||
'''
|
'''
|
||||||
|
|
||||||
arch = d.getVar('{}_ARCH'.format(thing), True)
|
arch = d.getVar('{}_ARCH'.format(thing))
|
||||||
# All the Yocto targets are Linux and are 'unknown'
|
# All the Yocto targets are Linux and are 'unknown'
|
||||||
vendor = "-unknown"
|
vendor = "-unknown"
|
||||||
os = d.getVar('{}_OS'.format(thing), True)
|
os = d.getVar('{}_OS'.format(thing))
|
||||||
libc = d.getVar('TCLIBC', True)
|
libc = determine_libc(d, thing)
|
||||||
|
|
||||||
# Prefix with a dash and convert glibc -> gnu
|
# Prefix with a dash and convert glibc -> gnu
|
||||||
if libc == "glibc":
|
if libc == "glibc":
|
||||||
@@ -74,9 +96,11 @@ RUST_TARGET_SYS = "${@rust_base_triple(d, 'TARGET')}"
|
|||||||
# use those commands based on the prefix.
|
# use those commands based on the prefix.
|
||||||
WRAPPER_DIR = "${WORKDIR}/wrapper"
|
WRAPPER_DIR = "${WORKDIR}/wrapper"
|
||||||
RUST_BUILD_CC = "${WRAPPER_DIR}/build-rust-cc"
|
RUST_BUILD_CC = "${WRAPPER_DIR}/build-rust-cc"
|
||||||
|
RUST_BUILD_CXX = "${WRAPPER_DIR}/build-rust-cxx"
|
||||||
RUST_BUILD_CCLD = "${WRAPPER_DIR}/build-rust-ccld"
|
RUST_BUILD_CCLD = "${WRAPPER_DIR}/build-rust-ccld"
|
||||||
RUST_BUILD_AR = "${WRAPPER_DIR}/build-rust-ar"
|
RUST_BUILD_AR = "${WRAPPER_DIR}/build-rust-ar"
|
||||||
RUST_TARGET_CC = "${WRAPPER_DIR}/target-rust-cc"
|
RUST_TARGET_CC = "${WRAPPER_DIR}/target-rust-cc"
|
||||||
|
RUST_TARGET_CXX = "${WRAPPER_DIR}/target-rust-cxx"
|
||||||
RUST_TARGET_CCLD = "${WRAPPER_DIR}/target-rust-ccld"
|
RUST_TARGET_CCLD = "${WRAPPER_DIR}/target-rust-ccld"
|
||||||
RUST_TARGET_AR = "${WRAPPER_DIR}/target-rust-ar"
|
RUST_TARGET_AR = "${WRAPPER_DIR}/target-rust-ar"
|
||||||
|
|
||||||
@@ -86,7 +110,7 @@ create_wrapper () {
|
|||||||
|
|
||||||
cat <<- EOF > "${file}"
|
cat <<- EOF > "${file}"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
$@ "\$@"
|
exec $@ "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x "${file}"
|
chmod +x "${file}"
|
||||||
}
|
}
|
||||||
@@ -97,15 +121,19 @@ create_wrapper () {
|
|||||||
do_rust_create_wrappers () {
|
do_rust_create_wrappers () {
|
||||||
mkdir -p "${WRAPPER_DIR}"
|
mkdir -p "${WRAPPER_DIR}"
|
||||||
|
|
||||||
# Yocto Build / Rust Host compiler
|
# Yocto Build / Rust Host C compiler
|
||||||
create_wrapper "${RUST_BUILD_CC}" "${BUILD_CC}"
|
create_wrapper "${RUST_BUILD_CC}" "${BUILD_CC}"
|
||||||
|
# Yocto Build / Rust Host C++ compiler
|
||||||
|
create_wrapper "${RUST_BUILD_CXX}" "${BUILD_CXX}"
|
||||||
# Yocto Build / Rust Host linker
|
# Yocto Build / Rust Host linker
|
||||||
create_wrapper "${RUST_BUILD_CCLD}" "${BUILD_CCLD}" "${BUILD_LDFLAGS}"
|
create_wrapper "${RUST_BUILD_CCLD}" "${BUILD_CCLD}" "${BUILD_LDFLAGS}"
|
||||||
# Yocto Build / Rust Host archiver
|
# Yocto Build / Rust Host archiver
|
||||||
create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}"
|
create_wrapper "${RUST_BUILD_AR}" "${BUILD_AR}"
|
||||||
|
|
||||||
# Yocto Target / Rust Target compiler
|
# Yocto Target / Rust Target C compiler
|
||||||
create_wrapper "${RUST_TARGET_CC}" "${CC}"
|
create_wrapper "${RUST_TARGET_CC}" "${CC}"
|
||||||
|
# Yocto Target / Rust Target C++ compiler
|
||||||
|
create_wrapper "${RUST_TARGET_CXX}" "${CXX}"
|
||||||
# Yocto Target / Rust Target linker
|
# Yocto Target / Rust Target linker
|
||||||
create_wrapper "${RUST_TARGET_CCLD}" "${CCLD}" "${LDFLAGS}"
|
create_wrapper "${RUST_TARGET_CCLD}" "${CCLD}" "${LDFLAGS}"
|
||||||
# Yocto Target / Rust Target archiver
|
# Yocto Target / Rust Target archiver
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ def rust_base_dep(d):
|
|||||||
# Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
|
# Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to
|
||||||
# use rust instead of gcc
|
# use rust instead of gcc
|
||||||
deps = ""
|
deps = ""
|
||||||
if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS', True):
|
if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'):
|
||||||
if (d.getVar('HOST_SYS', True) != d.getVar('BUILD_SYS', True)):
|
if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
|
||||||
deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"
|
deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}"
|
||||||
else:
|
else:
|
||||||
deps += " rust-native"
|
deps += " rust-native"
|
||||||
@@ -42,3 +42,4 @@ rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/li
|
|||||||
rustlib_src="${prefix}/lib/${rustlib_suffix}"
|
rustlib_src="${prefix}/lib/${rustlib_suffix}"
|
||||||
# Host sysroot standard library path
|
# Host sysroot standard library path
|
||||||
rustlib="${libdir}/${rustlib_suffix}"
|
rustlib="${libdir}/${rustlib_suffix}"
|
||||||
|
rustlib_class-native="${libdir}/rustlib/${BUILD_SYS}/lib"
|
||||||
|
|||||||
@@ -8,12 +8,11 @@ BBFILES ?= ""
|
|||||||
BBLAYERS ?= " \
|
BBLAYERS ?= " \
|
||||||
##OEROOT##/meta-rust \
|
##OEROOT##/meta-rust \
|
||||||
##OEROOT##/meta \
|
##OEROOT##/meta \
|
||||||
##OEROOT##/meta-yocto \
|
##OEROOT##/meta-poky \
|
||||||
##OEROOT##/meta-yocto-bsp \
|
##OEROOT##/meta-yocto-bsp \
|
||||||
##OEROOT##/meta-openembedded/meta-oe \
|
##OEROOT##/meta-openembedded/meta-oe \
|
||||||
##OEROOT##/meta-openembedded/meta-networking \
|
##OEROOT##/meta-openembedded/meta-networking \
|
||||||
##OEROOT##/meta-openembedded/meta-python \
|
##OEROOT##/meta-openembedded/meta-python \
|
||||||
##OEROOT##/meta-openembedded/meta-ruby \
|
|
||||||
"
|
"
|
||||||
BBLAYERS_NON_REMOVABLE ?= " \
|
BBLAYERS_NON_REMOVABLE ?= " \
|
||||||
##OEROOT##/meta \
|
##OEROOT##/meta \
|
||||||
|
|||||||
@@ -8,5 +8,8 @@ BBFILE_COLLECTIONS += "rust-layer"
|
|||||||
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
|
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_rust-layer = "7"
|
BBFILE_PRIORITY_rust-layer = "7"
|
||||||
|
|
||||||
|
LAYERDEPENDS_rust-layer = "core openembedded-layer"
|
||||||
|
LAYERSERIES_COMPAT_rust-layer = "rocko sumo thud warrior zeus dunfell"
|
||||||
|
|
||||||
# Override security flags
|
# Override security flags
|
||||||
require conf/distro/include/rust_security_flags.inc
|
require conf/distro/include/rust_security_flags.inc
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ BB_DISKMON_DIRS = "\
|
|||||||
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
|
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
|
||||||
#file://.* file:///some/local/dir/sstate/PATH"
|
#file://.* file:///some/local/dir/sstate/PATH"
|
||||||
|
|
||||||
SSTATE_MIRRORS ?= "file://.* http://build-cache.asterius.io/morty/sstate-cache/PATH;downloadfilename=PATH \n"
|
SSTATE_MIRRORS ?= "file://.* http://build-cache.asterius.io/master/sstate-cache/PATH;downloadfilename=PATH \n"
|
||||||
|
|
||||||
SOURCE_MIRROR_URL ?= "http://build-cache.asterius.io/downloads/"
|
SOURCE_MIRROR_URL ?= "http://build-cache.asterius.io/downloads/"
|
||||||
INHERIT += "own-mirrors rm_work"
|
INHERIT += "own-mirrors rm_work"
|
||||||
|
|||||||
+2
-2
@@ -107,7 +107,7 @@ class Crate(Wget):
|
|||||||
save_cwd = os.getcwd()
|
save_cwd = os.getcwd()
|
||||||
os.chdir(rootdir)
|
os.chdir(rootdir)
|
||||||
|
|
||||||
pn = d.getVar('BPN', True)
|
pn = d.getVar('BPN')
|
||||||
if pn == ud.parm.get('name'):
|
if pn == ud.parm.get('name'):
|
||||||
cmd = "tar -xz --no-same-owner -f %s" % thefile
|
cmd = "tar -xz --no-same-owner -f %s" % thefile
|
||||||
else:
|
else:
|
||||||
@@ -127,7 +127,7 @@ class Crate(Wget):
|
|||||||
metadata['package'] = tarhash
|
metadata['package'] = tarhash
|
||||||
|
|
||||||
# path it
|
# path it
|
||||||
path = d.getVar('PATH', True)
|
path = d.getVar('PATH')
|
||||||
if path:
|
if path:
|
||||||
cmd = "PATH=\"%s\" %s" % (path, cmd)
|
cmd = "PATH=\"%s\" %s" % (path, cmd)
|
||||||
bb.note("Unpacking %s to %s/" % (thefile, os.getcwd()))
|
bb.note("Unpacking %s to %s/" % (thefile, os.getcwd()))
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
DESCRIPTION = "Fast multiple substring searching with finite state machines."
|
|
||||||
HOMEPAGE = "https://github.com/BurntSushi/aho-corasick"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=8d0d0aa488af0ab9aafa3b85a7fc8e12"
|
|
||||||
DEPENDS = "memchr-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/BurntSushi/aho-corasick.git;protocol=https"
|
|
||||||
SRCREV = "e1bca33dcc060d587e802320a79cbb035f37f8fa"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
DESCRIPTION = "A macro to generate structures which behave like bitflags."
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang-nursery/bitflags"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang-nursery/bitflags.git;protocol=https"
|
|
||||||
SRCREV = "41aa413a7c30d70b93b44ab5447276c381ef249e"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/src/lib.rs"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
DESCRIPTION = "A (mostly) pure-Rust implementation of various common cryptographic algorithms."
|
|
||||||
HOMEPAGE = "https://github.com/DaGenix/rust-crypto/"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=4311034aa04489226c1fc3f816dbfb5a \
|
|
||||||
file://LICENSE-APACHE;md5=a02fef6dccf840318474c108a8281b77 \
|
|
||||||
"
|
|
||||||
DEPENDS = "\
|
|
||||||
libc-rs \
|
|
||||||
time-rs \
|
|
||||||
rand-rs \
|
|
||||||
rustc-serialize-rs \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/DaGenix/rust-crypto.git;protocol=https"
|
|
||||||
SRCREV = "5571cb41690b9cee12025192393ea7df0eddc21b"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
DESCRIPTION = "DBus binding for rust"
|
|
||||||
HOMEPAGE = "https://github.com/diwic/dbus-rs"
|
|
||||||
LICENSE = "Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d2794c0df5b907fdace235a619d80314"
|
|
||||||
DEPENDS = "libc-rs dbus"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/diwic/dbus-rs.git;protocol=https"
|
|
||||||
SRCREV = "d23c8b7fecd5a8e82131893250a5ac376799faff"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
DESCRIPTION = "A copy of libstd's debug builders for use before they stabilize"
|
|
||||||
HOMEPAGE = "https://github.com/sfackler/rust-debug-builders"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "file://Cargo.toml;md5=97a131dc4ae910d242387f2c9d1a2ce8"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/sfackler/rust-debug-builders.git;protocol=https"
|
|
||||||
SRCREV = "c6943b72c7808ddaa151d08b824525cc7420cb9b"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
DESCRIPTION = "getopts-like option parsing"
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang/getopts"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
DEPENDS = "log-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/getopts.git;protocol=https"
|
|
||||||
SRCREV = "a13c62b7d860b6d370129ebb972bf5e0373c5be7"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
DESCRIPTION = "A macro for declaring lazily evaluated statics in Rust."
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang-nursery/lazy-static.rs"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE;md5=5795ddb4df1d696d439b6667081cffc9 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang-nursery/lazy-static.rs.git;protocol=https"
|
|
||||||
SRCREV = "ffe65c818474f863945ca535c0e53f3b8b848ff7"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/src/lib.rs"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
DESCRIPTION = "A Rust library with native bindings to the types and functions commonly found on various systems, including libc."
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang/libc"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/libc.git;protocol=https"
|
|
||||||
SRCREV = "f54b9c90ee68889181472d4d4a5dd9e43d0e5318"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/src/lib.rs"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib --cfg feature='"cargo-build"'
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
DESCRIPTION = "An logging implementation for `log` which is configured via an environment variable"
|
|
||||||
DEPENDS = "regex-rs log-rs"
|
|
||||||
|
|
||||||
require log.inc
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/env/src/lib.rs"
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
DESCRIPTION = "A Rust library providing a lightweight logging facade"
|
|
||||||
DEPENDS = "libc-rs"
|
|
||||||
|
|
||||||
require log.inc
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
HOMEPAGE = "https://github.com/rust-lang/log"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/log.git;protocol=https"
|
|
||||||
SRCREV = "5453e16166ec451afc9738978ca01f162127ebbe"
|
|
||||||
PV = "0.3.1"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
DESCRIPTION = "Safe interface to memchr"
|
|
||||||
HOMEPAGE = "https://github.com/BurntSushi/rust-memchr"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=8d0d0aa488af0ab9aafa3b85a7fc8e12"
|
|
||||||
DEPENDS = "libc-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/BurntSushi/rust-memchr.git;protocol=https"
|
|
||||||
SRCREV = "4f9a13f95e6e00f2847c093c56b41b9c1d58d3c4"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
require num.inc
|
|
||||||
|
|
||||||
DEPENDS += "num-traits"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/integer/src/lib.rs"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
require num.inc
|
|
||||||
|
|
||||||
DEPENDS += "num-traits"
|
|
||||||
DEPENDS += "num-integer"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/iter/src/lib.rs"
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
require num.inc
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/traits/src/lib.rs"
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
DESCRIPTION = "A collection of numeric types and traits for Rust, including bigint, complex, rational, range iterators, generic integers, and more!"
|
|
||||||
HOMEPAGE = "https://github.com/rust-num/num"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-num/num.git;protocol=https"
|
|
||||||
SRCREV = "d9f08cb148cc686ec407c1e42fbd4536cde6ac82"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
require num.inc
|
|
||||||
|
|
||||||
DEPENDS += "\
|
|
||||||
num-traits \
|
|
||||||
num-integer \
|
|
||||||
num-iter \
|
|
||||||
"
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/src/lib.rs"
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
DESCRIPTION = "Random number generators and other randomness functionality."
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang/rand"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
DEPENDS = "libc-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/rand.git;protocol=https"
|
|
||||||
SRCREV = "f872fda5fb8fb899a837ee9eee0332076a8f5300"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
DESCRIPTION = "An implementation of regular expressions for Rust"
|
|
||||||
DEPENDS = "\
|
|
||||||
aho-corasick-rs \
|
|
||||||
memchr-rs \
|
|
||||||
regex-syntax-rs \
|
|
||||||
"
|
|
||||||
|
|
||||||
require regex.inc
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
DESCRIPTION = "A regular expression parser"
|
|
||||||
|
|
||||||
require regex.inc
|
|
||||||
|
|
||||||
LIB_SRC = "${S}/regex-syntax/src/lib.rs"
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
HOMEPAGE = "https://github.com/rust-lang/regex"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/regex.git;protocol=https"
|
|
||||||
SRCREV = "c9e6781a6845478aa2d8ebc86972755f854fdbe0"
|
|
||||||
PV = "0.1.38"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
DESCRIPTION = "Generic serialization/deserialization support"
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang/rustc-serialize"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/rustc-serialize.git;protocol=https"
|
|
||||||
SRCREV = "64b38a1f31a9af6eabf2894437aa5ccc3e457e68"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
DESCRIPTION = "Utilities for working with time-related functions in Rust"
|
|
||||||
HOMEPAGE = "https://github.com/rust-lang/time"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
"
|
|
||||||
DEPENDS = "libc-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/rust-lang/time.git;protocol=https"
|
|
||||||
SRCREV = "32b212b877b836dbfdc97af5674d91672e70ecbd"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
rm -rf time_helpers.o libtimehelpers.a
|
|
||||||
${CC} ${S}/src/time_helpers.c -fPIC -c -o time_helpers.o
|
|
||||||
${AR} rcs libtime_helpers.a time_helpers.o
|
|
||||||
oe_compile_rust_lib -L native=$PWD -l static=time_helpers
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
DESCRIPTION = "FFI bindings to libudev"
|
|
||||||
HOMEPAGE = "https://github.com/dcuddeback/libudev-sys"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bbd2acd29c4ba5d4591b03e2757c04a3"
|
|
||||||
DEPENDS = "libudev-sys-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/dcuddeback/libudev-rs.git;protocol=https"
|
|
||||||
SRCREV = "d55763c626790e2e8724947503238731843a969a"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
DESCRIPTION = "FFI bindings to libudev"
|
|
||||||
HOMEPAGE = "https://github.com/dcuddeback/libudev-sys"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bbd2acd29c4ba5d4591b03e2757c04a3"
|
|
||||||
|
|
||||||
DEPENDS += "libudev-sys-rs"
|
|
||||||
DEPENDS += "libc-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/dcuddeback/libudev-rs.git;protocol=https"
|
|
||||||
SRCREV = "3da791245f206d0cf5a856531c574b8646b0f059"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
DESCRIPTION = "FFI bindings to libudev"
|
|
||||||
HOMEPAGE = "https://github.com/dcuddeback/libudev-sys"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bbd2acd29c4ba5d4591b03e2757c04a3"
|
|
||||||
DEPENDS = "libc-rs udev"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/dcuddeback/libudev-sys.git;protocol=https"
|
|
||||||
SRCREV = "14c24afc61e3315dffddab2c7f36999a16a002d8"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
RUSTC_FLAGS += "-ludev"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
DESCRIPTION = "FFI bindings to libudev"
|
|
||||||
HOMEPAGE = "https://github.com/dcuddeback/libudev-sys"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bbd2acd29c4ba5d4591b03e2757c04a3"
|
|
||||||
DEPENDS = "libc-rs udev"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/dcuddeback/libudev-sys.git;protocol=https"
|
|
||||||
SRCREV = "c49163f87d4d109ec21bcf8f8c51db560ed31b22"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
RUSTC_FLAGS += "-ludev"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
DESCRIPTION = "Unix domain socket bindings for Rust"
|
|
||||||
HOMEPAGE = "https://github.com/sfackler/rust-unix-socket"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bde86283c1fd74e84ebc3cf6dd7011d0"
|
|
||||||
DEPENDS = "libc-rs debug-builders-rs"
|
|
||||||
|
|
||||||
inherit rust-bin
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/sfackler/rust-unix-socket.git;protocol=https"
|
|
||||||
SRCREV = "d0f47ae888267a718072c3be5eed42ba1f637097"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_compile_rust_lib
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
oe_install_rust_lib
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 44cf21036646e4849e9f8566db7decb7da917394 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 8238380861d9..ced1defea459 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -24,7 +24,7 @@ bytesize = "1.0"
|
||||||
|
crates-io = { path = "src/crates-io", version = "0.23" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
crypto-hash = "0.3.1"
|
||||||
|
-curl = { version = "0.4.19", features = ['http2'] }
|
||||||
|
+curl = { version = "0.4.19" }
|
||||||
|
curl-sys = "0.4.15"
|
||||||
|
env_logger = "0.6.0"
|
||||||
|
pretty_env_logger = { version = "0.3", optional = true }
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
From 42e65192b6f7520b7a05924856e00600961f6758 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 c3fcacf5..bd6ec50b 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -24,7 +24,7 @@ bytesize = "1.0"
|
||||||
|
crates-io = { path = "src/crates-io", version = "0.25" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
crypto-hash = "0.3.1"
|
||||||
|
-curl = { version = "0.4.21", features = ['http2'] }
|
||||||
|
+curl = { version = "0.4.21" }
|
||||||
|
curl-sys = "0.4.18"
|
||||||
|
env_logger = "0.6.0"
|
||||||
|
pretty_env_logger = { version = "0.3", optional = true }
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 0e2384133664ebeb548b782ad763c3a627c1bc66 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
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/cargo/Cargo.toml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index d15aa2513..ba9c77d25 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -24,7 +24,7 @@ bytesize = "1.0"
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.26" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
crypto-hash = "0.3.1"
|
||||||
|
-curl = { version = "0.4.21", features = ['http2'] }
|
||||||
|
+curl = { version = "0.4.21" }
|
||||||
|
curl-sys = "0.4.18"
|
||||||
|
env_logger = "0.6.0"
|
||||||
|
pretty_env_logger = { version = "0.3", optional = true }
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From 0e2384133664ebeb548b782ad763c3a627c1bc66 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
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/cargo/Cargo.toml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index d15aa2513..ba9c77d25 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -24,7 +24,7 @@ bytesize = "1.0"
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.28" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
crypto-hash = "0.3.1"
|
||||||
|
-curl = { version = "0.4.21", features = ['http2'] }
|
||||||
|
+curl = { version = "0.4.21" }
|
||||||
|
curl-sys = "0.4.18"
|
||||||
|
env_logger = "0.6.0"
|
||||||
|
pretty_env_logger = { version = "0.3", optional = true }
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From f0496287fb754e5b8dd1956f6a0addb55f3b06f5 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
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/cargo/Cargo.toml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index eea1f42a2..5159890f4 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1" }
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.29" }
|
||||||
|
crossbeam-utils = "0.6"
|
||||||
|
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.3", optional = true }
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
From e06774b9f2be4ff1f3404f2f10e25f99e3f3455b 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
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tools/cargo/Cargo.toml | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index fc9b69c03..2f4d3a949 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -25,7 +25,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1" }
|
||||||
|
crates-io = { path = "crates/crates-io", version = "0.30" }
|
||||||
|
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.3", optional = true }
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
CARGO_SNAPSHOT = "2016-09-01/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz;downloadfilename=cargo-nightly-x86_64-unknown-linux-gnu-2016-09-01.tar.gz"
|
|
||||||
SRC_URI[md5sum] = "d41ebf79290a7c9c9e5df87cb27e5091"
|
|
||||||
SRC_URI[sha256sum] = "365e5cad79512d244b8ced32f8e5b86a710fc6c17f0d0f5f744b8058ef6dc756"
|
|
||||||
@@ -1,56 +1,43 @@
|
|||||||
inherit cargo
|
SUMMARY = "Cargo, a package manager for Rust."
|
||||||
inherit patch
|
HOMEPAGE = "https://crates.io"
|
||||||
|
|
||||||
SUMMARY = "Cargo downloads your Rust project's dependencies and builds your project"
|
|
||||||
HOMEPAGE = "http://crates.io"
|
|
||||||
SECTION = "devel"
|
|
||||||
LICENSE = "MIT | Apache-2.0"
|
LICENSE = "MIT | Apache-2.0"
|
||||||
|
SECTION = "devel"
|
||||||
|
|
||||||
DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2"
|
DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2"
|
||||||
|
|
||||||
SRC_URI = "\
|
LIC_FILES_CHKSUM = " \
|
||||||
http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \
|
file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d \
|
||||||
"
|
"
|
||||||
|
|
||||||
B = "${S}"
|
SRC_URI += "file://0001-Disable-http2.patch"
|
||||||
|
|
||||||
# Used in libgit2-sys's build.rs, needed for pkg-config to be used
|
S = "${RUSTSRC}/src/tools/cargo"
|
||||||
export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
|
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
|
||||||
|
|
||||||
# cargo's configure doesn't recognize --disable-static, so remove it.
|
inherit cargo
|
||||||
DISABLE_STATIC = ""
|
|
||||||
|
|
||||||
do_configure () {
|
do_cargo_setup_snapshot () {
|
||||||
"${S}/configure" \
|
${WORKDIR}/rust-snapshot-components/${CARGO_SNAPSHOT}/install.sh --prefix="${WORKDIR}/${CARGO_SNAPSHOT}" --disable-ldconfig
|
||||||
"--prefix=${prefix}" \
|
|
||||||
"--build=${BUILD_SYS}" \
|
|
||||||
"--host=${HOST_SYS}" \
|
|
||||||
"--target=${TARGET_SYS}" \
|
|
||||||
"--localstatedir=${localstatedir}" \
|
|
||||||
"--sysconfdir=${sysconfdir}" \
|
|
||||||
"--datadir=${datadir}" \
|
|
||||||
"--infodir=${infodir}" \
|
|
||||||
"--mandir=${mandir}" \
|
|
||||||
"--libdir=${libdir}" \
|
|
||||||
"--disable-verify-install" \
|
|
||||||
${EXTRA_OECONF} \
|
|
||||||
|| die "Could not configure cargo"
|
|
||||||
|
|
||||||
cargo_do_configure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_compile () {
|
addtask cargo_setup_snapshot after do_unpack before do_configure
|
||||||
oe_cargo_fix_env
|
do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}"
|
||||||
|
|
||||||
rm -rf target/snapshot
|
do_compile_prepend () {
|
||||||
mkdir -p target
|
export RUSTC_BOOTSTRAP="1"
|
||||||
cp -R ${WORKDIR}/cargo-nightly-x86_64-unknown-linux-gnu/cargo target/snapshot
|
|
||||||
|
|
||||||
oe_runmake VERBOSE=1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
oe_runmake prepare-image-${TARGET_SYS} IMGDIR_${TARGET_SYS}="${D}${prefix}"
|
install -d "${D}${bindir}"
|
||||||
|
install -m 755 "${RUSTSRC}/target/${CARGO_TARGET_SUBDIR}/cargo" "${D}${bindir}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Needed for pkg-config to be used
|
||||||
|
export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
|
||||||
|
export LIBSSH2_SYS_USE_PKG_CONFIG = "1"
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
BBCLASSEXTEND = "native"
|
||||||
|
|
||||||
|
# When building cargo-native we don't have a built cargo to use so we must use
|
||||||
|
# the snapshot to bootstrap the build of cargo
|
||||||
|
CARGO_class-native = "${WORKDIR}/${CARGO_SNAPSHOT}/bin/cargo"
|
||||||
|
|||||||
@@ -1,86 +0,0 @@
|
|||||||
require cargo-snapshot.inc
|
|
||||||
require cargo.inc
|
|
||||||
|
|
||||||
SRC_URI += " \
|
|
||||||
git://github.com/rust-lang/cargo.git;protocol=https;name=cargo \
|
|
||||||
crate://crates.io/advapi32-sys/0.2.0 \
|
|
||||||
crate://crates.io/aho-corasick/0.5.2 \
|
|
||||||
crate://crates.io/bitflags/0.1.1 \
|
|
||||||
crate://crates.io/bitflags/0.7.0 \
|
|
||||||
crate://crates.io/bufstream/0.1.2 \
|
|
||||||
crate://crates.io/cfg-if/0.1.0 \
|
|
||||||
crate://crates.io/cmake/0.1.17 \
|
|
||||||
crate://crates.io/crossbeam/0.2.9 \
|
|
||||||
crate://crates.io/curl-sys/0.2.1 \
|
|
||||||
crate://crates.io/curl/0.3.2 \
|
|
||||||
crate://crates.io/docopt/0.6.82 \
|
|
||||||
crate://crates.io/env_logger/0.3.4 \
|
|
||||||
crate://crates.io/filetime/0.1.10 \
|
|
||||||
crate://crates.io/flate2/0.2.14 \
|
|
||||||
crate://crates.io/fs2/0.2.5 \
|
|
||||||
crate://crates.io/gcc/0.3.32 \
|
|
||||||
crate://crates.io/gdi32-sys/0.2.0 \
|
|
||||||
crate://crates.io/git2-curl/0.5.0 \
|
|
||||||
crate://crates.io/git2/0.4.4 \
|
|
||||||
crate://crates.io/glob/0.2.11 \
|
|
||||||
crate://crates.io/hamcrest/0.1.0 \
|
|
||||||
crate://crates.io/idna/0.1.0 \
|
|
||||||
crate://crates.io/kernel32-sys/0.2.2 \
|
|
||||||
crate://crates.io/lazy_static/0.2.1 \
|
|
||||||
crate://crates.io/libc/0.2.15 \
|
|
||||||
crate://crates.io/libgit2-sys/0.4.5 \
|
|
||||||
crate://crates.io/libressl-pnacl-sys/2.1.6 \
|
|
||||||
crate://crates.io/libssh2-sys/0.1.38 \
|
|
||||||
crate://crates.io/libz-sys/1.0.5 \
|
|
||||||
crate://crates.io/log/0.3.6 \
|
|
||||||
crate://crates.io/matches/0.1.2 \
|
|
||||||
crate://crates.io/memchr/0.1.11 \
|
|
||||||
crate://crates.io/miniz-sys/0.1.7 \
|
|
||||||
crate://crates.io/miow/0.1.3 \
|
|
||||||
crate://crates.io/net2/0.2.26 \
|
|
||||||
crate://crates.io/nom/1.2.4 \
|
|
||||||
crate://crates.io/num-bigint/0.1.33 \
|
|
||||||
crate://crates.io/num-complex/0.1.33 \
|
|
||||||
crate://crates.io/num-integer/0.1.32 \
|
|
||||||
crate://crates.io/num-iter/0.1.32 \
|
|
||||||
crate://crates.io/num-rational/0.1.32 \
|
|
||||||
crate://crates.io/num-traits/0.1.34 \
|
|
||||||
crate://crates.io/num/0.1.34 \
|
|
||||||
crate://crates.io/num_cpus/1.0.0 \
|
|
||||||
crate://crates.io/openssl-sys-extras/0.7.14 \
|
|
||||||
crate://crates.io/openssl-sys/0.7.14 \
|
|
||||||
crate://crates.io/openssl/0.7.14 \
|
|
||||||
crate://crates.io/pkg-config/0.3.8 \
|
|
||||||
crate://crates.io/pnacl-build-helper/1.4.10 \
|
|
||||||
crate://crates.io/rand/0.3.14 \
|
|
||||||
crate://crates.io/regex-syntax/0.3.4 \
|
|
||||||
crate://crates.io/regex/0.1.73 \
|
|
||||||
crate://crates.io/rustc-serialize/0.3.19 \
|
|
||||||
crate://crates.io/semver/0.2.3 \
|
|
||||||
crate://crates.io/strsim/0.3.0 \
|
|
||||||
crate://crates.io/tar/0.4.8 \
|
|
||||||
crate://crates.io/tempdir/0.3.5 \
|
|
||||||
crate://crates.io/term/0.4.4 \
|
|
||||||
crate://crates.io/thread-id/2.0.0 \
|
|
||||||
crate://crates.io/thread_local/0.2.6 \
|
|
||||||
crate://crates.io/toml/0.2.0 \
|
|
||||||
crate://crates.io/unicode-bidi/0.2.3 \
|
|
||||||
crate://crates.io/unicode-normalization/0.1.2 \
|
|
||||||
crate://crates.io/url/1.2.0 \
|
|
||||||
crate://crates.io/user32-sys/0.2.0 \
|
|
||||||
crate://crates.io/utf8-ranges/0.1.3 \
|
|
||||||
crate://crates.io/winapi-build/0.1.1 \
|
|
||||||
crate://crates.io/winapi/0.2.8 \
|
|
||||||
crate://crates.io/ws2_32-sys/0.2.1 \
|
|
||||||
"
|
|
||||||
# Compatible with Rust 1.12.1
|
|
||||||
# https://static.rust-lang.org/dist/channel-rust-1.12.1.toml
|
|
||||||
SRCREV_cargo = "109cb7c33d426044d141457049bd0fffaca1327c"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM ="\
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
|
||||||
"
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
require cargo-snapshot.inc
|
|
||||||
require cargo.inc
|
|
||||||
|
|
||||||
EXTRA_OECONF += "--cargo=${WORKDIR}/cargo-nightly-x86_64-unknown-linux-gnu/cargo/bin/cargo"
|
|
||||||
|
|
||||||
SRC_URI += " \
|
|
||||||
git://github.com/rust-lang/cargo.git;protocol=https;name=cargo;branch=rust-1.15.1 \
|
|
||||||
crate://crates.io/advapi32-sys/0.2.0 \
|
|
||||||
crate://crates.io/aho-corasick/0.5.3 \
|
|
||||||
crate://crates.io/bitflags/0.7.0 \
|
|
||||||
crate://crates.io/bufstream/0.1.2 \
|
|
||||||
crate://crates.io/cfg-if/0.1.0 \
|
|
||||||
crate://crates.io/cmake/0.1.19 \
|
|
||||||
crate://crates.io/crossbeam/0.2.10 \
|
|
||||||
crate://crates.io/curl-sys/0.3.6 \
|
|
||||||
crate://crates.io/curl/0.4.1 \
|
|
||||||
crate://crates.io/docopt/0.6.86 \
|
|
||||||
crate://crates.io/env_logger/0.3.5 \
|
|
||||||
crate://crates.io/filetime/0.1.10 \
|
|
||||||
crate://crates.io/flate2/0.2.14 \
|
|
||||||
crate://crates.io/fs2/0.3.0 \
|
|
||||||
crate://crates.io/gcc/0.3.39 \
|
|
||||||
crate://crates.io/gdi32-sys/0.2.0 \
|
|
||||||
crate://crates.io/git2-curl/0.7.0 \
|
|
||||||
crate://crates.io/git2/0.6.3 \
|
|
||||||
crate://crates.io/glob/0.2.11 \
|
|
||||||
crate://crates.io/hamcrest/0.1.1 \
|
|
||||||
crate://crates.io/idna/0.1.0 \
|
|
||||||
crate://crates.io/kernel32-sys/0.2.2 \
|
|
||||||
crate://crates.io/lazy_static/0.2.2 \
|
|
||||||
crate://crates.io/libc/0.2.18 \
|
|
||||||
crate://crates.io/libgit2-sys/0.6.5 \
|
|
||||||
crate://crates.io/libssh2-sys/0.2.4 \
|
|
||||||
crate://crates.io/libz-sys/1.0.10 \
|
|
||||||
crate://crates.io/log/0.3.6 \
|
|
||||||
crate://crates.io/matches/0.1.4 \
|
|
||||||
crate://crates.io/memchr/0.1.11 \
|
|
||||||
crate://crates.io/miniz-sys/0.1.7 \
|
|
||||||
crate://crates.io/miow/0.1.3 \
|
|
||||||
crate://crates.io/net2/0.2.26 \
|
|
||||||
crate://crates.io/num-bigint/0.1.35 \
|
|
||||||
crate://crates.io/num-complex/0.1.35 \
|
|
||||||
crate://crates.io/num-integer/0.1.32 \
|
|
||||||
crate://crates.io/num-iter/0.1.32 \
|
|
||||||
crate://crates.io/num-rational/0.1.35 \
|
|
||||||
crate://crates.io/num-traits/0.1.36 \
|
|
||||||
crate://crates.io/num/0.1.36 \
|
|
||||||
crate://crates.io/num_cpus/1.1.0 \
|
|
||||||
crate://crates.io/openssl-probe/0.1.0 \
|
|
||||||
crate://crates.io/openssl-sys/0.9.1 \
|
|
||||||
crate://crates.io/openssl/0.9.1 \
|
|
||||||
crate://crates.io/pkg-config/0.3.8 \
|
|
||||||
crate://crates.io/psapi-sys/0.1.0 \
|
|
||||||
crate://crates.io/rand/0.3.14 \
|
|
||||||
crate://crates.io/regex-syntax/0.3.9 \
|
|
||||||
crate://crates.io/regex/0.1.80 \
|
|
||||||
crate://crates.io/rustc-serialize/0.3.21 \
|
|
||||||
crate://crates.io/semver-parser/0.6.1 \
|
|
||||||
crate://crates.io/semver/0.5.1 \
|
|
||||||
crate://crates.io/strsim/0.5.1 \
|
|
||||||
crate://crates.io/tar/0.4.9 \
|
|
||||||
crate://crates.io/tempdir/0.3.5 \
|
|
||||||
crate://crates.io/term/0.4.4 \
|
|
||||||
crate://crates.io/thread-id/2.0.0 \
|
|
||||||
crate://crates.io/thread_local/0.2.7 \
|
|
||||||
crate://crates.io/toml/0.2.1 \
|
|
||||||
crate://crates.io/unicode-bidi/0.2.3 \
|
|
||||||
crate://crates.io/unicode-normalization/0.1.2 \
|
|
||||||
crate://crates.io/url/1.2.3 \
|
|
||||||
crate://crates.io/user32-sys/0.2.0 \
|
|
||||||
crate://crates.io/utf8-ranges/0.1.3 \
|
|
||||||
crate://crates.io/winapi-build/0.1.1 \
|
|
||||||
crate://crates.io/winapi/0.2.8 \
|
|
||||||
crate://crates.io/ws2_32-sys/0.2.1 \
|
|
||||||
"
|
|
||||||
|
|
||||||
SRCREV_cargo = "6e0c18cccc8b0c06fba8a8d76486f81a792fb420"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM=" \
|
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
|
||||||
"
|
|
||||||
@@ -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=1836efb2eb779966696f473ee8540542 \
|
||||||
|
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
||||||
|
"
|
||||||
@@ -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 \
|
||||||
|
"
|
||||||
@@ -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 \
|
||||||
|
"
|
||||||
@@ -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 \
|
||||||
|
"
|
||||||
@@ -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 \
|
||||||
|
"
|
||||||
@@ -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 \
|
||||||
|
"
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
SUMMARY = "Rust compiler run-time"
|
|
||||||
HOMEPAGE = "http://www.rust-lang.org"
|
|
||||||
SECTION = "devel"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://src/compiler-rt/LICENSE.TXT;md5=bf24bca27049b52e9738451aa55771d4"
|
|
||||||
|
|
||||||
require rust.inc
|
|
||||||
ALLOW_EMPTY_${PN} = "1"
|
|
||||||
|
|
||||||
DEPENDS += "rust-llvm-native (=${PV})"
|
|
||||||
# dev and staticdev should NOT depend on the binary package
|
|
||||||
RDEPENDS_${PN}-dev = ""
|
|
||||||
INSANE_SKIP_${PN}-dev = "staticdev"
|
|
||||||
|
|
||||||
DISABLE_STATIC = ""
|
|
||||||
INHIBIT_DEFAULT_RUST_DEPS = "1"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_runmake ${TARGET_SYS}/rt/libcompiler-rt.a
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
mkdir -p ${D}${libdir}
|
|
||||||
cp ${TARGET_SYS}/rt/libcompiler-rt.a ${D}${libdir}/libcompiler-rt.a
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES_${PN}-dev = ""
|
|
||||||
FILES_${PN}-staticdev = "${libdir}/*.a"
|
|
||||||
-107
@@ -1,107 +0,0 @@
|
|||||||
From bb2d8649b2b344e0bb4b1cf94135378831735557 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Tue, 18 Nov 2014 01:40:21 -0500
|
|
||||||
Subject: [PATCH 01/10] Target: add default target.json path:
|
|
||||||
$libdir/rust/targets
|
|
||||||
|
|
||||||
---
|
|
||||||
src/librustc/session/config.rs | 6 +++---
|
|
||||||
src/librustc/session/mod.rs | 8 ++++++--
|
|
||||||
src/librustc_back/target/mod.rs | 13 +++++++++++--
|
|
||||||
3 files changed, 20 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
|
|
||||||
index e988ddc..563f3ac 100644
|
|
||||||
--- a/src/librustc/session/config.rs
|
|
||||||
+++ b/src/librustc/session/config.rs
|
|
||||||
@@ -42,7 +42,7 @@ use std::env;
|
|
||||||
use std::fmt;
|
|
||||||
use std::hash::{Hasher, SipHasher};
|
|
||||||
use std::iter::FromIterator;
|
|
||||||
-use std::path::PathBuf;
|
|
||||||
+use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
pub struct Config {
|
|
||||||
pub target: Target,
|
|
||||||
@@ -1011,8 +1011,8 @@ pub fn build_configuration(sess: &Session,
|
|
||||||
v
|
|
||||||
}
|
|
||||||
|
|
||||||
-pub fn build_target_config(opts: &Options, sp: &Handler) -> Config {
|
|
||||||
- let target = match Target::search(&opts.target_triple) {
|
|
||||||
+pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &Handler) -> Config {
|
|
||||||
+ let target = match Target::search(sysroot, &opts.target_triple[..]) {
|
|
||||||
Ok(t) => t,
|
|
||||||
Err(e) => {
|
|
||||||
sp.struct_fatal(&format!("Error loading target specification: {}", e))
|
|
||||||
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
|
|
||||||
index c71253a..13b4e05 100644
|
|
||||||
--- a/src/librustc/session/mod.rs
|
|
||||||
+++ b/src/librustc/session/mod.rs
|
|
||||||
@@ -395,13 +395,17 @@ pub fn build_session_(sopts: config::Options,
|
|
||||||
codemap: Rc<codemap::CodeMap>,
|
|
||||||
cstore: Rc<for<'a> CrateStore<'a>>)
|
|
||||||
-> Session {
|
|
||||||
- let host = match Target::search(config::host_triple()) {
|
|
||||||
+ let sysroot = match sopts.maybe_sysroot {
|
|
||||||
+ Some(ref x) => PathBuf::from(x),
|
|
||||||
+ None => filesearch::get_or_default_sysroot()
|
|
||||||
+ };
|
|
||||||
+ let host = match Target::search(&sysroot, config::host_triple()) {
|
|
||||||
Ok(t) => t,
|
|
||||||
Err(e) => {
|
|
||||||
panic!(span_diagnostic.fatal(&format!("Error loading host specification: {}", e)));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
- let target_cfg = config::build_target_config(&sopts, &span_diagnostic);
|
|
||||||
+ let target_cfg = config::build_target_config(&sysroot, &sopts, &span_diagnostic);
|
|
||||||
let p_s = parse::ParseSess::with_span_handler(span_diagnostic, codemap);
|
|
||||||
let default_sysroot = match sopts.maybe_sysroot {
|
|
||||||
Some(_) => None,
|
|
||||||
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
|
||||||
index 18686e3..d439b59 100644
|
|
||||||
--- a/src/librustc_back/target/mod.rs
|
|
||||||
+++ b/src/librustc_back/target/mod.rs
|
|
||||||
@@ -49,6 +49,8 @@ use std::collections::BTreeMap;
|
|
||||||
use std::default::Default;
|
|
||||||
use std::io::prelude::*;
|
|
||||||
use syntax::abi::Abi;
|
|
||||||
+use std::borrow::ToOwned;
|
|
||||||
+use std::path::Path;
|
|
||||||
|
|
||||||
mod android_base;
|
|
||||||
mod apple_base;
|
|
||||||
@@ -541,12 +543,13 @@ impl Target {
|
|
||||||
///
|
|
||||||
/// The error string could come from any of the APIs called, including
|
|
||||||
/// filesystem access and JSON decoding.
|
|
||||||
- pub fn search(target: &str) -> Result<Target, String> {
|
|
||||||
+ pub fn search(sysroot: &Path, target: &str) -> Result<Target, String> {
|
|
||||||
use std::env;
|
|
||||||
use std::ffi::OsString;
|
|
||||||
use std::fs::File;
|
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
use serialize::json;
|
|
||||||
+ use std::iter::IntoIterator;
|
|
||||||
|
|
||||||
fn load_file(path: &Path) -> Result<Target, String> {
|
|
||||||
let mut f = File::open(path).map_err(|e| e.to_string())?;
|
|
||||||
@@ -577,8 +580,14 @@ impl Target {
|
|
||||||
.unwrap_or(OsString::new());
|
|
||||||
|
|
||||||
// FIXME 16351: add a sane default search path?
|
|
||||||
+ let mut default_path = sysroot.to_owned();
|
|
||||||
+ default_path.push(env!("CFG_LIBDIR_RELATIVE"));
|
|
||||||
+ default_path.push("rustlib");
|
|
||||||
|
|
||||||
- for dir in env::split_paths(&target_path) {
|
|
||||||
+ let paths = env::split_paths(&target_path)
|
|
||||||
+ .chain(Some(default_path).into_iter());
|
|
||||||
+
|
|
||||||
+ for dir in paths {
|
|
||||||
let p = dir.join(&path);
|
|
||||||
if p.is_file() {
|
|
||||||
return load_file(&p);
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-73
@@ -1,73 +0,0 @@
|
|||||||
From 0829743c109a147213d06d38052662a5f2b0dd9b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Tue, 18 Nov 2014 14:52:56 -0500
|
|
||||||
Subject: [PATCH 02/10] mk: for stage0, use RUSTFLAGS to override target libs
|
|
||||||
dir
|
|
||||||
|
|
||||||
Setting HLIB specially for stage0 (and even more specially for windows)
|
|
||||||
also affects the location we place TLIB. To keep the TLIBs we build in
|
|
||||||
the place requested by configure, use '-L' and '--sysroot' to point
|
|
||||||
stage0-rustc at the appropriate location.
|
|
||||||
---
|
|
||||||
mk/main.mk | 29 ++++++++++++-----------------
|
|
||||||
1 file changed, 12 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mk/main.mk b/mk/main.mk
|
|
||||||
index 90d3563..cdcbdf2 100644
|
|
||||||
--- a/mk/main.mk
|
|
||||||
+++ b/mk/main.mk
|
|
||||||
@@ -420,32 +420,26 @@ define SREQ
|
|
||||||
HROOT$(1)_H_$(3) = $(3)/stage$(1)
|
|
||||||
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
|
|
||||||
|
|
||||||
-ifeq ($$(CFG_WINDOWSY_$(3)),1)
|
|
||||||
-# On Windows we always store host runtime libraries in the 'bin' directory because
|
|
||||||
-# there's no rpath. Target libraries go under $CFG_LIBDIR_RELATIVE (usually 'lib').
|
|
||||||
-HLIB_RELATIVE$(1)_H_$(3) = bin
|
|
||||||
-TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2)
|
|
||||||
-# Remove the next 3 lines after a snapshot
|
|
||||||
-ifeq ($(1),0)
|
|
||||||
-RUSTFLAGS_STAGE0 += -L $$(TROOT$(1)_T_$(2)_H_$(3))/lib
|
|
||||||
-endif
|
|
||||||
-
|
|
||||||
-else
|
|
||||||
-
|
|
||||||
-ifeq ($(1),0)
|
|
||||||
-HLIB_RELATIVE$(1)_H_$(3) = lib
|
|
||||||
-else
|
|
||||||
HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE)
|
|
||||||
-endif
|
|
||||||
+
|
|
||||||
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
|
|
||||||
|
|
||||||
-endif
|
|
||||||
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(HLIB_RELATIVE$(1)_H_$(3))
|
|
||||||
|
|
||||||
# Destinations of artifacts for target architectures
|
|
||||||
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
|
|
||||||
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
|
|
||||||
|
|
||||||
+# Don't trust stage0, be explicit about libraries
|
|
||||||
+# TODO: rather than specifying sysroot, we really want to tell which libdir to
|
|
||||||
+# use (ie: the dir containing 'rustlib'). This would allow us to avoid
|
|
||||||
+# passing the '-L' options.
|
|
||||||
+ifeq ($(1),0)
|
|
||||||
+RUSTFLAGS_S_$(1)_T_$(2)_H_$(3) += --sysroot "$$(HROOT$(1)_H_$(3))" \
|
|
||||||
+ -L "$$(TLIB$(1)_T_$(2)_H_$(3))"
|
|
||||||
+endif
|
|
||||||
+
|
|
||||||
+
|
|
||||||
# Preqrequisites for using the stageN compiler
|
|
||||||
ifeq ($(1),0)
|
|
||||||
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
|
|
||||||
@@ -558,6 +552,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \
|
|
||||||
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
|
|
||||||
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
|
|
||||||
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
|
|
||||||
+ $$(RUSTFLAGS_S_$(1)_T_$(2)_H_$(3)) \
|
|
||||||
$$(RUSTC_FLAGS_$(2))
|
|
||||||
|
|
||||||
endef
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
From 128503bf447e82b9e99bea8ef83294a6446036b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Tue, 18 Nov 2014 13:48:14 -0500
|
|
||||||
Subject: [PATCH 03/10] mk: add missing CFG_LIBDIR_RELATIVE
|
|
||||||
|
|
||||||
---
|
|
||||||
mk/grammar.mk | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mk/grammar.mk b/mk/grammar.mk
|
|
||||||
index 0d527bd..926f247 100644
|
|
||||||
--- a/mk/grammar.mk
|
|
||||||
+++ b/mk/grammar.mk
|
|
||||||
@@ -11,8 +11,8 @@
|
|
||||||
BG = $(CFG_BUILD_DIR)/grammar/
|
|
||||||
SG = $(S)src/grammar/
|
|
||||||
B = $(CFG_BUILD_DIR)/$(CFG_BUILD)/stage2/
|
|
||||||
-L = $(B)lib/rustlib/$(CFG_BUILD)/lib
|
|
||||||
-LD = $(CFG_BUILD)/stage2/lib/rustlib/$(CFG_BUILD)/lib/
|
|
||||||
+L = $(B)$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib
|
|
||||||
+LD = $(CFG_BUILD)/stage2/$(CFG_LIBDIR_RELATIVE)/rustlib/$(CFG_BUILD)/lib/
|
|
||||||
RUSTC = $(STAGE2_T_$(CFG_BUILD)_H_$(CFG_BUILD))
|
|
||||||
ifeq ($(CFG_OSTYPE),apple-darwin)
|
|
||||||
FLEX_LDFLAGS=-ll
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
From d73ce5d99346812fcf063a87b4efac54c263737d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Wed, 3 Dec 2014 19:15:19 -0500
|
|
||||||
Subject: [PATCH 05/10] std/thread_local: workaround for NULL __dso_handle
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libstd/thread/local.rs | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
|
|
||||||
index 152b977..3c62862 100644
|
|
||||||
--- a/src/libstd/thread/local.rs
|
|
||||||
+++ b/src/libstd/thread/local.rs
|
|
||||||
@@ -380,7 +380,7 @@ pub mod elf {
|
|
||||||
#[linkage = "extern_weak"]
|
|
||||||
static __cxa_thread_atexit_impl: *const libc::c_void;
|
|
||||||
}
|
|
||||||
- if !__cxa_thread_atexit_impl.is_null() {
|
|
||||||
+ if !__cxa_thread_atexit_impl.is_null() && !__dso_handle.is_null() {
|
|
||||||
type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8),
|
|
||||||
arg: *mut u8,
|
|
||||||
dso_handle: *mut u8) -> libc::c_int;
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
From f8d4b1ea925789bca1aa6261017d63f5efa95c0f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Mon, 2 Mar 2015 13:34:59 -0500
|
|
||||||
Subject: [PATCH 06/10] mk/install: use disable-rewrite-paths
|
|
||||||
|
|
||||||
This stops the install scripts from doing work we've already handled.
|
|
||||||
|
|
||||||
Path rewriting is only useful for prepackaged binary installers.
|
|
||||||
---
|
|
||||||
mk/install.mk | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/mk/install.mk b/mk/install.mk
|
|
||||||
index d2e5449..e67650b 100644
|
|
||||||
--- a/mk/install.mk
|
|
||||||
+++ b/mk/install.mk
|
|
||||||
@@ -12,7 +12,9 @@ RUN_INSTALLER = cd tmp/empty_dir && \
|
|
||||||
sh ../../tmp/dist/$(1)/install.sh \
|
|
||||||
--prefix="$(DESTDIR)$(CFG_PREFIX)" \
|
|
||||||
--libdir="$(DESTDIR)$(CFG_LIBDIR)" \
|
|
||||||
- --mandir="$(DESTDIR)$(CFG_MANDIR)"
|
|
||||||
+ --mandir="$(DESTDIR)$(CFG_MANDIR)" \
|
|
||||||
+ "$(MAYBE_DISABLE_VERIFY)" \
|
|
||||||
+ --disable-rewrite-paths
|
|
||||||
|
|
||||||
install:
|
|
||||||
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-65
@@ -1,65 +0,0 @@
|
|||||||
From 2a42d59c3671f3ab68d8ff49c46240842aff6eb6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steven Walter <swalter@lexmark.com>
|
|
||||||
Date: Wed, 18 Nov 2015 08:33:26 -0500
|
|
||||||
Subject: [PATCH 07/10] Allow overriding crate_hash with -C crate_hash
|
|
||||||
|
|
||||||
The current crate hash is not stable from run-to-run. This causes
|
|
||||||
problems with bitbake; it needs a guarantee that every build with the
|
|
||||||
same input will generate compatible output, otherwise sstate won't work.
|
|
||||||
Using -C crate_hash, we can do that by using the bitbake input hash to
|
|
||||||
determine the crate hash; the bitbake input hash will be stable, but
|
|
||||||
still different for different rust recipes.
|
|
||||||
|
|
||||||
Upstream-Status: not-appropriate
|
|
||||||
|
|
||||||
Upstream wants to fix it's actual object generation here. See
|
|
||||||
https://github.com/rust-lang/rust/issues/34902 (and others) for details.
|
|
||||||
---
|
|
||||||
src/librustc/session/config.rs | 2 ++
|
|
||||||
src/librustc_trans/back/link.rs | 12 +++++++++++-
|
|
||||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
|
|
||||||
index 563f3ac..52a5130 100644
|
|
||||||
--- a/src/librustc/session/config.rs
|
|
||||||
+++ b/src/librustc/session/config.rs
|
|
||||||
@@ -804,6 +804,8 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
|
|
||||||
"choose the code model to use (rustc --print code-models for details)"),
|
|
||||||
metadata: Vec<String> = (Vec::new(), parse_list, [TRACKED],
|
|
||||||
"metadata to mangle symbol names with"),
|
|
||||||
+ crate_hash: String = ("".to_string(), parse_string, [TRACKED],
|
|
||||||
+ "override crate hash with given value"),
|
|
||||||
extra_filename: String = ("".to_string(), parse_string, [UNTRACKED],
|
|
||||||
"extra data to put in each output filename"),
|
|
||||||
codegen_units: usize = (1, parse_uint, [UNTRACKED],
|
|
||||||
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
|
|
||||||
index 3cf2500..0e48063 100644
|
|
||||||
--- a/src/librustc_trans/back/link.rs
|
|
||||||
+++ b/src/librustc_trans/back/link.rs
|
|
||||||
@@ -125,12 +125,22 @@ pub fn find_crate_name(sess: Option<&Session>,
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
+use std::hash::{Hasher, SipHasher};
|
|
||||||
+use rustc::hir::svh::Svh;
|
|
||||||
+
|
|
||||||
pub fn build_link_meta<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
|
||||||
name: &str)
|
|
||||||
-> LinkMeta {
|
|
||||||
+ let crate_hash = if tcx.sess.opts.cg.crate_hash != "" {
|
|
||||||
+ let mut state = SipHasher::new();
|
|
||||||
+ state.write(tcx.sess.opts.cg.crate_hash.as_bytes());
|
|
||||||
+ Svh::new(state.finish())
|
|
||||||
+ } else {
|
|
||||||
+ tcx.calculate_krate_hash()
|
|
||||||
+ };
|
|
||||||
let r = LinkMeta {
|
|
||||||
crate_name: name.to_owned(),
|
|
||||||
- crate_hash: tcx.calculate_krate_hash(),
|
|
||||||
+ crate_hash: crate_hash,
|
|
||||||
};
|
|
||||||
info!("{:?}", r);
|
|
||||||
return r;
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
From 174ae38bcc197658dd0ad6bcdae2bb06112e68a2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Steven Walter <swalter@lexmark.com>
|
|
||||||
Date: Wed, 18 Nov 2015 08:41:17 -0500
|
|
||||||
Subject: [PATCH 08/10] mk/platform.mk: pass -C crate_hash to builds
|
|
||||||
|
|
||||||
bitbake recipe will export FORCE_CRATE_HASH
|
|
||||||
|
|
||||||
Upstream-Status: not-appropriate
|
|
||||||
---
|
|
||||||
mk/platform.mk | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/mk/platform.mk b/mk/platform.mk
|
|
||||||
index d601cab..0b5e9f2 100644
|
|
||||||
--- a/mk/platform.mk
|
|
||||||
+++ b/mk/platform.mk
|
|
||||||
@@ -181,6 +181,7 @@ define CFG_MAKE_TOOLCHAIN
|
|
||||||
AR_$(1)=$(CROSS_PREFIX_$(1))$(AR_$(1))
|
|
||||||
LINK_$(1)=$(CROSS_PREFIX_$(1))$(LINK_$(1))
|
|
||||||
RUSTC_CROSS_FLAGS_$(1)=-C linker=$$(call FIND_COMPILER,$$(LINK_$(1))) \
|
|
||||||
+ -C crate_hash=$(FORCE_CRATE_HASH) \
|
|
||||||
-C ar=$$(call FIND_COMPILER,$$(AR_$(1))) $(RUSTC_CROSS_FLAGS_$(1))
|
|
||||||
|
|
||||||
RUSTC_FLAGS_$(1)=$$(RUSTC_CROSS_FLAGS_$(1)) $(RUSTC_FLAGS_$(1))
|
|
||||||
--
|
|
||||||
2.10.0
|
|
||||||
|
|
||||||
-106
@@ -1,106 +0,0 @@
|
|||||||
From e9c6cf5d1a9bb7f50c5e98a660217062b510928b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Tue, 18 Nov 2014 01:40:21 -0500
|
|
||||||
Subject: [PATCH 1/3] Target: add default target.json path:
|
|
||||||
$libdir/rust/targets
|
|
||||||
|
|
||||||
---
|
|
||||||
src/librustc/session/config.rs | 6 +++---
|
|
||||||
src/librustc/session/mod.rs | 8 ++++++--
|
|
||||||
src/librustc_back/target/mod.rs | 12 ++++++++++--
|
|
||||||
3 files changed, 19 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
|
|
||||||
index 5e3c8bc..15fd763 100644
|
|
||||||
--- a/src/librustc/session/config.rs
|
|
||||||
+++ b/src/librustc/session/config.rs
|
|
||||||
@@ -42,7 +42,7 @@ use std::hash::Hasher;
|
|
||||||
use std::collections::hash_map::DefaultHasher;
|
|
||||||
use std::collections::HashSet;
|
|
||||||
use std::iter::FromIterator;
|
|
||||||
-use std::path::PathBuf;
|
|
||||||
+use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
pub struct Config {
|
|
||||||
pub target: Target,
|
|
||||||
@@ -1001,8 +1001,8 @@ pub fn build_configuration(sess: &Session,
|
|
||||||
user_cfg
|
|
||||||
}
|
|
||||||
|
|
||||||
-pub fn build_target_config(opts: &Options, sp: &Handler) -> Config {
|
|
||||||
- let target = match Target::search(&opts.target_triple) {
|
|
||||||
+pub fn build_target_config(sysroot: &Path, opts: &Options, sp: &Handler) -> Config {
|
|
||||||
+ let target = match Target::search(sysroot, &opts.target_triple[..]) {
|
|
||||||
Ok(t) => t,
|
|
||||||
Err(e) => {
|
|
||||||
sp.struct_fatal(&format!("Error loading target specification: {}", e))
|
|
||||||
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
|
|
||||||
index 91765e6..29e5e5d 100644
|
|
||||||
--- a/src/librustc/session/mod.rs
|
|
||||||
+++ b/src/librustc/session/mod.rs
|
|
||||||
@@ -575,13 +575,17 @@ pub fn build_session_(sopts: config::Options,
|
|
||||||
codemap: Rc<codemap::CodeMap>,
|
|
||||||
cstore: Rc<for<'a> CrateStore<'a>>)
|
|
||||||
-> Session {
|
|
||||||
- let host = match Target::search(config::host_triple()) {
|
|
||||||
+ let sysroot = match sopts.maybe_sysroot {
|
|
||||||
+ Some(ref x) => PathBuf::from(x),
|
|
||||||
+ None => filesearch::get_or_default_sysroot()
|
|
||||||
+ };
|
|
||||||
+ let host = match Target::search(&sysroot, config::host_triple()) {
|
|
||||||
Ok(t) => t,
|
|
||||||
Err(e) => {
|
|
||||||
panic!(span_diagnostic.fatal(&format!("Error loading host specification: {}", e)));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
- let target_cfg = config::build_target_config(&sopts, &span_diagnostic);
|
|
||||||
+ let target_cfg = config::build_target_config(&sysroot, &sopts, &span_diagnostic);
|
|
||||||
let p_s = parse::ParseSess::with_span_handler(span_diagnostic, codemap);
|
|
||||||
let default_sysroot = match sopts.maybe_sysroot {
|
|
||||||
Some(_) => None,
|
|
||||||
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs
|
|
||||||
index 351d469..3282dbd 100644
|
|
||||||
--- a/src/librustc_back/target/mod.rs
|
|
||||||
+++ b/src/librustc_back/target/mod.rs
|
|
||||||
@@ -51,6 +51,7 @@ use std::io::prelude::*;
|
|
||||||
use syntax::abi::{Abi, lookup as lookup_abi};
|
|
||||||
|
|
||||||
use PanicStrategy;
|
|
||||||
+use std::path::Path;
|
|
||||||
|
|
||||||
mod android_base;
|
|
||||||
mod apple_base;
|
|
||||||
@@ -625,12 +626,13 @@ impl Target {
|
|
||||||
///
|
|
||||||
/// The error string could come from any of the APIs called, including
|
|
||||||
/// filesystem access and JSON decoding.
|
|
||||||
- pub fn search(target: &str) -> Result<Target, String> {
|
|
||||||
+ pub fn search(sysroot: &Path, target: &str) -> Result<Target, String> {
|
|
||||||
use std::env;
|
|
||||||
use std::ffi::OsString;
|
|
||||||
use std::fs::File;
|
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
use serialize::json;
|
|
||||||
+ use std::iter::IntoIterator;
|
|
||||||
|
|
||||||
fn load_file(path: &Path) -> Result<Target, String> {
|
|
||||||
let mut f = File::open(path).map_err(|e| e.to_string())?;
|
|
||||||
@@ -661,8 +663,14 @@ impl Target {
|
|
||||||
.unwrap_or(OsString::new());
|
|
||||||
|
|
||||||
// FIXME 16351: add a sane default search path?
|
|
||||||
+ let mut default_path = sysroot.to_owned();
|
|
||||||
+ default_path.push(env!("CFG_LIBDIR_RELATIVE"));
|
|
||||||
+ default_path.push("rustlib");
|
|
||||||
|
|
||||||
- for dir in env::split_paths(&target_path) {
|
|
||||||
+ let paths = env::split_paths(&target_path)
|
|
||||||
+ .chain(Some(default_path).into_iter());
|
|
||||||
+
|
|
||||||
+ for dir in paths {
|
|
||||||
let p = dir.join(&path);
|
|
||||||
if p.is_file() {
|
|
||||||
return load_file(&p);
|
|
||||||
--
|
|
||||||
2.10.1 (Apple Git-78)
|
|
||||||
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
From bff536002eba2ed322d329d9022ccdc77da458a3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Wed, 3 Dec 2014 19:15:19 -0500
|
|
||||||
Subject: [PATCH 3/3] std/thread_local: workaround for NULL __dso_handle
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libstd/sys/unix/fast_thread_local.rs | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/libstd/sys/unix/fast_thread_local.rs b/src/libstd/sys/unix/fast_thread_local.rs
|
|
||||||
index 0c625e7..31e7146 100644
|
|
||||||
--- a/src/libstd/sys/unix/fast_thread_local.rs
|
|
||||||
+++ b/src/libstd/sys/unix/fast_thread_local.rs
|
|
||||||
@@ -110,7 +110,7 @@ unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
|
|
||||||
#[linkage = "extern_weak"]
|
|
||||||
static __cxa_thread_atexit_impl: *const libc::c_void;
|
|
||||||
}
|
|
||||||
- if !__cxa_thread_atexit_impl.is_null() {
|
|
||||||
+ if !__cxa_thread_atexit_impl.is_null() && !__dso_handle.is_null() {
|
|
||||||
type F = unsafe extern fn(dtor: unsafe extern fn(*mut u8),
|
|
||||||
arg: *mut u8,
|
|
||||||
dso_handle: *mut u8) -> libc::c_int;
|
|
||||||
--
|
|
||||||
2.10.1 (Apple Git-78)
|
|
||||||
|
|
||||||
-58
@@ -1,58 +0,0 @@
|
|||||||
From c7daec775a917d9e3017bc35ea7d88cc9418f181 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Cody P Schafer <dev@codyps.com>
|
|
||||||
Date: Mon, 2 Mar 2015 13:27:49 -0500
|
|
||||||
Subject: [PATCH] add option to disable rewriting of install paths
|
|
||||||
|
|
||||||
This is intended for use by rust & cargo's `make install`, as in that
|
|
||||||
case:
|
|
||||||
|
|
||||||
- these paths are typically built into the pre-install layout already
|
|
||||||
- attempting to do the replacement will be incorrect subdirectory
|
|
||||||
cases (ie: libdir=lib/foo)
|
|
||||||
---
|
|
||||||
install-template.sh | 21 ++++++++++++---------
|
|
||||||
1 file changed, 12 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/install-template.sh b/install-template.sh
|
|
||||||
index 042b955..4ecf430 100644
|
|
||||||
--- a/install-template.sh
|
|
||||||
+++ b/install-template.sh
|
|
||||||
@@ -618,16 +618,18 @@ install_components() {
|
|
||||||
# Decide the destination of the file
|
|
||||||
local _file_install_path="$_dest_prefix/$_file"
|
|
||||||
|
|
||||||
- if echo "$_file" | grep "^lib/" > /dev/null
|
|
||||||
- then
|
|
||||||
- local _f="$(echo "$_file" | sed 's/^lib\///')"
|
|
||||||
- _file_install_path="$CFG_LIBDIR/$_f"
|
|
||||||
- fi
|
|
||||||
+ if [ -n "${CFG_REWRITE_PATHS-}" ]; then
|
|
||||||
+ if echo "$_file" | grep "^lib/" > /dev/null
|
|
||||||
+ then
|
|
||||||
+ local _f="$(echo "$_file" | sed 's/^lib\///')"
|
|
||||||
+ _file_install_path="$CFG_LIBDIR/$_f"
|
|
||||||
+ fi
|
|
||||||
|
|
||||||
- if echo "$_file" | grep "^share/man/" > /dev/null
|
|
||||||
- then
|
|
||||||
- local _f="$(echo "$_file" | sed 's/^share\/man\///')"
|
|
||||||
- _file_install_path="$CFG_MANDIR/$_f"
|
|
||||||
+ if echo "$_file" | grep "^share/man/" > /dev/null
|
|
||||||
+ then
|
|
||||||
+ local _f="$(echo "$_file" | sed 's/^share\/man\///')"
|
|
||||||
+ _file_install_path="$CFG_MANDIR/$_f"
|
|
||||||
+ fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure there's a directory for it
|
|
||||||
@@ -810,6 +812,7 @@ valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH"
|
|
||||||
opt ldconfig 1 "run ldconfig after installation (Linux only)"
|
|
||||||
opt verify 1 "obsolete"
|
|
||||||
flag verbose "run with verbose output"
|
|
||||||
+opt rewrite-paths 1 "rewrite install paths for libdir & mandir"
|
|
||||||
|
|
||||||
if [ $HELP -eq 1 ]
|
|
||||||
then
|
|
||||||
--
|
|
||||||
2.4.1
|
|
||||||
|
|
||||||
@@ -2,24 +2,30 @@ SUMMARY = "Rust standard libaries"
|
|||||||
HOMEPAGE = "http://www.rust-lang.org"
|
HOMEPAGE = "http://www.rust-lang.org"
|
||||||
SECTION = "devel"
|
SECTION = "devel"
|
||||||
LICENSE = "MIT | Apache-2.0"
|
LICENSE = "MIT | Apache-2.0"
|
||||||
LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8"
|
|
||||||
|
|
||||||
RUSTLIB_DEP = ""
|
RUSTLIB_DEP = ""
|
||||||
inherit cargo
|
inherit cargo
|
||||||
|
|
||||||
|
DEPENDS_append_libc-musl = " libunwind"
|
||||||
# Needed so cargo can find libbacktrace
|
# Needed so cargo can find libbacktrace
|
||||||
RUSTFLAGS += "-L ${STAGING_LIBDIR}"
|
RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
|
||||||
|
|
||||||
|
S = "${RUSTSRC}/src/libstd"
|
||||||
|
|
||||||
|
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
|
||||||
|
|
||||||
do_compile_prepend () {
|
do_compile_prepend () {
|
||||||
cd ${S}/src/rustc/std_shim
|
|
||||||
export CARGO_TARGET_DIR="${B}"
|
export CARGO_TARGET_DIR="${B}"
|
||||||
# For Rust 1.12.1 and lower
|
|
||||||
export RUSTC_BOOTSTRAP_KEY="${RS_KEY}"
|
|
||||||
# For Rust 1.13.0 and newer
|
# For Rust 1.13.0 and newer
|
||||||
export RUSTC_BOOTSTRAP="1"
|
export RUSTC_BOOTSTRAP="1"
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
mkdir -p ${D}${rustlibdir}
|
mkdir -p ${D}${rustlibdir}
|
||||||
cp ${B}/${TARGET_SYS}/release/deps/* ${D}${rustlibdir}
|
|
||||||
|
# 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}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
require rust-source-${PV}.inc
|
|
||||||
require libstd-rs.inc
|
|
||||||
|
|
||||||
SRC_URI += "\
|
|
||||||
crate://crates.io/gcc/0.3.27 \
|
|
||||||
"
|
|
||||||
|
|
||||||
# not necessary from Rust 1.15.x and newer as its built
|
|
||||||
# as a cargo crate with libstd
|
|
||||||
DEPENDS += "compiler-rt (=${PV})"
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
require rust-source-${PV}.inc
|
|
||||||
require libstd-rs.inc
|
|
||||||
|
|
||||||
EXTRA_OECONF = "--disable-rustbuild"
|
|
||||||
|
|
||||||
CARGO_BUILD_FLAGS += "--features 'jemalloc panic-unwind'"
|
|
||||||
|
|
||||||
SRC_URI += "\
|
|
||||||
crate://crates.io/cmake/0.1.18 \
|
|
||||||
crate://crates.io/env_logger/0.3.5 \
|
|
||||||
crate://crates.io/filetime/0.1.10 \
|
|
||||||
crate://crates.io/gcc/0.3.40 \
|
|
||||||
crate://crates.io/getopts/0.2.14 \
|
|
||||||
crate://crates.io/libc/0.2.17 \
|
|
||||||
crate://crates.io/log/0.3.6 \
|
|
||||||
crate://crates.io/num_cpus/0.2.13 \
|
|
||||||
crate://crates.io/rustc-serialize/0.3.19 \
|
|
||||||
crate://crates.io/toml/0.1.30 \
|
|
||||||
"
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
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,6 +1,21 @@
|
|||||||
require rust.inc
|
require rust.inc
|
||||||
inherit cross
|
inherit cross
|
||||||
|
|
||||||
|
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"
|
||||||
|
if thing is "TARGET":
|
||||||
|
features = d.getVar('TARGET_LLVM_FEATURES') or ""
|
||||||
|
cpu = d.getVar('TARGET_LLVM_CPU')
|
||||||
|
rust_gen_target(d, thing, wd, features, cpu)
|
||||||
|
}
|
||||||
|
|
||||||
# Otherwise we'll depend on what we provide
|
# Otherwise we'll depend on what we provide
|
||||||
INHIBIT_DEFAULT_RUST_DEPS = "1"
|
INHIBIT_DEFAULT_RUST_DEPS = "1"
|
||||||
|
|
||||||
@@ -32,6 +47,9 @@ BUILD_POST_LINK_ARGS_append = " -Wl,-rpath=../../lib"
|
|||||||
# We need the same thing for the calls to the compiler when building the runtime crap
|
# We need the same thing for the calls to the compiler when building the runtime crap
|
||||||
TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}"
|
TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}"
|
||||||
|
|
||||||
|
do_rust_setup_snapshot () {
|
||||||
|
}
|
||||||
|
|
||||||
do_configure () {
|
do_configure () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
require compiler-rt.inc
|
require rust-cross.inc
|
||||||
require rust-source-${PV}.inc
|
require rust-source-${PV}.inc
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
require rust-cross.inc
|
||||||
|
require rust-source-${PV}.inc
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
require rust-cross.inc
|
||||||
|
require rust-source-${PV}.inc
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
require rust-cross.inc
|
||||||
|
require rust-source-${PV}.inc
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
LICENSE = "NCSA"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||||
|
|
||||||
|
require rust-llvm.inc
|
||||||
@@ -1,115 +1,62 @@
|
|||||||
SUMMARY = "LLVM compiler framework (packaged with rust)"
|
SUMMARY = "LLVM compiler framework (packaged with rust)"
|
||||||
LICENSE = "NCSA"
|
LICENSE ?= "Apache-2.0-with-LLVM-exception"
|
||||||
|
|
||||||
S = "${RUSTSRC}/src/llvm"
|
SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch"
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=b99eb43c934ceebecab85c6b9b1a08be"
|
S = "${RUSTSRC}/src/llvm-project/llvm"
|
||||||
|
|
||||||
inherit cmake pythonnative
|
LIC_FILES_CHKSUM ?= "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||||
|
|
||||||
|
inherit cmake python3native
|
||||||
|
|
||||||
|
DEPENDS += "ninja-native rust-llvm-native"
|
||||||
|
|
||||||
|
ARM_INSTRUCTION_SET_armv5 = "arm"
|
||||||
|
ARM_INSTRUCTION_SET_armv4t = "arm"
|
||||||
|
|
||||||
|
LLVM_RELEASE = "6.0"
|
||||||
|
LLVM_DIR = "llvm${LLVM_RELEASE}"
|
||||||
|
|
||||||
EXTRA_OECMAKE = " \
|
EXTRA_OECMAKE = " \
|
||||||
-DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;PowerPC' \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
-DLLVM_TARGETS_TO_BUILD='X86;ARM;AArch64;PowerPC;Mips' \
|
||||||
-DLLVM_BUILD_DOCS=OFF \
|
-DLLVM_BUILD_DOCS=OFF \
|
||||||
-DLLVM_ENABLE_TERMINFO=OFF \
|
-DLLVM_ENABLE_TERMINFO=OFF \
|
||||||
-DLLVM_ENABLE_ZLIB=OFF \
|
-DLLVM_ENABLE_ZLIB=OFF \
|
||||||
|
-DLLVM_ENABLE_LIBXML2=OFF \
|
||||||
-DLLVM_ENABLE_FFI=OFF \
|
-DLLVM_ENABLE_FFI=OFF \
|
||||||
-DLLVM_INSTALL_UTILS=ON \
|
-DLLVM_INSTALL_UTILS=ON \
|
||||||
-DLLVM_BUILD_TOOLS=ON \
|
|
||||||
-DLLVM_BUILD_EXAMPLES=OFF \
|
-DLLVM_BUILD_EXAMPLES=OFF \
|
||||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||||
-DLLVM_BUILD_TESTS=OFF \
|
-DLLVM_BUILD_TESTS=OFF \
|
||||||
-DLLVM_INCLUDE_TESTS=OFF \
|
-DLLVM_INCLUDE_TESTS=OFF \
|
||||||
-DLLVM_TARGET_ARCH=${TARGET_ARCH} \
|
-DLLVM_TARGET_ARCH=${TARGET_ARCH} \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \
|
||||||
|
"
|
||||||
|
EXTRA_OECMAKE_append_class-target = "\
|
||||||
|
-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
|
# The debug symbols are huge here (>2GB) so suppress them since they
|
||||||
# provide almost no value. If you really need them then override this
|
# provide almost no value. If you really need them then override this
|
||||||
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
||||||
|
|
||||||
EXTRA_OECMAKE_append_class-target = "\
|
|
||||||
-DCROSS_TOOLCHAIN_FLAGS_NATIVE='-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/native_toolchain.cmake' \
|
|
||||||
"
|
|
||||||
|
|
||||||
do_generate_native_toolchain_file() {
|
|
||||||
cat > ${WORKDIR}/native_toolchain.cmake <<EOF
|
|
||||||
set( CMAKE_SYSTEM_NAME `echo ${BUILD_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
|
|
||||||
set( CMAKE_SYSTEM_PROCESSOR ${BUILD_ARCH} )
|
|
||||||
set( CMAKE_C_COMPILER ${BUILD_CC} )
|
|
||||||
set( CMAKE_CXX_COMPILER ${BUILD_CXX} )
|
|
||||||
set( CMAKE_ASM_COMPILER ${BUILD_AS} )
|
|
||||||
set( CMAKE_AR ${BUILD_AR} CACHE FILEPATH "Archiver" )
|
|
||||||
set( CMAKE_C_FLAGS "${BUILD_CC_ARCH} ${BUILD_CFLAGS}" CACHE STRING "CFLAGS" )
|
|
||||||
set( CMAKE_CXX_FLAGS "${BUILD_CC_ARCH} ${BUILD_CXXFLAGS}" CACHE STRING "CXXFLAGS" )
|
|
||||||
set( CMAKE_ASM_FLAGS "${BUILD_CC_ARCH} ${BUILD_CFLAGS}" CACHE STRING "ASM FLAGS" )
|
|
||||||
set( CMAKE_C_FLAGS_RELEASE "${SELECTED_OPTIMIZATION} ${BUILD_CFLAGS} -DNDEBUG" CACHE STRING "CFLAGS for release" )
|
|
||||||
set( CMAKE_CXX_FLAGS_RELEASE "${SELECTED_OPTIMIZATION} ${BUILD_CXXFLAGS} -DNDEBUG" CACHE STRING "CXXFLAGS for release" )
|
|
||||||
set( CMAKE_ASM_FLAGS_RELEASE "${SELECTED_OPTIMIZATION} ${BUILD_CFLAGS} -DNDEBUG" CACHE STRING "ASM FLAGS for release" )
|
|
||||||
set( CMAKE_C_LINK_FLAGS "${BUILD_CC_ARCH} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS}" CACHE STRING "LDFLAGS" )
|
|
||||||
set( CMAKE_CXX_LINK_FLAGS "${BUILD_CC_ARCH} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}" CACHE STRING "LDFLAGS" )
|
|
||||||
|
|
||||||
# only search in the paths provided so cmake doesnt pick
|
|
||||||
# up libraries and tools from the native build machine
|
|
||||||
set( CMAKE_FIND_ROOT_PATH ${STAGING_DIR_HOST} ${STAGING_DIR_NATIVE} ${CROSS_DIR} ${OECMAKE_PERLNATIVE_DIR} ${OECMAKE_EXTRA_ROOT_PATH} ${EXTERNAL_TOOLCHAIN})
|
|
||||||
set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
|
||||||
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
|
||||||
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
|
||||||
|
|
||||||
# Use native cmake modules
|
|
||||||
set( CMAKE_MODULE_PATH ${STAGING_DATADIR}/cmake/Modules/ )
|
|
||||||
|
|
||||||
# add for non /usr/lib libdir, e.g. /usr/lib64
|
|
||||||
set( CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
addtask generate_native_toolchain_file after do_patch before do_configure
|
|
||||||
|
|
||||||
do_configure_prepend_class-native() {
|
|
||||||
# Use host paths for native tools
|
|
||||||
sed -i -e '/CMAKE_FIND_ROOT_PATH_MODE/d' ${WORKDIR}/toolchain.cmake
|
|
||||||
}
|
|
||||||
|
|
||||||
do_compile_prepend_class-target() {
|
|
||||||
# Fix paths in llvm-config
|
|
||||||
sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp
|
|
||||||
|
|
||||||
# Fix the hardcoded libdir in llvm-config
|
|
||||||
sed -i 's:/lib\>:/${baselib}:g' ${S}/tools/llvm-config/llvm-config.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
do_compile() {
|
|
||||||
oe_runmake NATIVE_LIB_LLVMTABLEGEN
|
|
||||||
oe_runmake NativeLLVMConfig
|
|
||||||
oe_runmake
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install_append_class-target() {
|
do_install_append_class-target() {
|
||||||
# Disable checks on the native tools, since these should came from the native recipe
|
# 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
|
sed -i -e 's/\(.*APPEND.*_IMPORT_CHECK_FILES_FOR_.*{_IMPORT_PREFIX}\/bin\/.*\)/#\1/' ${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_sysroot_preprocess"
|
|
||||||
SYSROOT_PREPROCESS_FUNCS_append_class-native = " llvm_native_sysroot_preprocess"
|
|
||||||
|
|
||||||
llvm_sysroot_preprocess() {
|
|
||||||
install -d ${SYSROOT_DESTDIR}${bindir}
|
|
||||||
cp ${B}/NATIVE/bin/llvm-config ${SYSROOT_DESTDIR}/${bindir} || bbfatal "missing llvm-config"
|
|
||||||
cp ${B}/NATIVE/bin/llvm-tblgen ${SYSROOT_DESTDIR}/${bindir} || bbfatal "missing llvm-tblgen"
|
|
||||||
}
|
|
||||||
|
|
||||||
llvm_native_sysroot_preprocess() {
|
|
||||||
sysroot_stage_dir ${D}${STAGING_DIR_NATIVE}/usr/libexec ${SYSROOT_DESTDIR}${bindir}
|
|
||||||
}
|
|
||||||
|
|
||||||
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
|
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
|
||||||
|
|
||||||
# Add the extra locations to avoid the complaints about unpackaged files
|
# Add the extra locations to avoid the complaints about unpackaged files
|
||||||
FILES_${PN} += "${libdir}/libLLVM*.so"
|
FILES_${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
|
||||||
FILES_${PN}-dev += "${datadir}/llvm"
|
FILES_${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
|
||||||
FILES_${PN}-bugpointpasses = "${libdir}/BugpointPasses.so"
|
FILES_${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
|
||||||
FILES_${PN}-llvmhello = "${libdir}/LLVMHello.so"
|
FILES_${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
|
||||||
FILES_${PN}-liblto = "${libdir}/libLTO.so"
|
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"
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
From 7111770e8290082530d920e120995bf81431b0aa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kelly <mkelly@xevo.com>
|
||||||
|
Date: Fri, 19 May 2017 00:22:57 -0700
|
||||||
|
Subject: [PATCH 12/18] llvm: allow env override of exe path
|
||||||
|
|
||||||
|
When using a native llvm-config from inside a sysroot, we need llvm-config to
|
||||||
|
return the libraries, include directories, etc. from inside the sysroot rather
|
||||||
|
than from the native sysroot. Thus provide an env override for calling
|
||||||
|
llvm-config from a target sysroot.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kelly <mkelly@xevo.com>
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
tools/llvm-config/llvm-config.cpp | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
--- a/tools/llvm-config/llvm-config.cpp
|
||||||
|
+++ b/tools/llvm-config/llvm-config.cpp
|
||||||
|
@@ -226,6 +226,13 @@ Typical components:\n\
|
||||||
|
|
||||||
|
/// Compute the path to the main executable.
|
||||||
|
std::string GetExecutablePath(const char *Argv0) {
|
||||||
|
+ // Hack for Yocto: we need to override the root path when we are using
|
||||||
|
+ // llvm-config from within a target sysroot.
|
||||||
|
+ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH");
|
||||||
|
+ if (Sysroot != nullptr) {
|
||||||
|
+ return Sysroot;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// This just needs to be some symbol in the binary; C++ doesn't
|
||||||
|
// allow taking the address of ::main however.
|
||||||
|
void *P = (void *)(intptr_t)GetExecutablePath;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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"
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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"
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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
-1
@@ -1,7 +1,7 @@
|
|||||||
require rust-source-${PV}.inc
|
require rust-source-${PV}.inc
|
||||||
require rust-llvm.inc
|
require rust-llvm.inc
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=43fdaa303c1c5589ad60f4ffc6a0b9ce"
|
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||||
|
|
||||||
do_install_prepend () {
|
do_install_prepend () {
|
||||||
# the install does a sed on this without installing the file
|
# the install does a sed on this without installing the file
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
require rust-source-${PV}.inc
|
require rust-source-${PV}.inc
|
||||||
require rust-llvm.inc
|
require rust-llvm.inc
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
|
||||||
|
|
||||||
do_install_prepend () {
|
do_install_prepend () {
|
||||||
# the install does a sed on this without installing the file
|
# the install does a sed on this without installing the file
|
||||||
# we don't need it for anything
|
# we don't need it for anything
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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"
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.33.0"
|
||||||
|
|
||||||
|
RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||||
|
RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||||
|
CARGO_VERSION = "0.34.0"
|
||||||
|
CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu"
|
||||||
|
|
||||||
|
SRC_URI += " \
|
||||||
|
https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.gz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||||
|
https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.gz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||||
|
https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.gz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
|
||||||
|
"
|
||||||
|
|
||||||
|
# TODO: Add hashes for other architecture toolchains as well. Make a script?
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.md5sum] = "c1ec989c1965dce754dda1e54274a68c"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "54a342f718b712d8a17fd7878ebd37d22a82ebc70b59c421168cd4153fd04c2b"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "d573c5bd3a965c973734c1606968a91e"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "661c2ba717ae1502f002b4c6e7aeb8941685c7ea8fe7ac26ed9ede26f615b7af"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "de0e635afa9bf495cefecea476bfce36"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "4795ae5ca3bb8c7c83ca338676bb02b670efa1eb474e346284b629dc872bcce8"
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.35.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.36.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[rustc-snapshot-x86_64.md5sum] = "47ea78f6b3f68e30f24b9c94e465d6bd"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "5d6dc216ba429ddf3a1657e70f3e5e380549b546fe56de897677a11d72aa4e07"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "348ec23ca8e47fc65079bc80e63cca5f"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "ccff05d0e2d88499505b10f8e33e8b1645df057f918edc81f8acb0fcee9f90b2"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "93a375e771f3d9b3a139e612dd4730ee"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "ab5a6ff1947463dbd2477ca5dac2012494dae821112098ae0c54add652adfdc3"
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.36.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.37.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[rustc-snapshot-x86_64.md5sum] = "ec27794c94cc1df1a0a69f7244a09176"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "fff0158da6f5af2a89936dc3e0c361077c06c2983eb310615e02f81ebbde1416"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "b71a6fd6f44527c3bf09584e89ad8958"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "ce8e12684b568a8a4f7d346a743383429849cf3f028f5712ad3d3e31590c8db3"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "8c661276a0da7a1aa48affbe33b347e6"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "d20fa121951339d5492cf8862f8a7af59efc99d18f3c27b95ab6d4658b6a7d67"
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.38.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.39.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[rustc-snapshot-x86_64.md5sum] = "53278262a3996982cd68730db7cb1efd"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "0fedde3406cf3367ceb00f493698e6bfc3264bd7f7253c85de7a042b45f873fa"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "0d32b76359613f73671acd13ea57b7ea"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "51b334337804baeff7524e5496d396f254894d7529860d236975e9ed8fcca371"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "7274cfe12905fe8ea6edbe131d3f6637"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "80bcb1368ce98d13cb371df89cbbed9007fb98843f34d07f2abd2c03b8f2747a"
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.39.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.40.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[rustc-snapshot-x86_64.md5sum] = "aa10585498675e44be219d3644c15853"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "5b2a435a4c034615d70cfc383abe9924cbd1ffd4669caa55ce6539f22ed979ed"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "d8b8e6f1a5a255d22b9f86c97a65049f"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "b629952ec9e3e750137d7b8a922de145c97c1dc372dd616e86e4e501da13910b"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "a51643b8980bcaefa9043715a8e9a2ba"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "7b9ba52c252964724f49aab49e42bec62fca929297ef058412c7e727b0794620"
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
## 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.40.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.41.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[rustc-snapshot-x86_64.md5sum] = "5c62bca8ce4beb9b15e42fb8b9690935"
|
||||||
|
SRC_URI[rustc-snapshot-x86_64.sha256sum] = "b1c00618b7a98156e88b14682508a503284f85748eab23de749a20dcc8847111"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.md5sum] = "2f926b4eda6449079665045becff623d"
|
||||||
|
SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "5a0b14a51f51b0194f70a2023749d9cb49c3b2e11f0d4c8232960b91fad336ac"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.md5sum] = "8ea9f8b849d44abf2abf9180f90cc4b6"
|
||||||
|
SRC_URI[cargo-snapshot-x86_64.sha256sum] = "9b6ae643fa240c5ecbc1dc390f4020b6a683f25bac6f7437ebd4b9d32a8d0b6c"
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# Specifics for Rust 1.12.1
|
|
||||||
|
|
||||||
## 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.11.0"
|
|
||||||
RS_KEY = "5c6cf767"
|
|
||||||
|
|
||||||
RUST_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_SYS}"
|
|
||||||
|
|
||||||
# These are x86_64-unknown-linux-gnu hashes, how can we add more?
|
|
||||||
SRC_URI[rust-snapshot.md5sum] = "b83d7a1a90c2d80bef97a518022948c8"
|
|
||||||
SRC_URI[rust-snapshot.sha256sum] = "e9d27a72900da33c1bbd0e59dd42fd6414c6bcdfa33593fb7c7360068406394a"
|
|
||||||
|
|
||||||
SRC_URI += "\
|
|
||||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
|
||||||
"
|
|
||||||
SRC_URI[rust.md5sum] = "82db5a9cb9a051bf8ece2f5174cb273b"
|
|
||||||
SRC_URI[rust.sha256sum] = "97913ae4cb255618aaacd1a534b11f343634b040b32656250d09d8d9ec02d3dc"
|
|
||||||
|
|
||||||
# later versions of rust change the directory that they unextract to
|
|
||||||
RUSTSRC = "${WORKDIR}/rustc-${PV}"
|
|
||||||
# set this as our default
|
|
||||||
S = "${RUSTSRC}"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# Specifics for Rust 1.15.1
|
|
||||||
|
|
||||||
## 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.14.0"
|
|
||||||
|
|
||||||
RUST_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_SYS}"
|
|
||||||
|
|
||||||
# These are x86_64-unknown-linux-gnu hashes, how can we add more?
|
|
||||||
SRC_URI[rust-snapshot.md5sum] = "f178d9d6aad0f87c451f4b2f93170633"
|
|
||||||
SRC_URI[rust-snapshot.sha256sum] = "0eeec4211aa872f24c220200a0c2b095bbfc9c0f737c1c5df2555967c8f36787"
|
|
||||||
|
|
||||||
SRC_URI += "\
|
|
||||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
|
||||||
"
|
|
||||||
SRC_URI[rust.md5sum] = "5bbfff5ef8857a73d120616546a7fd29"
|
|
||||||
SRC_URI[rust.sha256sum] = "2e7daad418a830b45b977cd7ecf181b65f30f73df63ff36e124ea5fe5d1af327"
|
|
||||||
|
|
||||||
# later versions of rust change the directory that they unextract to
|
|
||||||
RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
|
|
||||||
# set this as our default
|
|
||||||
S = "${RUSTSRC}"
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust"
|
||||||
|
|
||||||
|
SRC_URI[rust.md5sum] = "7c85e6a60dda740295f7e004a1fb15e1"
|
||||||
|
SRC_URI[rust.sha256sum] = "c69a4a85a1c464368597df8878cb9e1121aae93e215616d45ad7d23af3052f56"
|
||||||
|
|
||||||
|
# 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"
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust"
|
||||||
|
|
||||||
|
SRC_URI[rust.md5sum] = "78ffc0b029aaed216b45c3fe24747d46"
|
||||||
|
SRC_URI[rust.sha256sum] = "f51645b9f787af4a5d94db17f6af39db0c55980ed24fe366cad55b57900f8f2d"
|
||||||
|
|
||||||
|
# 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"
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user