progress
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
## An excerpt from curl-sys's build script:
|
||||
#export CFLAGS := $(CFLAGS) -fPIC -ffunction-sections -fdata-sections
|
||||
#OPTS := $(OPTS) \
|
||||
# --enable-static=yes \
|
||||
# --enable-shared=no \
|
||||
# --disable-ldap --disable-ldaps --disable-ftp --disable-rtsp \
|
||||
# --disable-dict --disable-telnet --disable-tftp --disable-pop3 \
|
||||
# --disable-imap --disable-smtp --disable-gopher --disable-manual \
|
||||
# --enable-optimize --without-librtmp --without-libidn \
|
||||
# --prefix="$(OUT_DIR)"
|
||||
## Due to how rust links, we need -fPIC. Without it,
|
||||
|
||||
#EXTRA_OECONF_append = " \
|
||||
# --with-zlib \
|
||||
# --enable-static \
|
||||
# --enable-hidden-symbols \
|
||||
#"
|
||||
|
||||
CFLAGS +=" -fPIC"
|
||||
|
||||
do_configure_prepend () {
|
||||
#export CFLAGS="$CFLAGS -fPIC"
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
SRC_URI[md5sum] = "cbf3422d54dd6f55f09855a6eb749f41"
|
||||
SRC_URI[sha256sum] = "bc06bc9b5f8449040b8d0f727c83cbd7a4c2243317d33d57c3c548873294845e"
|
||||
require libgit2.inc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# cargo tries to build a shared object using several static objects, one of
|
||||
# which includes the contenst of zlib (zutil.o)
|
||||
do_configure_prepend () {
|
||||
export CFLAGS="${CFLAGS} -fPIC"
|
||||
#export CFLAGS="${CFLAGS} -fPIC"
|
||||
}
|
||||
|
||||
+1
-13
@@ -4,7 +4,7 @@ HOMEPAGE = "http://crates.io"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
|
||||
DEPENDS = "openssl-native rust-native zlib-native libgit2-native curl-native"
|
||||
DEPENDS = "openssl-native rust-native zlib-native libgit2-native curl-native ca-certificates-native"
|
||||
|
||||
SRC_URI = "git://github.com/rust-lang/cargo.git;protocol=https"
|
||||
|
||||
@@ -18,11 +18,6 @@ LIC_FILES_CHKSUM ="\
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${S}"
|
||||
|
||||
do_patch () {
|
||||
# Work around a bug in openssl-static-sys
|
||||
ln -f "${prefix}/../lib/libcrypto.a" "${prefix}/lib/"
|
||||
}
|
||||
|
||||
do_configure () {
|
||||
"${S}/configure" \
|
||||
"--prefix=${prefix}" \
|
||||
@@ -44,13 +39,6 @@ do_compile () {
|
||||
# to override it's arch info.
|
||||
oe_cargo_config
|
||||
|
||||
# FIXME: rustc needs -L flags to know where to look for libs, adding -L
|
||||
# flags to the linker is not sufficient.
|
||||
# As a workaround, copy libs locally
|
||||
local ldep="${S}/target/${RUST_TARGET_SYS}/deps"
|
||||
mkdir -p "${ldep}"
|
||||
cp "${libdir}/libz.a" "${ldep}"
|
||||
|
||||
export RUST_PATH="${RUST_PATH}"
|
||||
oe_runmake ARGS="--verbose"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
SRCREV = "2d101e2e3809da5dc6c79c27ad962d7945cddfb5"
|
||||
|
||||
require recipes/cargo/cargo.inc
|
||||
do_patch_prepend () {
|
||||
# Work around a bug in openssl-static-sys
|
||||
mkdir -p "${prefix}/lib"
|
||||
ln -sf "${base_prefix}/lib/libcrypto.a" "${prefix}/lib/"
|
||||
}
|
||||
require cargo.inc
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
SRCREV = "0881adf3eef5283bdfc006a23ea907b6529b0027"
|
||||
|
||||
# This version doesn't work with rust-0.12.0
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
require recipes/cargo/cargo.inc
|
||||
@@ -1,6 +0,0 @@
|
||||
SRCREV = "9788700351f5c236c4e403f28a9156e6ee0b2483"
|
||||
|
||||
# This version doesn't work with rust-0.12.0
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
require recipes/cargo/cargo.inc
|
||||
@@ -1,6 +0,0 @@
|
||||
SRCREV = "abc712795321d13dcf6839242c476e42d3e211d2"
|
||||
|
||||
# This version doesn't work with rust-0.12.0
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
require recipes/cargo/cargo.inc
|
||||
@@ -0,0 +1,2 @@
|
||||
SRCREV = "947a62b7db0a105d7ba70d3ea77be0a21e7e1bd9"
|
||||
require cargo.inc
|
||||
@@ -1,9 +0,0 @@
|
||||
SRC_URI[md5sum] = "24f80304da2ef1c0362b7caf700390f9"
|
||||
SRC_URI[sha256sum] = "883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7"
|
||||
|
||||
LIC_FILES_CHKSUM ="\
|
||||
file://COPYRIGHT;md5=0e8e4a3b5d8e1c90eb243d406369763a \
|
||||
"
|
||||
SRC_URI_append = "\
|
||||
file://0001-mk-rt-export-CC-does-not-seem-to-work-gcc-observed-u.patch \
|
||||
"
|
||||
@@ -0,0 +1,6 @@
|
||||
SRC_URI = "\
|
||||
gitsm://github.com/rust-lang/rust.git;protocol=https \
|
||||
"
|
||||
S = "${WORKDIR}/git"
|
||||
require rust.inc
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rust-${PV}.tar.gz \
|
||||
"
|
||||
|
||||
require rust.inc
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
inherit rust
|
||||
|
||||
SUMMARY = "Rust compiler and runtime libaries"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
do_configure () {
|
||||
# FIXME: allow --enable-local-rust
|
||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||
# FIXME: handle non-native builds
|
||||
|
||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||
# wide range of targets (not just HOST). Yocto's settings for them will
|
||||
# be inappropriate, avoid using.
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
# XXX: rpath is required otherwise rustc fails to resolve symbols
|
||||
|
||||
${S}/configure \
|
||||
"--enable-rpath" \
|
||||
"--disable-verify-install" \
|
||||
"--prefix=${prefix}" \
|
||||
"--target=${RUST_TARGET_SYS}" \
|
||||
"--localstatedir=${localstatedir}" \
|
||||
"--sysconfdir=${sysconfdir}" \
|
||||
"--datadir=${datadir}" \
|
||||
"--infodir=${infodir}" \
|
||||
"--mandir=${mandir}" \
|
||||
"--build=${RUST_BUILD_SYS}" \
|
||||
"--host=${RUST_HOST_SYS}" \
|
||||
"--libdir=${libdir}"
|
||||
|
||||
|
||||
}
|
||||
|
||||
rust_runmake () {
|
||||
echo "COMPILE ${PN}" "$@"
|
||||
env
|
||||
|
||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||
# wide range of targets (not just HOST). Yocto's settings for them will
|
||||
# be inappropriate, avoid using.
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
# FIXME: this only works if RT != RH. For RT == RH, we need to add
|
||||
# additional targets to platform.mk and patch rust to understand the
|
||||
# new triples (so it can find runtime libraries).
|
||||
|
||||
# Note: these variable names include '-', so we can't supply them via
|
||||
# shell exports
|
||||
oe_runmake \
|
||||
CROSS_PREFIX_${RUST_TARGET_SYS}= \
|
||||
CC_${rt}="${CCACHE}${TARGET_PREFIX}gcc ${TARGET_CC_ARCH}" \
|
||||
CXX_${rt}="${CCACHE}${TARGET_PREFIX}g++ ${TARGET_CC_ARCH}" \
|
||||
CPP_${rt}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -E" \
|
||||
AR_${rt}="${TARGET_PREFIX}ar" \
|
||||
\
|
||||
CROSS_PREFIX_${ROST_HOST_SYS}= \
|
||||
CC_${rh}="${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" \
|
||||
CXX_${rh}="${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}" \
|
||||
CPP_${rh}="${HOST_PREFIX}gcc ${HOST_CC_ARCH} -E" \
|
||||
AR_${rh}="${HOST_PREFIX}ar" \
|
||||
\
|
||||
CFG_CFLAGS_${RUST_TARGET_SYS}="${TARGET_CFLAGS}" \
|
||||
CFG_LDFLAGS_${RUST_TARGET_SYS}="${TARGET_LDFLAGS}" \
|
||||
CFG_CFLAGS_${RUST_HOST_SYS}="${HOST_CFLAGS}" \
|
||||
CFG_LDFLAGS_${RUST_HOST_SYS}="${HOST_LDFLAGS}" \
|
||||
\
|
||||
"$@"
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
rust_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
rust_runmake DESTDIR="${D}" install
|
||||
}
|
||||
|
||||
# FIXME: use FILES to create a -runtime (not -native) package
|
||||
# $PREFIX/lib/rustlib/`rust_triple`/lib/* contains the runtime libraries (and rlibs)
|
||||
# Need to copy the *.so files to the appropriate target path
|
||||
# cp $prefix/lib/rustlib/`rust_triple "${TARGET_ARCH}" "${TARGET_VENDOR}" "${TARGET_OS}"`/lib/*.so ${target_libdir}/
|
||||
|
||||
# cross-canadian: llvm configure fails for host while attempting to build host-only llvm
|
||||
BBCLASSEXTEND = "cross native"
|
||||
|
||||
#python cross_virtclass_provides_native_handler () {
|
||||
# classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
||||
# if "cross" not in classextend:
|
||||
# return
|
||||
# pn = e.data.getVar("PN", True)
|
||||
# if not pn.endswith("-cross"):
|
||||
# return
|
||||
# e.data.prependVar("PROVIDES", "rust-native ")
|
||||
#}
|
||||
#addhandler cross_virtclass_provides_native_handler
|
||||
#cross_virtclass_provides_native_handler[eventmask] = "bb.event.RecipePreFinalise"
|
||||
@@ -0,0 +1,7 @@
|
||||
LIC_FILES_CHKSUM ="\
|
||||
file://COPYRIGHT;md5=0e8e4a3b5d8e1c90eb243d406369763a \
|
||||
"
|
||||
|
||||
SRCREV = "1652a1f2c61883c5f2b55a952796619d8aef365e"
|
||||
|
||||
require rust-git.inc
|
||||
+8
-109
@@ -1,112 +1,11 @@
|
||||
inherit rust
|
||||
SRC_URI[md5sum] = "24f80304da2ef1c0362b7caf700390f9"
|
||||
SRC_URI[sha256sum] = "883e66b24d90d9957c5c538469fcde6f0668e5fb6448beecfc60884060e769b7"
|
||||
|
||||
SUMMARY = "Rust compiler and runtime libaries"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rust-${PV}.tar.gz \
|
||||
LIC_FILES_CHKSUM ="\
|
||||
file://COPYRIGHT;md5=0e8e4a3b5d8e1c90eb243d406369763a \
|
||||
"
|
||||
SRC_URI_append = "\
|
||||
file://0001-mk-rt-export-CC-does-not-seem-to-work-gcc-observed-u.patch \
|
||||
"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
do_configure () {
|
||||
# FIXME: allow --enable-local-rust
|
||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||
# FIXME: handle non-native builds
|
||||
|
||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||
# wide range of targets (not just HOST). Yocto's settings for them will
|
||||
# be inappropriate, avoid using.
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
# XXX: rpath is required otherwise rustc fails to resolve symbols
|
||||
|
||||
${S}/configure \
|
||||
"--enable-rpath" \
|
||||
"--disable-verify-install" \
|
||||
"--prefix=${prefix}" \
|
||||
"--target=${RUST_TARGET_SYS}" \
|
||||
"--localstatedir=${localstatedir}" \
|
||||
"--sysconfdir=${sysconfdir}" \
|
||||
"--datadir=${datadir}" \
|
||||
"--infodir=${infodir}" \
|
||||
"--mandir=${mandir}" \
|
||||
"--build=${RUST_BUILD_SYS}" \
|
||||
"--host=${RUST_HOST_SYS}" \
|
||||
"--libdir=${libdir}"
|
||||
|
||||
|
||||
}
|
||||
|
||||
rust_runmake () {
|
||||
echo "COMPILE ${PN}" "$@"
|
||||
env
|
||||
|
||||
# CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a
|
||||
# wide range of targets (not just HOST). Yocto's settings for them will
|
||||
# be inappropriate, avoid using.
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset CXXFLAGS
|
||||
unset CPPFLAGS
|
||||
|
||||
# FIXME: this only works if RT != RH. For RT == RH, we need to add
|
||||
# additional targets to platform.mk and patch rust to understand the
|
||||
# new triples (so it can find runtime libraries).
|
||||
|
||||
# Note: these variable names include '-', so we can't supply them via
|
||||
# shell exports
|
||||
oe_runmake \
|
||||
CROSS_PREFIX_${RUST_TARGET_SYS}= \
|
||||
CC_${rt}="${CCACHE}${TARGET_PREFIX}gcc ${TARGET_CC_ARCH}" \
|
||||
CXX_${rt}="${CCACHE}${TARGET_PREFIX}g++ ${TARGET_CC_ARCH}" \
|
||||
CPP_${rt}="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -E" \
|
||||
AR_${rt}="${TARGET_PREFIX}ar" \
|
||||
\
|
||||
CROSS_PREFIX_${ROST_HOST_SYS}= \
|
||||
CC_${rh}="${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" \
|
||||
CXX_${rh}="${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}" \
|
||||
CPP_${rh}="${HOST_PREFIX}gcc ${HOST_CC_ARCH} -E" \
|
||||
AR_${rh}="${HOST_PREFIX}ar" \
|
||||
\
|
||||
CFG_CFLAGS_${RUST_TARGET_SYS}="${TARGET_CFLAGS}" \
|
||||
CFG_LDFLAGS_${RUST_TARGET_SYS}="${TARGET_LDFLAGS}" \
|
||||
CFG_CFLAGS_${RUST_HOST_SYS}="${HOST_CFLAGS}" \
|
||||
CFG_LDFLAGS_${RUST_HOST_SYS}="${HOST_LDFLAGS}" \
|
||||
\
|
||||
"$@"
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
rust_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
rust_runmake DESTDIR="${D}" install
|
||||
}
|
||||
|
||||
# FIXME: use FILES to create a -runtime (not -native) package
|
||||
# $PREFIX/lib/rustlib/`rust_triple`/lib/* contains the runtime libraries (and rlibs)
|
||||
# Need to copy the *.so files to the appropriate target path
|
||||
# cp $prefix/lib/rustlib/`rust_triple "${TARGET_ARCH}" "${TARGET_VENDOR}" "${TARGET_OS}"`/lib/*.so ${target_libdir}/
|
||||
|
||||
# cross-canadian: llvm configure fails for host while attempting to build host-only llvm
|
||||
BBCLASSEXTEND = "cross native"
|
||||
|
||||
#python cross_virtclass_provides_native_handler () {
|
||||
# classextend = e.data.getVar('BBCLASSEXTEND', True) or ""
|
||||
# if "cross" not in classextend:
|
||||
# return
|
||||
# pn = e.data.getVar("PN", True)
|
||||
# if not pn.endswith("-cross"):
|
||||
# return
|
||||
# e.data.prependVar("PROVIDES", "rust-native ")
|
||||
#}
|
||||
#addhandler cross_virtclass_provides_native_handler
|
||||
#cross_virtclass_provides_native_handler[eventmask] = "bb.event.RecipePreFinalise"
|
||||
|
||||
require recipes/rust/rust-${PV}.inc
|
||||
require rust-release.inc
|
||||
|
||||
Reference in New Issue
Block a user