rust-hello-world builds :)

This commit is contained in:
Cody P Schafer
2014-11-20 20:44:10 -05:00
parent 9f180fdf7b
commit 5811ada7fe
3 changed files with 12 additions and 7 deletions

View File

@@ -5,11 +5,11 @@ This openembedded layer provides the rust compiler, tools for building packages
## What works:
- Building rust-native and rust-cross (tested with qemux86, SYS=i586-poky-linux)
- MACHINE="beaglebone" (TARGET_SYS=arm-poky-linux-gnueabi)
- Building rust-native, rust-cross, rust-hello-world
## What doesn't:
- building rust-hello-world
- building cargo-native (I managed to break it)
## What's untested:

View File

@@ -77,7 +77,7 @@ oe_runrustc () {
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
}
cargo_config () {
oe_cargo_config () {
mkdir -p .cargo
# FIXME: we currently blow away the entire config because duplicate
# sections are treated as a parse error by cargo (causing the entire
@@ -103,7 +103,7 @@ rpath = true
EOF
}
cargo_build () {
oe_cargo_build () {
# FIXME: if there is already an entry for this target, in an existing
# cargo/config, this won't work.
which cargo

View File

@@ -10,15 +10,20 @@ LICENSE = "MIT | Apache-2.0"
# FIXME: we really depend on cargo-native, but avoid it for now as building it
# is more painful than it should be
#DEPENDS = "cargo-native"
DEPENDS = "cargo-native"
S = "${WORKDIR}/git"
B = "${S}"
do_compile () {
cargo_build
oe_cargo_build
}
do_install () {
cp ${WORKDIR}/target/* ${D}${bindir}
install -d "${D}${bindir}"
for tgt in "${B}/target/${HOST_SYS}/release/"*; do
if [ -f "$tgt" ] && [ -x "$tgt" ]; then
install -m755 "$tgt" "${D}${bindir}"
fi
done
}