Use the pre-packaged version of cargo for the native packager.
While this is not how we really want to do things, this does let us move forward for right now.
When someone is using a distro that's using security flags we need to
provide overrides to disable PIE.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Per conversation in #rust with kergoth this file is causing a backtrace
in bitbake because its overriding the meta/conf/licenses.conf file. The
behavior that's expected out of this isn't valid with newer Yocto
releases so its possible this is for an older version.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Fixes#6 (until something else comes along and adds another '-L')
At the same time remove the no longer needed patch to tweak llvm
version checking, we disable those checks in configure now.
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
Rust's symbol hashes break sstate, because a subsequent build of the same
input hash may generate different symbol hashes. This means that
packages that previously built against the "same" (from bitbake's
perspective) rustc would no longer run, and bitbake would not know to
rebuild them because the input hash is the same. This is because the
crate metadata contains some data that differs from build-to-build.
This problem actually extends beyond the compiler to any arbitrary
crate, for the same reason. If a crate in the middle of the dependency
chain had to be rebuilt, bitbake wouldn't realized that all its
dependencies have to be relink, and the dependent packages would fail
due to missing symbols.
Fortunately, bitbake's input hash makes this mechanism largely
unnecessary; any change to rust's source or configuration will cause
rustc and all dependencies to rebuild. Therefore, it's safe to remove
crate metadata from the hashing.