* Convert to new override syntax
This is the result of automated script (0.9.0) conversion:
oe-core/scripts/contrib/convert-overrides.py .
converting the metadata to use ":" as the override character instead of "_".
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* Manually fix the conversion
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* layer.conf: Update layer compatibility with only dunfell and newer.
Add honister to mark the layers as compatible with honister now that it uses
the new override syntax.
Drop zeus and older which are missing a support for newer override syntax which
was backported only to 1.46 branch (used by dunfell) and newer, e.g.:
https://git.openembedded.org/bitbake/commit/?h=1.46&id=c5418eae56cc50dbae7951c055434a0c456c53a4
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* CI: use YOCTO_BRANCH instead of yocto-${YOCTO_VERSION} for poky checkout
* using latest revision in branch is often better than sticking to
some point releases
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* CI: switch to hardknott branch
* gatesgarth is already EOL, better to use something supported
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Patchelf should be reserved for when the ELF cannot be generated
correctly in the first place. This is not the case here because we have
control over the linker flags. The limitation is that -C link-args can
only be specified once, so consolidate the generation of link-args. Also
introduce some new intermediate variables in link-args generation for
customization.
Patchelf was running only in ${PKGD} because patching the ELF in ${D}
would cause objcopy to fail when splitting the debug sections. This is
not a problem when setting it correctly in the linker. The benefit is
that the rpath is correct in the sysroot as well.
This also switches the rpaths to be relative so that they work in both
the sysroot and the target in the same way.
Signed-off-by: Tyler Hall <tyler.hall@lexmark.com>
Signed-off-by: Steven Walter <swalter@lexmark.com>
Commit 864fe95 ("classes: create proper compiler and linker wrappers")
introduced wrapper scripts for the OE toolchain. Specifying the sysroot
manually ceased to function in rust-bin, so use the wrapper where rustc
is called directly.
This should be more reliable than trying to repeat what OE puts in the
$CC variable.
Since commit 06a138a ("rust: drop custom target finding patch"), rustc
is no longer self-sufficient in finding its target specifications. Any
usage of rustc needs RUST_TARGET_PATH set in the environment.
Move the declaration to rust-common.bbclass and add the export to
rust-bin where rustc is invoked.
The crate_hash flag is no longer accepted on rust 1.14. Additionally,
due to the use of wrapper scripts by cargo, we were no longer able to
link correctly due to some link flags getting dropped. Fix that as well
The -C crate_hash option does not work if multiple versions of the same
crate are being linked into a binary. This can happen if different
dependencies depend on different versions of the same crate. The -C
crate_hash argument causes all versions of a given crate to have the
same crate hash which in turn causes the compiler to select the wrong
one internally and crash. This works around issue #126 for Cargo builds
but does not fix the underlying cause.
rust-bin.bbclass now only contains what is necessary to build crates
using the rust compiler directly and rust.bbclass contains information
shared between rust-bin and cargo.
Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
With multilib, we may want to install under lib64 but the rust libraries
get published in the build sysroot under the libdir for the build
machine which is usually just lib. Support these being different.
Poky 1.7 uses RPATH is now RUNPATH, so update our grep string appropriately.
Additionally, bitbake is having trouble with the automatic RDEPENDS on
rustlib. Make it explicit for now.
poky 1.7 changes where it publishes cross output to so this recipe
needs to follow that. Unfortunately this path is defined in
cross.bbclass and we can't inherit that since we aren't cross.
Rust library names may have sonames that overlap with C/C++ libraries.
This causes bitbake to not be able to create the correct automatic
RDEPENDS between packages. The result is that dependencies may not get
automatically installed.
Add -rs to the file name and soname. The crate name remains the same,
and rust is not dependent on the file name to look up the crate inside
the library.
Libraries that overlap with the standard library must have explicit
extern declarations. Without something like pkg-config where the
libraries can publish this info, it's easiest to just hard-code the list
of troublesome libraries.
We control static/dynamic by only making one or the other available.
Apparently the default of prefer static causes duplicate symbols for the
standard library.
This provides more defaults that aren't required for compiling with
rustc, but standardize the output for inclusion in a distro.
Things like
- Where to install libraries
- Stripping rustc note sections
- Optimization by default